-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
47 lines (47 loc) · 1.4 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
default_stages: [commit, push]
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
# check and format the syntax
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-json
- id: check-yaml
exclude: ^deployment/kubernetes/charts
- id: check-toml
- id: check-xml
# environment checker
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
# check the git-related commit or object
- id: check-merge-conflict
- id: check-added-large-files
# check sensitive information
- id: debug-statements
- id: detect-private-key
- repo: https://github.com/zricethezav/gitleaks
rev: v8.18.1
hooks:
- id: gitleaks
# run the detect mode and show all the leak credentials
entry: gitleaks detect --verbose --redact
- repo: https://github.com/hadolint/hadolint
rev: v2.12.1-beta
hooks:
- id: hadolint-docker
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.7
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix ]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.11.0
hooks:
- id: black
language_version: python3.12
args:
- --target-version=py312
- --line-length=120
- --skip-string-normalization