-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
60 lines (55 loc) · 1.51 KB
/
.golangci.yml
File metadata and controls
60 lines (55 loc) · 1.51 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
version: "2"
run:
timeout: 5m
go: "1.25.1"
linters:
# Use fast linters for better performance
default: fast
enable:
- govet
- staticcheck
- errcheck
- gosec
- ineffassign
- unused
- contextcheck
- wsl_v5
- dupl
disable:
- cyclop # Too strict
- depguard # Allow internal imports
- err113 # Allow dynamic errors
- exhaustruct # Too strict for tests
- forcetypeassert # Allow in tests
- funcorder # Not critical
- funlen # Allow longer functions
- gocognit # Too strict
- goconst # Not critical
- godot # Not critical
- intrange # Go 1.22+ feature
- lll # Line length not critical
- mnd # Magic numbers acceptable
- nestif # Allow nested if
- nlreturn # Not critical
- noinlineerr # Allow inline errors
- paralleltest # Not critical
- perfsprint # Not critical
- revive # Too many false positives
- tagliatelle # YAML tags fine
- testpackage # Allow test packages
- usetesting # Not critical
- varnamelen # Variable names fine
- wsl # Use wsl_v5 instead
settings:
gosec:
# Allow some security warnings
excludes:
- G204 # Subprocess launched with variable - inputs are validated and sanitized
- G304 # Potential file inclusion via variable - path is validated and comes from trusted config
dupl:
# Set threshold for duplicate code detection (default is 150 tokens)
threshold: 100
formatters:
enable:
- gci
- gofmt