-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpre-commit-template.yml
More file actions
63 lines (58 loc) · 1.85 KB
/
pre-commit-template.yml
File metadata and controls
63 lines (58 loc) · 1.85 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: detect-aws-credentials
- id: detect-private-key
- id: check-case-conflict
- id: check-symlinks
- id: mixed-line-ending
args: ["--fix=lf"]
- id: check-merge-conflict
- id: no-commit-to-branch
args: [--branch, main]
- id: check-yaml
args:
- "--allow-multiple-documents"
- id: check-json
- id: pretty-format-json
args: [--autofix, --no-sort-keys, --indent 2]
- repo: https://github.com/zricethezav/gitleaks
rev: v8.18.4
hooks:
- id: gitleaks
# ======= START: pre-commit for terraform =======
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.92.0
hooks:
- id: terraform_fmt
- id: terraform_validate
# tflint rules: https://github.com/terraform-linters/tflint?tab=readme-ov-file
- id: terraform_tflint
args:
- --args=--config=__GIT_WORKING_DIR__/.tflint.hcl --fix
# https://www.checkov.io/4.Integrations/pre-commit.html
# https://github.com/bridgecrewio/checkov
- repo: https://github.com/bridgecrewio/checkov.git
rev: "3.2.175"
hooks:
- id: checkov
args: ["--quiet", "--compact", "--framework", "terraform", "--download-external-modules", "false"]
- repo: https://github.com/terraform-docs/terraform-docs
rev: v0.18.0
hooks:
- id: terraform-docs-go
args: ["."]
# ======= END: pre-commit for terraform =======
# ======= START: pre-commit for python =======
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.1
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
# ======= END: pre-commit for python =======