forked from ismet55555/yojenkins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
82 lines (75 loc) · 2.21 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# -*- mode: yaml -*-
# vim: set filetype=yaml
---
##############################################################################
#
# pre-commit will run the predefined tasks at each commit
# To set up pre-commit on your development machine run the following
# This following command will enable a git commit hook: .git/hooks/pre-commit
#
# pre-commit install
#
# To simply run the pre-commit without installing it
#
# pre-commit run
#
##############################################################################
repos:
# - repo: meta
# hooks:
# - id: check-hooks-apply
# - id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: detect-private-key
- id: check-ast
- id: check-json
- id: check-toml
- id: check-yaml
files: (.yaml|.yml)
- id: check-added-large-files
args: [--maxkb=500]
- id: no-commit-to-branch
args: [--branch, main]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.1
hooks:
- id: gitleaks
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.31.0
hooks:
- id: yapf
name: Python Code Formatting (yapf)
language: python
types: [python]
args: ["--style=.style.yapf", "--parallel", "--in-place"]
verbose: true
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
name: Python Imports Sorting (isort)
language: python
language_version: python3
types_or: [python]
verbose: true
- repo: local
hooks:
- id: pylint
name: Python Code Linting (pylint)
entry: pylint
language: python
types: [python]
args:
[
"-rn", # Only display messages
"--rcfile=.pylintrc", # Link to your config file
"--load-plugins=pylint.extensions.docparams", # Load an extension
"--output-format=colorized", # Load an extension
"--fail-under=8.0",
# "--disable=R0913,W0511,R0912,W1309", # Disable some specific messages IDs
]