Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
113 lines (112 loc) · 3.14 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
113 lines (112 loc) · 3.14 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: end-of-file-fixer
exclude: ^(animation_workbench/test/data/)
- id: trailing-whitespace
exclude: ^(animation_workbench/test/data/)
- id: check-yaml
- id: check-json
exclude: ^(.vscode)
- repo: https://github.com/psf/black
rev: 24.4.0
hooks:
- id: black
name: "black"
language_version: python3
additional_dependencies: []
- repo: local
hooks:
- id: remove-core-file
name: "Remove core file if it exists"
entry: bash -c '[[ -f core && ! -d core ]] && rm core || exit 0'
language: system
stages:
- pre-commit
- repo: local
hooks:
- id: ensure-utf8-encoding
name: "Ensure UTF-8 encoding declaration in Python files"
entry: bash scripts/encoding_check.sh
language: system
types: [python]
stages: [pre-commit]
- repo: local
hooks:
- id: ensure-google-docstrings
name: "Ensure Google-style docstrings in Python modules"
entry: bash scripts/docstrings_check.sh
language: system
types: [python]
stages: [pre-commit]
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
name: "flake8 Python Linter"
language_version: python3
additional_dependencies: ['flake8-docstrings', 'pydocstyle']
- repo: https://github.com/PyCQA/isort
rev: 6.0.1
hooks:
- id: isort
name: "isort - sort Python imports"
entry: isort
language: python
types: [python]
stages: [pre-commit]
- repo: local
hooks:
- id: nixfmt
name: "Nixfmt (RFC style)"
description: Format Nix code with nixfmt-rfc-style
entry: nixfmt
language: system
args: ["--"]
types: [nix]
- repo: local
hooks:
- id: cspell
name: "cspell - Spell checker for Markdown"
entry: cspell --config=.cspell.json --no-progress --no-summary
language: system
types: [markdown]
stages: [pre-commit]
- repo: local
hooks:
- id: yamllint
name: "yamllint - YAML linter"
entry: yamllint
language: system
types: [yaml]
stages: [pre-commit]
- repo: local
hooks:
- id: actionlint
name: "actionlint - GitHub Actions workflow linter"
entry: actionlint
language: system
types: [yaml]
files: ^\.github/workflows/.*\.ya?ml$
stages: [pre-commit]
- repo: local
hooks:
- id: bandit-scripts
name: "Bandit - Python security analysis"
entry: bandit -c .bandit.yml -r scripts
language: system
types: [python]
stages: [pre-commit]
exclude: ^scripts/tests/
- repo: local
hooks:
- id: shellcheck-scripts
name: "ShellCheck - scripts"
entry: shellcheck
language: system
files: ^scripts/.*\.(sh|bash|zsh)$
pass_filenames: true