-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
77 lines (69 loc) · 2.06 KB
/
.pre-commit-config.yaml
File metadata and controls
77 lines (69 loc) · 2.06 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
77
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
# - id: check-executables-have-shebangs # Doesn't work in devcontainer on Mac
# - id: check-json # There is invalid json in the fixtures folder on purpose
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: name-tests-test
args: [--pytest-test-first]
exclude: const.py
- id: trailing-whitespace
# CI checks
# The following tools are all installed locally, so there is no need to use remote repos.
# The main reason is to not have to worry about version mismatch between the project and pre-commit.
- repo: local
hooks:
- id: mypy
name: mypy
entry: uv run mypy custom_components/kamstrup_403
language: system
types: [python]
pass_filenames: false
- id: prettier
name: prettier
entry: npm run prettier -- --write .
language: system
pass_filenames: false
- id: pylint
name: pylint
entry: uv run pylint
language: system
types: [python]
require_serial: true
- id: ruff-check
name: ruff linter
entry: uv run ruff check --fix
language: system
types: [python]
- id: ruff-lint
name: ruff formatter
entry: uv run ruff format --check .
language: system
types: [python]
- id: shellcheck
name: shellcheck
entry: uv run shellcheck
language: system
types: [shell]
- id: uv-lock
name: uv lock
entry: uv lock --check
language: system
pass_filenames: false
- id: yamllint
name: yamllint
entry: uv run yamllint
language: system
types: [yaml]