-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
92 lines (91 loc) · 2.05 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
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
---
#
# Pre-commit config file.
#
#
# Remove the skip in your project.
#
ci:
skip: [migrations-check]
autofix_prs: false
autoupdate_schedule: weekly
default_language_version:
python: python3
default_stages: [pre-commit]
repos:
#
# Migration check
#
- repo: local
hooks:
- id: migrations-check
language: system
name: Check for uncreated migrations.
entry: sh -c "dotenvx run -f .env --overload -- python manage.py makemigrations --check --dry-run"
files: "models\\.py$"
#
# Syntax Auto-upgrade
#
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
#
# Django Upgrade
#
- repo: https://github.com/adamchainz/django-upgrade
rev: "1.22.2"
hooks:
- id: django-upgrade
#
# Lint and Formatter tool.
#
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.3
hooks:
- id: ruff
types_or: [ python, pyi ]
args: [ '--fix', '--exit-non-zero-on-fix' ]
- id: ruff-format
types_or: [ python, pyi ]
#
# Markdown
#
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.21
hooks:
- id: mdformat
additional_dependencies:
- mdformat-ruff
#
# Check List.
#
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
args: [ '--unsafe' ]
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-shebang-scripts-are-executable
- id: detect-aws-credentials
args: [ '--allow-missing-credentials' ]
- id: detect-private-key
- id: no-commit-to-branch
args: [ '--branch', 'main' ]
#
# Jenkinsfile Linter
#
- repo: local
hooks:
- id: jenkinsfile-lint
name: jenkinsfile-lint
entry: bash -c 'sh -x ./misc/scripts/validate_jenkinsfile.sh'
language: system
...