forked from netbox-community/netbox-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
48 lines (48 loc) 路 1.26 KB
/
.pre-commit-config.yaml
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
default_stages: [commit]
minimum_pre_commit_version: 1.15.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
# Git state
- id: check-merge-conflict
- id: check-added-large-files
args:
- --maxkb=1000
# Sensitive information
- id: detect-private-key
- id: detect-aws-credentials
args:
- --allow-missing-credentials
# Generic file state
- id: trailing-whitespace
- id: mixed-line-ending
- id: end-of-file-fixer
exclude: .*\.tfvars$ # terraform fmt separates everything with blank lines leaving a trailing line at the end
- id: check-executables-have-shebangs
- id: check-symlinks
exclude: terraform.d
# Language syntax/formatting
- id: check-yaml
args:
- --allow-multiple-documents
- --unsafe
- id: check-json
- id: pretty-format-json
args:
- --autofix
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.74.1
hooks:
- id: terraform_fmt
- id: terraform_docs
- id: terraform_providers_lock
args:
- '--args=-platform=linux_amd64'
- '--args=-platform=darwin_amd64'
- '--args=-platform=darwin_arm64'
- repo: https://github.com/mattlqx/pre-commit-sign
rev: v1.1.3
hooks:
- id: sign-commit
language_version: 2.7.2