Debian Codegraph @

.pre-commit-config.yaml

raw
1 repos:
2 - repo: local
3 hooks:
4 - id: ruff-check
5 name: Ruff Linter
6 language: system
7 types: [python]
8 entry: python3 -m ruff check --fix
9 require_serial: true
10 stages: [pre-commit, pre-push, manual]
11 - id: ruff-format
12 name: Ruff Formatter
13 language: system
14 types: [python]
15 entry: python3 -m ruff format
16 require_serial: true
17 stages: [pre-commit, pre-push, manual]
18 - id: check-ast
19 name: Check Python AST
20 language: system
21 types: [python]
22 entry: check-ast
23 - id: check-case-conflict
24 name: Check for case conflicts
25 language: system
26 entry: check-case-conflict
27 - id: check-docstring-first
28 name: heck docstring is first
29 language: system
30 types: [python]
31 entry: check-docstring-first
32 - id: check-executables-have-shebangs
33 name: Check that executables have shebangs
34 language: system
35 types: [text, executable]
36 entry: check-executables-have-shebangs
37 stages: [pre-commit, pre-push, manual]
38 - id: check-json
39 name: Check JSON files
40 language: system
41 types: [json]
42 entry: check-json
43 - id: check-merge-conflict
44 name: Check for merge conflicts
45 language: system
46 types: [text]
47 entry: check-merge-conflict
48 - id: check-toml
49 name: Check TOML files
50 language: system
51 types: [toml]
52 entry: check-toml
53 - id: codespell
54 name: Check code for common misspellings
55 language: system
56 types: [text]
57 entry: codespell
58 exclude: voice_data.py
59 - id: detect-private-key
60 name: Detect Private Keys
61 language: system
62 types: [text]
63 entry: detect-private-key
64 - id: end-of-file-fixer
65 name: Fix End of Files
66 language: system
67 types: [text]
68 entry: end-of-file-fixer
69 stages: [pre-commit, pre-push, manual]
70 - id: no-commit-to-branch
71 name: Don't commit to the main branch
72 language: system
73 entry: no-commit-to-branch
74 pass_filenames: false
75 always_run: true
76 args:
77 - --branch=main
78 - id: pylint
79 name: Starring code with pylint
80 entry: python3 -m pylint
81 language: system
82 types: [python]
83 require_serial: true
84 files: ^hass_nabucasa/.+\.py$
85 - id: trailing-whitespace
86 name: Trim Trailing Whitespace
87 language: system
88 types: [text]
89 exclude: __snapshots__
90 entry: trailing-whitespace-fixer
91 stages: [pre-commit, pre-push, manual]
92 - id: mypy
93 name: mypy
94 entry: python3 -m mypy
95 language: system
96 types: [python]
97 require_serial: true
98 files: ^hass_nabucasa/.+\.py$