Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
76 lines (76 loc) · 2.51 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
76 lines (76 loc) · 2.51 KB
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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: file-contents-sorter
files: ^requirements\.txt$
args: ["--ignore-case", "--unique"]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-yaml
exclude: (example_chart.yml)
- id: check-json
exclude: ^(\.cspell\.json|\.devcontainer\/devcontainer\.json)$
# The cspell dictionary needs case-insensitive *uniqueness*, which file-contents-sorter cannot do -
# its --unique is case-sensitive while --ignore-case sorts case-folded, so case-duplicate entries
# compare equal and their order varies with PYTHONHASHSEED between runs
- repo: local
hooks:
- id: cspell-dictionary-sorter
name: cspell dictionary sorter
language: python
entry: python .cspell/sort_dictionary.py
files: ^\.cspell\/custom-dictionary-workspace\.txt$
- id: export-limit-encoding
name: export limit encoding
language: python
entry: python tools/check_export_limit_encoding.py
files: ^apps/predbat/.*\.(py|cpp)$
- id: export-limit-encoding-tests
name: export limit encoding checker tests
language: python
entry: python tools/test_check_export_limit_encoding.py
files: ^tools/(check_export_limit_encoding\.py|test_check_export_limit_encoding\.py)$
pass_filenames: false
- id: triage-daemon-tests
name: triage daemon unit tests
language: python
entry: python tools/test_triage_daemon.py
files: ^tools/(triage_daemon\.py|test_triage_daemon\.py)$
pass_filenames: false
- repo: https://gitlab.com/bmares/check-json5
rev: v1.0.0
hooks:
- id: check-json5
files: ^(\.cspell\.json|\.devcontainer\/devcontainer\.json)$
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.11.4
hooks:
# Run the linter.
- id: ruff
args: [--select=F401,E713,F811,E722,F821,F841,E712,B007,B006, --fix]
- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
# - repo: https://github.com/PyCQA/isort
# rev: 5.12.0
# hooks:
# - id: isort
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.37.0
hooks:
- id: markdownlint-fix # Configure in .mdlrc
exclude: ^docs/superpowers/ # internal planning artifacts, not published docs
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.0.0
hooks:
- id: cspell
additional_dependencies:
- "@cspell/dict-en-gb"
exclude: ^docs/superpowers/ # internal planning artifacts, not published docs
exclude: |
^\.venv/|
\.backup$