Skip to content

Commit 1ea5855

Browse files
syscod3claude
andcommitted
chore: pre-commit hooks + golangci tuning
- gitleaks, commitizen, golangci-lint hooks - add gosec (medium severity) to linters - set goimports local-prefix for syscode-labs imports Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 07709c3 commit 1ea5855

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

.golangci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ linters:
2222
- unconvert
2323
- unparam
2424
- unused
25+
- gosec
2526
- logcheck
2627
settings:
28+
gosec:
29+
severity: medium
30+
confidence: medium
2731
custom:
2832
logcheck:
2933
type: "module"
@@ -53,6 +57,10 @@ formatters:
5357
enable:
5458
- gofmt
5559
- goimports
60+
settings:
61+
goimports:
62+
local-prefixes:
63+
- github.com/syscode-labs/oci-pivot-controller
5664
exclusions:
5765
generated: lax
5866
paths:

.pre-commit-config.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.6.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-json
9+
- id: mixed-line-ending
10+
11+
- repo: https://github.com/gitleaks/gitleaks
12+
rev: v8.18.4
13+
hooks:
14+
- id: gitleaks
15+
16+
- repo: local
17+
hooks:
18+
- id: golangci-lint
19+
name: golangci-lint
20+
language: system
21+
entry: golangci-lint run --fix
22+
types: [go]
23+
pass_filenames: false
24+
25+
- repo: https://github.com/commitizen-tools/commitizen
26+
rev: v4.13.9
27+
hooks:
28+
- id: commitizen
29+
stages: [commit-msg]

0 commit comments

Comments
 (0)