-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy path.golangci.yml
More file actions
88 lines (68 loc) · 2.01 KB
/
Copy path.golangci.yml
File metadata and controls
88 lines (68 loc) · 2.01 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
81
82
83
84
85
86
87
88
# HyperFleet E2E - golangci-lint configuration
# Follows HyperFleet architecture testing standards
# This file contains only configs which differ from defaults.
# All possible options can be found at https://golangci-lint.run/usage/configuration
version: 2
run:
timeout: 5m
tests: true
go: '1.25'
linters-settings:
errcheck:
check-type-assertions: true
check-blank: true
govet:
enable-all: true
goconst:
min-len: 3
min-occurrences: 3
misspell:
locale: US
lll:
line-length: 120
unused:
check-exported: false
unparam:
check-exported: false
linters:
enable:
- errcheck # Check for unchecked errors
- govet # Vet examines Go source code
- ineffassign # Detect ineffectual assignments
- staticcheck # Go static analysis
- unused # Check for unused code
- misspell # Check for misspelled words
- unconvert # Remove unnecessary type conversions
- unparam # Find unused function parameters
- gosec # Security issues
issues:
exclude-dirs:
- pkg/api # Generated code directory
exclude-rules:
# Exclude some linters from running on test files
- path: _test\.go
linters:
- gosec # Security checks less critical in tests
- errcheck # Error checking less critical in tests
- unparam # Unused params acceptable in test helpers
# Exclude linters from e2e test files (.go suffix, not _test.go)
- path: e2e/.*\.go
linters:
- errcheck # E2E tests may skip error checks for readability
- unparam # Test helpers may have unused params
# Exclude generated code
- path: pkg/api/.*\.gen\.go
linters:
- all
# Maximum issues count per one linter
max-issues-per-linter: 0
# Maximum count of issues with the same text
max-same-issues: 0
# Show only new issues
new: false
output:
formats:
colored-line-number:
path: stdout
print-issued-lines: true
print-linter-name: true