Debian Codegraph @

.pre-commit-config.yaml

raw
1 ---
2 repos:
3 - repo: local
4 hooks:
5 - id: ruff-check
6 name: ๐Ÿถ Ruff Linter
7 language: system
8 types: [python]
9 entry: uv run ruff check --fix
10 require_serial: true
11 stages: [pre-commit, pre-push, manual]
12 - id: ruff-format
13 name: ๐Ÿถ Ruff Formatter
14 language: system
15 types: [python]
16 entry: uv run ruff format
17 require_serial: true
18 stages: [pre-commit, pre-push, manual]
19 - id: check-ast
20 name: ๐Ÿ Check Python AST
21 language: system
22 types: [python]
23 entry: uv run check-ast
24 - id: check-case-conflict
25 name: ๐Ÿ”  Check for case conflicts
26 language: system
27 entry: uv run check-case-conflict
28 - id: check-docstring-first
29 name: โ„น๏ธ Check docstring is first
30 language: system
31 types: [python]
32 entry: uv run check-docstring-first
33 - id: check-executables-have-shebangs
34 name: ๐Ÿง Check that executables have shebangs
35 language: system
36 types: [text, executable]
37 entry: uv run check-executables-have-shebangs
38 stages: [pre-commit, pre-push, manual]
39 - id: check-json
40 name: ๏ฝ› Check JSON files
41 language: system
42 types: [json]
43 entry: uv run check-json
44 - id: check-merge-conflict
45 name: ๐Ÿ’ฅ Check for merge conflicts
46 language: system
47 types: [text]
48 entry: uv run check-merge-conflict
49 - id: check-symlinks
50 name: ๐Ÿ”— Check for broken symlinks
51 language: system
52 types: [symlink]
53 entry: uv run check-symlinks
54 - id: check-toml
55 name: โœ… Check TOML files
56 language: system
57 types: [toml]
58 entry: uv run check-toml
59 - id: check-xml
60 name: โœ… Check XML files
61 entry: uv run check-xml
62 language: system
63 types: [xml]
64 - id: check-yaml
65 name: โœ… Check YAML files
66 language: system
67 types: [yaml]
68 entry: uv run check-yaml
69 - id: codespell
70 name: โœ… Check code for common misspellings
71 language: system
72 types: [text]
73 exclude: ^uv\.lock$
74 entry: uv run codespell
75 args:
76 - --ignore-words-list=fo,incomfort,nam,bloc,ue
77 - id: detect-private-key
78 name: ๐Ÿ•ต๏ธ Detect Private Keys
79 language: system
80 types: [text]
81 entry: uv run detect-private-key
82 - id: end-of-file-fixer
83 name: โฎ Fix End of Files
84 language: system
85 types: [text]
86 entry: uv run end-of-file-fixer
87 stages: [pre-commit, pre-push, manual]
88 - id: mypy
89 name: ๐Ÿ†Ž Static type checking using mypy
90 language: system
91 types: [python]
92 entry: uv run mypy
93 require_serial: true
94 - id: no-commit-to-branch
95 name: ๐Ÿ›‘ Don't commit to main branch
96 language: system
97 entry: uv run no-commit-to-branch
98 pass_filenames: false
99 always_run: true
100 args:
101 - --branch=main
102 - id: prettier
103 name: ๐Ÿ’„ Ensuring files are prettier
104 language: system
105 types: [yaml, json, markdown]
106 entry: npm run prettier
107 pass_filenames: false
108 - id: pylint
109 name: ๐ŸŒŸ Starring code with pylint
110 language: system
111 types: [python]
112 entry: uv run pylint
113 - id: pytest
114 name: ๐Ÿงช Running tests and test coverage with pytest
115 language: system
116 types: [python]
117 entry: uv run pytest
118 pass_filenames: false
119 - id: trailing-whitespace
120 name: โœ„ Trim Trailing Whitespace
121 language: system
122 types: [text]
123 entry: uv run trailing-whitespace-fixer
124 stages: [pre-commit, pre-push, manual]
125 - id: yamllint
126 name: ๐ŸŽ— Check YAML files with yamllint
127 language: system
128 types: [yaml]
129 entry: uv run yamllint