-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
55 lines (54 loc) · 1.72 KB
/
.pre-commit-config.yaml
File metadata and controls
55 lines (54 loc) · 1.72 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
repos:
- repo: 'https://github.com/codespell-project/codespell'
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.8 # keep in sync with requirements-dev.txt
hooks:
# Linter — runs first, fixes what it safely can
- id: ruff-check
args: [--fix]
types_or: [python, pyi, pyproject]
# Formatter — runs after linter so it can clean up any fix output
- id: ruff-format
types_or: [python, pyi]
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v4.1.0
hooks:
- id: check-docstring-first
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-yaml
args: [--unsafe]
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
- repo: local
hooks:
- id: shellcheck
name: shellcheck
entry: script/pre_commit_shellcheck.sh
language: script
exclude_types: [json, sql, toml, yaml]
files: ^(script|iac)/.+sh$
- id: rstcheck
name: rstcheck
entry: script/pre_commit_rstcheck.sh
language: script
files: ^.+rst$
- id: bandit
name: bandit
entry: script/pre_commit_bandit.sh
language: script
types: [python]
files: ^(srpenergy|tests)/.+\.py$
- id: pylint
name: pylint
entry: script/run_in_env.sh pylint -j 0
language: script
types: [python]
files: ^(srpenergy|tests)/.+\.py$