-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
86 lines (77 loc) · 1.95 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
86 lines (77 loc) · 1.95 KB
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
# Pre-commit hooks configuration
# Install: pip install pre-commit && pre-commit install
repos:
# General hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--unsafe]
- id: check-json
- id: check-toml
- id: check-added-large-files
args: [--maxkb=1000]
- id: check-merge-conflict
- id: detect-private-key
- id: no-commit-to-branch
args: [--branch, main]
# Python formatting and linting with Ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.10
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
# Type checking with MyPy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
hooks:
- id: mypy
exclude: ^tests/
additional_dependencies:
- google-cloud-storage
- pandas-stubs
- types-requests
- types-PyYAML
# Security scanning with Bandit
- repo: https://github.com/PyCQA/bandit
rev: 1.7.7
hooks:
- id: bandit
args: [-ll]
files: ^src/
exclude: ^tests/
# Terraform formatting
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.86.0
hooks:
- id: terraform_fmt
- id: terraform_validate
args:
- --init-args=-backend=false
# Dockerfile linting
- repo: https://github.com/hadolint/hadolint
rev: v2.12.0
hooks:
- id: hadolint-docker
args: [--ignore, DL3008, --ignore, DL3013]
# YAML formatting
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.12.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --indent, '2']
exclude: ^(\.github/|dbt/)
# Markdown linting
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.39.0
hooks:
- id: markdownlint
args: [--fix]
exclude: ^(CHANGELOG|docs/|\.github/)
# CI configuration
ci:
autofix_commit_msg: 'style: auto-fix from pre-commit hooks'
autoupdate_commit_msg: 'chore: update pre-commit hooks'