-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
69 lines (62 loc) · 2.04 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
69 lines (62 loc) · 2.04 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
# Pre-commit hooks for terraform-provider-turingpi
# Install: pip install pre-commit && pre-commit install
# Run manually: pre-commit run --all-files
repos:
# General file hygiene
- 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
- id: check-json
- id: check-added-large-files
args: ['--maxkb=1024']
- id: check-merge-conflict
- id: detect-private-key
# Go formatting and linting
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:
- id: go-fmt
- id: go-vet
- id: go-mod-tidy
# golangci-lint (comprehensive Go linting)
- repo: https://github.com/golangci/golangci-lint
rev: v1.62.2
hooks:
- id: golangci-lint
args: ['--timeout=5m']
# Terraform formatting and validation
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.96.2
hooks:
- id: terraform_fmt
files: ^examples/
# terraform_validate disabled - requires provider to be installed
- id: terraform_tflint
files: ^examples/
args:
- --args=--config=__GIT_WORKING_DIR__/.tflint.hcl
- id: terraform_docs
files: ^examples/
args:
- --args=--config=.terraform-docs.yml
# Security scanning (disabled - too many false positives from test/doc passwords)
# - repo: https://github.com/Yelp/detect-secrets
# rev: v1.5.0
# hooks:
# - id: detect-secrets
# exclude: (go\.sum|\.secrets\.baseline)$
# Commit message format
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.6.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: [feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert]
# CI configuration
ci:
autofix_commit_msg: 'style: auto-fix pre-commit hooks'
autoupdate_commit_msg: 'chore: update pre-commit hooks'
skip: [go-vet, golangci-lint, terraform_validate, terraform_tflint]