-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.pre-commit-config.yaml
120 lines (115 loc) · 3.34 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
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
112
113
114
115
116
117
118
119
120
# SPDX-FileCopyrightText: Copyright (C) Nicolas Lamirault <[email protected]>
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyrigh (C) Nicolas Lamirault <[email protected]>
# SPDX-License-Identifier: Apache-2.0
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_install_hook_types:
- pre-commit
- pre-push
- commit-msg
default_stages:
- pre-commit
- pre-push
- commit-msg
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
stages: [pre-commit]
- id: debug-statements
stages: [pre-commit]
- id: check-builtin-literals
stages: [pre-commit]
- id: check-added-large-files
stages: [pre-commit]
- id: check-executables-have-shebangs
stages: [pre-commit]
- id: check-toml
stages: [pre-commit]
- id: check-xml
stages: [pre-commit]
# - id: check-yaml
# args:
# - '--allow-multiple-documents'
# exclude: >
# mkdocs.yml
# gitops/argocd/charts/core/infra
# gitops/argocd/charts/.*/.*/templates/*.*
- id: check-json
stages: [pre-commit]
- id: detect-private-key
stages: [pre-commit]
- id: end-of-file-fixer
stages: [pre-commit]
- id: mixed-line-ending
stages: [pre-commit]
- id: trailing-whitespace
stages: [pre-commit]
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.0.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: [--strict, --force-scope, build, chore, ci, docs, refactor, perf, test]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
stages: [pre-commit]
files: (Makefile|Gemfile|\.mk|\.yaml|\.yml|\.tf|\.hcl|\.ini|\.rb|\.toml|\.sh)
exclude: ^\.secrets/.*$|^\.git-crypt/.*$
args:
- --license-filepath
- hack/config/LICENSE
# - --remove-header
- id: insert-license
stages: [pre-commit]
description: Insert license header into Jinja templates
files: (\.tpl)
exclude: ^\.secrets/.*$|^\.git-crypt/.*$
args:
- --license-filepath
- hack/config/LICENSE
- --comment-style
- "{{/*||*/}}"
# - --remove-header
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: shellcheck
stages: [pre-commit]
exclude: hack/hooks/pre-commit.git-crypt.sh
- id: shfmt
stages: [pre-commit]
args: ["-i 4"]
# - repo: https://github.com/adrienverge/yamllint.git
# rev: v1.35.1
# hooks:
# - id: yamllint
# stages: [pre-commit]
# # exclude:
# # ^gitops/(?:templates|files)/.*\.yaml
# - repo: https://github.com/google/yamlfmt
# rev: v0.10.0
# hooks:
# - id: yamlfmt
# stages: [commit]
# language: system
- repo: https://github.com/spinergie/pre-commit-dprint
rev: v0.45.0
hooks:
- id: dprint
stages: [pre-commit]
# - repo: local
# hooks:
# - id: trufflehog
# name: TruffleHog
# description: Detect secrets in your data.
# entry: bash -c 'trufflehog git file://. --since-commit HEAD --only-verified --fail'
# # For running trufflehog in docker, use the following entry instead:
# # entry: bash -c 'docker run --rm -v "$(pwd):/workdir" -i --rm trufflesecurity/trufflehog:latest git file:///workdir --since-commit HEAD --only-verified --fail'
# language: system
# stages: ["commit", "push"]