-
Notifications
You must be signed in to change notification settings - Fork 9
/
.pre-commit-config.yaml
84 lines (84 loc) · 2.98 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
---
exclude: '^(venv|\.vscode)' # regex
repos:
- repo: local
hooks:
- id: grafana_dashboard_data_source
name: Ensure no grafana dashboards reference problematic datasources
entry: "PBFA97CFB590B2093"
language: pygrep
types: [json]
- id: circle-config-yaml
name: Check for consistency between config.yml and config.yml.j2
language: python
# https://regex101.com/r/7SNQ2t/3
files: '^(?:\.circleci/config\.yml(?:\.j2)?|bin/generate_circleci_config\.py|\.pre-commit-config\.yaml)$'
entry: bin/generate_circleci_config.py
additional_dependencies: ["jinja2"]
always_run: True
- id: docker-compose-yaml
name: Check for consistency between docker-compose.yaml and docker-compose.yaml.j2
language: python
# https://regex101.com/r/7SNQ2t/3
files: '^(?:\.docker-compose\.yml(?:\.j2)?|bin/generate_docker_compose\.py|\.pre-commit-config\.yaml)$'
entry: bin/generate_docker_compose.py
additional_dependencies: ["jinja2", "PyYaml"]
always_run: True
- id: validate-versions
name: Validate that version.txt files have valid semvers
language: python
entry: bin/validate-semver.py
files: '.*\/version.txt'
additional_dependencies: ["packaging"]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: ["-L", "AKS,aks,showIn"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.7.1"
hooks:
- id: ruff
args:
- "--fix"
- "--exit-non-zero-on-fix"
# - "--unsafe-fixes"
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.1.0"
hooks:
- id: prettier
args: ["--print-width=135"]
exclude: "^statsd-exporter/test/statsd-test-config.js$"
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-xml
- id: check-yaml
args: ["--allow-multiple-documents"]
- id: file-contents-sorter
args: ["--ignore-case", "--unique"]
files: "^.*ignore$"
- id: mixed-line-ending
args: ["--fix=lf"]
- id: requirements-txt-fixer
args: ["requirements/requirements.in", "requirements/requirements.txt"]
- id: trailing-whitespace
- repo: https://github.com/astronomer/pre-commit-hooks
rev: 8b2d969bd549cd7c9454cc8bb54eec5b35c2e5e6
hooks:
- id: remove-unicode-zero-width-non-breaking-spaces
- id: remove-unicode-zero-width-space
- id: replace-en-dashes
- id: replace-greek-question-mark
- id: replace-unicode-non-breaking-spaces