-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
92 lines (92 loc) · 2.89 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
89
90
91
92
# Good reference list of pre-commit repos:
# https://gdevops.gitlab.io/tuto_git/tools/pre-commit/repos_hooks/repos_hooks.html#alessandrojcm-commitlint-pre-commit-hook
default_stages: [commit]
repos:
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
args: ["-ll"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
hooks:
- id: ruff # linter
args: [ --line-length=100 ]
- id: ruff-format # formatter
# - repo: https://github.com/psf/black
# rev: 23.11.0
# hooks:
# - id: black
# types: [file, python]
# args: [--line-length=100]
# - repo: https://github.com/timothycrosley/isort
# rev: 5.12.0
# hooks:
# - id: isort
# args: ["--profile", "black", "--line-length=100"]
- repo: https://github.com/PyCQA/pylint
rev: v3.0.1
hooks:
- id: pylint
name: pylint
entry: pylint
language: python
types: [python]
require_serial: true
args: [
"-rn", # Only display messages
"-sn", # Don't display the score
"--disable=line-too-long,invalid-name,too-many-locals,broad-exception-raised",
"--disable=missing-module-docstring,missing-class-docstring,missing-function-docstring"
]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.1
hooks:
- id: mypy
args: [--install-types, --non-interactive, --show-error-codes, --ignore-missing-imports]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-json
- id: check-xml
- id: check-yaml
- id: check-toml
- id: trailing-whitespace
- id: check-merge-conflict
- id: detect-private-key
# - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
# rev: v9.10.0
# hooks:
# - id: commitlint
# stages: [commit-msg]
# additional_dependencies: ['@commitlint/config-conventional']
- repo: https://github.com/hadolint/hadolint
rev: v2.12.1-beta
hooks:
- id: hadolint
args: [--ignore, DL3048]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.37.0
hooks:
- id: markdownlint
args: [--fix]
exclude: (^.github/)
# - repo: https://github.com/adrienverge/yamllint
# rev: v1.33.0
# hooks:
# - id: yamllint
# files: (\.(yaml|yml)$)
# types: [file]
# args: [-c, /app/config/yamllint.yaml]
# exclude: (.pre-commit-config.yaml)
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py39-plus]
# - repo: https://github.com/crate-ci/typos
# rev: v1.16.5
# hooks:
# - id: typos
# exclude: (.pre-commit-config.yaml)