Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
61 lines (54 loc) · 2.04 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
61 lines (54 loc) · 2.04 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
repos:
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: '.*dataset/.*|^config/local_ti_files/own_malicious_JA3.csv$|.*test.*|.*\.md$'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
exclude: ^config/local_ti_files/known_fp_hashes\.csv$
- id: check-docstring-first
- id: check-merge-conflict
- id: end-of-file-fixer
- id: detect-private-key
exclude: '.*dataset/.*|^config/local_ti_files/own_malicious_JA3.csv$|.*test.*|.*\.md$'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.6
hooks:
- id: ruff
args: [ --fix ]
# excludes formatting slips_files/common/imports.py
exclude: (imports|sqlite_db.*|conftest.py)
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.1.0
hooks:
- id: black
args: ['--line-length' , '79']
language_version: python3.12.3
# excludes formatting slips_files/common/imports.py
exclude: (imports|conftest.py|tests/*.py)
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
args: ["-d", "{rules: {line-length: {max: 160}}}"]
files: "slips.yaml"
- repo: https://github.com/pypa/pip-audit
rev: v2.9.0
hooks:
- id: pip-audit
name: pip-audit dependency vulnerability check
args: ['-r', 'install/requirements.txt']
files: ^install/requirements\.txt$
pass_filenames: false
- repo: local
hooks:
- id: vulture
name: vulture dead code check
entry: bash -c 'files=$(git diff --cached --name-only --diff-filter=ACM | grep -E "\.py$" | grep -vE "^(tests/|migrations/)"); [ -n "$files" ] && vulture --exclude "tests/*,venv/*" $files || true'
language: system
types: [python]