-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
65 lines (59 loc) · 1.9 KB
/
.pre-commit-config.yaml
File metadata and controls
65 lines (59 loc) · 1.9 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.12
repos:
# General hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--unsafe]
- id: check-toml
- id: check-json
exclude: '\.asl\.json$'
- id: check-added-large-files
args: [--maxkb=1500]
exclude: "validation_harness/2019_camp_adsi/report.pdf"
- id: check-merge-conflict
- id: detect-private-key
# Ruff - Fast Python linter & formatter
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.0
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
# Terraform formatting and linting
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.96.3
hooks:
- id: terraform_fmt
files: "^terraform/"
- id: terraform_tflint
files: "^terraform/"
args:
- --args=--config=__GIT_WORKING_DIR__.tflint.hcl
- "--args=--disable-rule=terraform_typed_variables"
- "--args=--disable-rule=terraform_required_providers"
- "--args=--disable-rule=terraform_unused_declarations"
- "--args=--disable-rule=terraform_required_version"
# Terraform validation
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.96.3
hooks:
- id: terraform_validate
files: "^terraform/"
args:
- --tf-init-args=-upgrade=false
# Conventional commits
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.6.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
ci:
autofix_commit_msg: "style: auto-fix by pre-commit hooks"
autoupdate_commit_msg: "chore: update pre-commit hooks"