generated from pagopa/template-java-microservice
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
55 lines (54 loc) · 1.95 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
49
50
51
52
53
54
55
# 1. `pip install pre-commit`
# 2. `pre-commit install`
# 3. set GITGUARDIAN_API_KEY in your develop environment (get an api key here: https://dashboard.gitguardian.com/workspace/230910/settings/personal/personal-access-tokens)
# more info https://docs.gitguardian.com/internal-repositories-monitoring/integrations/git_hooks/pre_commit
repos:
- repo: https://github.com/gitguardian/ggshield
rev: v1.11.0
hooks:
- id: ggshield
language_version: python3
stages: [ commit ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
# Common errors
- id: end-of-file-fixer
exclude_types: [sql]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
exclude_types: [sql]
- id: check-yaml
- id: check-executables-have-shebangs
# Cross-platform
- id: check-case-conflict
- id: mixed-line-ending
args: [--fix=lf]
exclude_types: [sql]
# Security
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- id: detect-private-key
## terraform
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.77.0
hooks:
- id: terraform_fmt
- id: terraform_docs
args:
- --hook-config=--path-to-file=README.md # Valid UNIX path. I.e. ../TFDOC.md or docs/README.md etc.
- --hook-config=--add-to-existing-file=true # Boolean. true or false
- --hook-config=--create-file-if-not-exist=true # Boolean. true or false
- --args=--hide providers
# - id: terraform_tfsec
- id: terraform_validate
args:
- --args=-json
- --args=-no-color
- --args=-compact-warnings
- id: terraform_providers_lock
args:
- --args=-platform=windows_amd64
- --args=-platform=darwin_amd64
- --args=-platform=darwin_arm64
- --args=-platform=linux_amd64