-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
80 lines (73 loc) · 2.24 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
80 lines (73 loc) · 2.24 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
70
71
72
73
74
75
76
77
78
79
80
---
# Pre-commit configuration for dwpk.
# Install with: pip install pre-commit && pre-commit install --install-hooks --hook-type pre-commit --hook-type commit-msg
# Run on demand with: pre-commit run --all-files
default_install_hook_types:
- pre-commit
- commit-msg
repos:
# Generic file hygiene
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude: ^dist/chart/templates/
- id: end-of-file-fixer
exclude: ^dist/chart/templates/
- id: check-yaml
args: [--allow-multiple-documents]
# Helm templates aren't valid standalone YAML (Go template syntax);
# `helm lint` below is the real check for those.
exclude: ^dist/chart/templates/
- id: check-added-large-files
args: [--maxkb=1024]
- id: check-merge-conflict
- id: check-case-conflict
- id: detect-private-key
- id: mixed-line-ending
- id: check-symlinks
- id: check-executables-have-shebangs
# Go linting, matches the `make lint` target used in CI
- repo: https://github.com/golangci/golangci-lint
rev: v2.13.1
hooks:
- id: golangci-lint-full
# Secret scanning
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.1
hooks:
- id: gitleaks
# Keep dist/chart/README.md in sync with values.yaml/Chart.yaml
- repo: https://github.com/norwoodj/helm-docs
rev: v1.14.2
hooks:
- id: helm-docs-built
args: ["--chart-search-root=dist/chart"]
# Conventional commit messages
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: []
# Project-local checks that need the repo's own toolchain
- repo: local
hooks:
- id: go-fmt
name: go fmt
entry: gofmt -l
language: system
types: [go]
exclude: zz_generated
- id: go-vet
name: go vet
entry: go vet ./...
language: system
types: [go]
pass_filenames: false
- id: helm-lint
name: helm lint dist/chart
entry: helm lint dist/chart
language: system
files: ^dist/chart/
pass_filenames: false