forked from johnbeard/kiplot
-
Notifications
You must be signed in to change notification settings - Fork 66
/
.pre-commit-config.yaml
101 lines (100 loc) · 2.74 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
93
94
95
96
97
98
99
100
101
---
files:
(?x)^(
.*/Makefile|
.*\.sh|
.*\.py|
.*\.md
)$
exclude:
(?x)^(
.*error.*\.yaml|
experiments/.*|
submodules/.*|
kibot/PyPDF2/.*|
kibot/PcbDraw/.*|
tests/yaml_samples/definitions_*|
tests/yaml_samples/simple_position_csv_pre.kibot.yaml
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: no-commit-to-branch
args: [--branch, main]
- id: check-ast
- id: check-yaml
args: [--unsafe]
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-json
stages: [manual]
- id: mixed-line-ending
- id: check-builtin-literals
- id: check-merge-conflict
# - id: check-docstring-first
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
# - id: check-toml
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.33.0
hooks:
- id: yamllint
args: [-c, .yamllint]
# I see no point in making the code more incompatible with older Python
# - repo: https://github.com/asottile/pyupgrade
# rev: v2.31.0
# hooks:
# - id: pyupgrade
# Too intrusive
# - repo: https://github.com/psf/black
# rev: 22.1.0
# hooks:
# - id: black
- repo: https://github.com/fsouza/autoflake8
rev: v0.4.1
hooks:
- id: autoflake8
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
exclude: ^kibot/mcpyrate/
args: [--count, --statistics]
additional_dependencies:
- flake8-bugbear>=22.1.11
- flake8-comprehensions>=3.8.0
- flake8_2020>=1.6.1
- flake8-docstrings
- mccabe>=0.6.1
- pycodestyle>=2.8.0
- pyflakes>=2.4.0
# Sorting imports is dangerous.
# - repo: https://github.com/PyCQA/isort
# rev: 5.10.1
# hooks:
# - id: isort
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.931
# hooks:
# - id: mypy
# Bandit is really slow, really annoying for a commit
# - repo: https://github.com/Lucas-C/pre-commit-hooks-bandit
# rev: v1.0.5
# hooks:
# - id: python-bandit-vulnerability-check
# TODO: mdformat --wrap 75 README.md --number
# - repo: https://github.com/netromdk/vermin
# rev: v1.5.2 # ex: 'e88bda9' or 'v1.3.4'
# hooks:
# - id: vermin
# # specify your target version here, OR in a Vermin config file as usual:
# args: ['-t=3.7-', '--violations']
# # (if your target is specified in a Vermin config, you may omit the 'args' entry entirely)