-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
61 lines (54 loc) · 1.77 KB
/
.golangci.yml
File metadata and controls
61 lines (54 loc) · 1.77 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
run:
timeout: 5m
tests: true
modules-download-mode: readonly
linters:
enable:
- errcheck # Check for unchecked errors
- gosimple # Simplify code
- govet # Reports suspicious constructs
- ineffassign # Detect ineffectual assignments
- staticcheck # Go static analysis
- unused # Check for unused code
- gofmt # Check code formatting
- goimports # Check import formatting
- misspell # Find commonly misspelled words
- revive # Fast, configurable, extensible linter
- gosec # Security problems
- bodyclose # Check HTTP response body is closed
- unconvert # Remove unnecessary type conversions
- unparam # Unused function parameters
disable:
- typecheck # Disable typecheck as it has issues with import resolution
linters-settings:
errcheck:
check-type-assertions: true
check-blank: true
govet:
enable-all: true
disable:
- fieldalignment # Ignore struct field alignment optimization
revive:
rules:
- name: exported
disabled: false
arguments:
- "disableStutteringCheck"
gosec:
excludes:
- G104 # Audit errors not checked (covered by errcheck)
issues:
exclude-rules:
# Exclude test files from certain checks
- path: _test\.go
linters:
- errcheck # Tests often intentionally ignore errors
- gosec # Security checks less critical in tests
- unused # Test helpers and fixtures may appear unused
- unparam # Test functions often have unused parameters
# Exclude typecheck errors for import issues
- linters:
- typecheck
text: "could not import|undefined:"
max-issues-per-linter: 0
max-same-issues: 0