-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
111 lines (100 loc) · 3.38 KB
/
.pre-commit-config.yaml
File metadata and controls
111 lines (100 loc) · 3.38 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# .pre-commit-config.yaml — DevRail pre-commit hooks
# Install: make install-hooks
# Docs: https://pre-commit.com/
repos:
# --- Conventional Commits ---
# Enforces type(scope): description format on commit messages
- repo: https://github.com/devrail-dev/pre-commit-conventional-commits
rev: v1.1.0
hooks:
- id: conventional-commits
# --- Python (uncomment if languages includes python) ---
# Linting and formatting with ruff — fast, unified Python tooling
# - repo: https://github.com/astral-sh/ruff-pre-commit
# rev: v0.9.7
# hooks:
# - id: ruff
# args: [--fix]
# - id: ruff-format
# --- Bash (uncomment if languages includes bash) ---
# Static analysis for shell scripts
# - repo: https://github.com/shellcheck-py/shellcheck-py
# rev: v0.10.0.1
# hooks:
# - id: shellcheck
# Consistent shell script formatting
# - repo: https://github.com/scop/pre-commit-shfmt
# rev: v3.9.0-1
# hooks:
# - id: shfmt
# args: [--diff]
# --- Terraform (uncomment if languages includes terraform) ---
# Terraform formatting and linting
# - repo: https://github.com/antonbabenko/pre-commit-terraform
# rev: v1.96.3
# hooks:
# - id: terraform_fmt
# - id: terraform_tflint
# # Uncomment if using Terragrunt:
# # - id: terragrunt_fmt
# --- Ruby (uncomment if languages includes ruby) ---
# Linting and formatting with rubocop
# - repo: https://github.com/rubocop/rubocop
# rev: v1.73.2
# hooks:
# - id: rubocop
# --- Go (uncomment if languages includes go) ---
# Linting with golangci-lint v2
# - repo: https://github.com/golangci/golangci-lint
# rev: v2.1.6
# hooks:
# - id: golangci-lint-full
# --- JavaScript/TypeScript (uncomment if languages includes javascript) ---
# Linting with ESLint v9 (flat config)
# - repo: https://github.com/pre-commit/mirrors-eslint
# rev: v9.27.0
# hooks:
# - id: eslint
# additional_dependencies:
# - eslint
# - "@eslint/js"
# - typescript-eslint
# - typescript
# Formatting with Prettier
# - repo: https://github.com/pre-commit/mirrors-prettier
# rev: v4.0.0-alpha.8
# hooks:
# - id: prettier
# --- Rust (uncomment if languages includes rust) ---
# Formatting and linting with cargo
# - repo: https://github.com/AndrejOrsula/pre-commit-cargo
# rev: v0.4.0
# hooks:
# - id: cargo-fmt
# args: ["--all", "--", "--check"]
# - id: cargo-clippy
# args: ["--all-targets", "--all-features", "--workspace", "--", "-D", "warnings"]
# --- Secret Detection ---
# Detects hardcoded secrets, API keys, and credentials in code
- repo: https://github.com/gitleaks/gitleaks
rev: v8.22.1
hooks:
- id: gitleaks
# --- Terraform Docs (uncomment if languages includes terraform) ---
# Auto-generates README documentation for Terraform modules
# - repo: https://github.com/terraform-docs/terraform-docs
# rev: v0.19.0
# hooks:
# - id: terraform-docs-go
# args: [--output-file, README.md]
# --- Pre-Push: Full Check Gate ---
# Runs make check before every push. Skip with: git push --no-verify
- repo: local
hooks:
- id: make-check
name: make check
entry: make check
language: system
always_run: true
pass_filenames: false
stages: [pre-push]