forked from OWASP-BLT/BLT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
67 lines (60 loc) · 1.57 KB
/
.pre-commit-config.yaml
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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-yaml
- id: fix-encoding-pragma
args:
- --remove
- id: mixed-line-ending
args:
- --fix=lf
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
exclude: ^(docs)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.13
hooks:
- id: ruff
args:
- --fix
- id: ruff-format
- repo: https://github.com/djlint/djLint
rev: v1.36.1
hooks:
- id: djlint
args:
- --reformat
- --lint
- repo: local
hooks:
- id: check-style-tags
name: check for <style> tags in HTML
entry: python
args: [pre-commit-hooks/check_style_tags.py]
language: python
types: [html]
verbose: true
- repo: local
hooks:
- id: django-collectstatic
name: Django Collect Static
entry: bash -c 'if [ -z "$GITHUB_ACTIONS" ]; then poetry run python manage.py collectstatic --noinput; fi'
language: system
types: [python]
pass_filenames: false
always_run: true
verbose: true
- id: django-test
name: Django Tests
entry: bash -c 'if [ -z "$GITHUB_ACTIONS" ]; then poetry run python manage.py test --failfast; fi'
language: system
types: [python]
pass_filenames: false
always_run: true
verbose: true
fail_fast: true