-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
89 lines (79 loc) · 2.47 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
---
repos:
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
exclude: tests/.*$
# For IDE-integration outside of the pre-commit hook,
# see: https://black.readthedocs.io/en/stable/editor_integration.html
- repo: https://github.com/ambv/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/cruft/cruft
rev: 2.10.1
hooks:
- id: cruft
name: cruft
language: system
# Log status but always succeed, providing downstream project
# maintainers template synchronization discretion.
# see: https://stackoverflow.com/a/59745587
verbose: true
entry: bash -c 'cruft check || true' --
- repo: https://github.com/Yelp/detect-secrets
rev: v1.2.0
hooks:
- id: detect-secrets
exclude: ^(poetry\.lock|\.cruft\.json)$
# Docstring coverage tool
- repo: https://github.com/econchick/interrogate
rev: 1.5.0
hooks:
- id: interrogate
name: interrogate
verbose: true
entry: bash -c 'interrogate -vv --config=pyproject.toml || true' --
- repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
rev: v1.1.2
hooks:
- id: markdown-toc
args: [--maxdepth=3, -i]
exclude: ^(docs/source/.*)$
- repo: local
hooks:
- id: mypy
name: mypy
language: system
entry: .tox/precommit/bin/mypy
args: [--cache-dir=/dev/null, --config-file=pyproject.toml]
types: [python]
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 2.1.6
hooks:
- id: script-must-have-extension
- id: script-must-not-have-extension
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.220
hooks:
- id: ruff
- repo: https://github.com/adrienverge/yamllint
rev: v1.26.3
hooks:
- id: yamllint
args: ['-d {extends: default, rules: {line-length: {max: 120, level: warning}}}']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-added-large-files # Ignored for git-lfs files
args: [--maxkb=100000] # 100MB
- id: check-ast
- id: debug-statements
- id: end-of-file-fixer # Ensure files ONLY end in a newline
exclude_types: [jupyter]
- id: pretty-format-json # Sort and indent
args: [--autofix]
exclude: ^(\.cruft\.json)$
- id: trailing-whitespace # Trim
args: [--markdown-linebreak-ext=md]