-
Notifications
You must be signed in to change notification settings - Fork 5
/
.pre-commit-config.yaml
119 lines (119 loc) · 4.6 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
---
# 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.5.0
hooks:
# Prevent giant files from being committed.
- id: check-added-large-files
# Simply check whether files parse as valid python.
#- id: check-ast
# Require literal syntax when initializing empty or zero Python builtin types.
#- id: check-builtin-literals
# Check for files with names that would conflict on a case-insensitive filesystem like MacOS HFS+ or Windows FAT.
- id: check-case-conflict
# Checks for a common error of placing code before the docstring.
- id: check-docstring-first
# Checks that non-binary executables have a proper shebang.
- id: check-executables-have-shebangs
# Attempts to load all json files to verify syntax.
- id: check-json
exclude: (.devcontainer/devcontainer.json|.vscode/launch.json)
# Check for files that contain merge conflict strings.
- id: check-merge-conflict
# Checks that scripts with shebangs are executable.
- id: check-shebang-scripts-are-executable
# Checks for symlinks which do not point to anything.
#- id: check-symlinks
# Attempts to load all TOML files to verify syntax.
- id: check-toml
# Ensures that links to vcs websites are permalinks.
#- id: check-vcs-permalinks
# Attempts to load all xml files to verify syntax.
#- id: check-xml
# Attempts to load all yaml files to verify syntax.
- id: check-yaml
# Check for debugger imports and py37+ breakpoint() calls in python source.
#- id: debug-statements
# Detects symlinks which are changed to regular files with a content of a path which that symlink was pointing to.
#- id: destroyed-symlinks
# Checks for the existence of AWS secrets that you have set up with the AWS CLI.
#- id: detect-aws-credentials
# Checks for the existence of private keys.
#- id: detect-private-key
# This hook replaces double quoted strings with single quoted strings.
#- id: double-quote-string-fixer
# Makes sure files end in a newline and only a newline.
- id: end-of-file-fixer
# Sort the lines in specified files (defaults to alphabetical).
#- id: file-contents-sorter
# removes UTF-8 byte order marker
- id: fix-byte-order-marker
# Add # -*- coding: utf-8 -*- to the top of python files.
#- id: fix-encoding-pragma
# Prevent addition of new git submodules.
#- id: forbid-new-submodules
# forbids any submodules in the repository.
#- id: forbid-submodules
# Replaces or checks mixed line ending.
- id: mixed-line-ending
# verifies that test files are named correctly.
#- id: name-tests-test
# Protect specific branches from direct checkins.
#- id: no-commit-to-branch
# Checks that all your JSON files are pretty. "Pretty" here means that keys are sorted and indented.
#- id: pretty-format-json
# Sorts entries in requirements.txt and constraints.txt and removes incorrect entry for pkg-resources==0.0.0
#- id: requirements-txt-fixer
# Sorts simple YAML files which consist only of top-level
#- id: sort-simple-yaml
# Trims trailing whitespace.
- id: trailing-whitespace
#- repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.8.0
# hooks:
# - id: mypy
# additional_dependencies: [types-all]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.0
hooks:
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format
- repo: https://github.com/iamthefij/docker-pre-commit
rev: v3.0.1
hooks:
- id: docker-compose-check
#- repo: https://github.com/hadolint/hadolint
# rev: v2.12.0
# hooks:
# - id: hadolint
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
hooks:
- id: shellcheck
#- repo: https://github.com/igorshubovych/markdownlint-cli
# rev: v0.39.0
# hooks:
# - id: markdownlint
# #- id: markdownlint-fix
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.1
hooks:
- id: gitleaks
- repo: https://github.com/sirosen/texthooks
rev: 0.6.4
hooks:
- id: alphabetize-codeowners
- id: fix-smartquotes
- id: fix-spaces
#- id: forbid-bidi-controls
- id: fix-ligatures
- repo: https://github.com/djlint/djLint
rev: v1.34.1
hooks:
- id: djlint-reformat-django
- id: djlint-django