-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
67 lines (63 loc) · 2.04 KB
/
.pre-commit-config.yaml
File metadata and controls
67 lines (63 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
repos:
# ==========================================
# Pre-commit default hooks
# ==========================================
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
# - id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files
- id: check-vcs-permalinks
- id: check-symlinks
- id: destroyed-symlinks
- id: pretty-format-json
# ==========================================
# Golang hooks
# ==========================================
# - repo: https://github.com/TekWizely/pre-commit-golang
# rev: v1.0.0-rc.1
# hooks:
# - id: go-fmt
# args: [-w]
# - id: go-mod-tidy
# ==========================================
# Codespell
# ==========================================
# - repo: https://github.com/codespell-project/codespell
# rev: v2.2.5
# hooks:
# - id: codespell
# files: ^.*\.(py|c|h|md|rst|yml|go|sh|sql|tf|yaml)$
# args: ["--ignore-words-list", "hist,nd,templete,occured,Enchancement,worflow,environemt,Invaild,revison,pipleine,CIMetric,updte"]
# ==========================================
# Trivy secret scan
# ==========================================
- repo: local
hooks:
- id: trivy-secret-scan
name: trivy-secret-scan
entry: bash
args:
- -c
- |
if [ "$GITHUB_ACTIONS" = "true" ]; then
echo "Skipping Trivy in CI"
exit 0
else
trivy fs --scanners secret --skip-dirs .git --skip-dirs vendor --exit-code 1 --no-progress .
fi
language: system
pass_filenames: false
# ==========================================
# FIXED STYLELINT HOOK (No nodeenv)
# ==========================================
- repo: local
hooks:
- id: stylelint
name: stylelint
entry: npx stylelint --fix
language: system
types: [css, scss]
exclude: "node_modules/|dist/|build/"