-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
69 lines (63 loc) · 1.89 KB
/
.pre-commit-config.yaml
File metadata and controls
69 lines (63 loc) · 1.89 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 configuration for terraform-provider-pocketid
# See https://pre-commit.com for more information
repos:
# General file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-added-large-files
args: ['--maxkb=500']
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: mixed-line-ending
# Go specific hooks
- repo: https://github.com/TekWizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
- id: go-fmt
- id: go-vet-mod
- id: go-mod-tidy
- id: go-test-mod
args: ['-timeout=5m']
- id: go-build-mod
- id: golangci-lint-mod
args: ['--timeout=5m']
# Security scanning
- repo: https://github.com/trufflesecurity/trufflehog
rev: v3.89.2
hooks:
- id: trufflehog
name: TruffleHog
description: Detect secrets in your data.
entry: bash -c 'trufflehog git file://. --since-commit HEAD --only-verified --fail'
language: system
stages: ["pre-commit", "pre-push"]
# Terraform/HCL formatting
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.99.4
hooks:
- id: terraform_fmt
args:
- --args=-recursive
# Markdown linting
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.15.0
hooks:
- id: markdownlint-cli2
args: ['--fix']
# Commit message validation
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.2.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: [feat, fix, docs, style, refactor, test, chore, ci, build]
# Global configuration
fail_fast: false
minimum_pre_commit_version: "3.0.0"