-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
88 lines (80 loc) · 2.29 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
83
84
85
86
87
88
# -*- 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: https://github.com/adrienverge/yamllint.git
rev: v1.29.0
hooks:
- id: yamllint
args: [--strict, -c=.yamllint]
- 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
"--ignore-paths=dev_stuff",
"--fail-under=8.0"
]