This repository was archived by the owner on Nov 15, 2026. It is now read-only.
Repository navigation
Expand file tree
/
Copy path.golangci.yml
More file actions
163 lines (163 loc) · 3.53 KB
/
Copy path.golangci.yml
File metadata and controls
163 lines (163 loc) · 3.53 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
version: "2"
run:
modules-download-mode: readonly
linters:
enable:
- bodyclose
- copyloopvar
- depguard
- dogsled
- dupl
- errcheck
- errorlint
- exhaustive
- funlen
- gochecknoinits
- goconst
- gocritic
- gocyclo
- godot
- goprintffuncname
- gosec
- ineffassign
- lll
- misspell
- nakedret
- nestif
- noctx
- nolintlint
- prealloc
- predeclared
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- thelper
- tparallel
- unconvert
- unparam
- unused
- wastedassign
- whitespace
settings:
gocritic:
disabled-checks:
- exitAfterDefer
dupl:
threshold: 100
errcheck:
check-type-assertions: true
check-blank: false
funlen:
lines: 170
statements: 80
gocyclo:
min-complexity: 15
goconst:
min-len: 3
min-occurrences: 5
lll:
line-length: 140
misspell:
locale: US
nestif:
min-complexity: 5
nolintlint:
require-explanation: true
require-specific: true
gosec:
excludes:
- G104
revive:
severity: warning
confidence: 0.8
rules:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
- name: empty-block
- name: superfluous-else
- name: unused-parameter
- name: unreachable-code
- name: redefines-builtin-id
- name: modifies-value-receiver
- name: waitgroup-by-value
- name: atomic
- name: range-val-in-closure
- name: range-val-address
- name: constant-logical-expr
- name: identical-branches
- name: unconditional-recursion
- name: duplicated-imports
- name: unhandled-error
arguments:
- "fmt.Printf"
- "fmt.Println"
- "fmt.Print"
depguard:
rules:
main:
deny:
- pkg: "io/ioutil"
desc: "Deprecated: use io and os packages instead"
- pkg: "github.com/pkg/errors"
desc: "Use fmt.Errorf with %w instead"
govet:
disable:
- fieldalignment
enable-all: true
exclusions:
rules:
# Relax rules for test files
- linters:
- dupl
- funlen
- goconst
- gocyclo
- gosec
- errcheck
- errorlint
- gocritic
- revive
- dogsled
- staticcheck
- nestif
path: _test\.go
# Tool registration follows intentional repetitive pattern
- linters:
- dupl
path: pkg/tools/
# Write methods follow intentional read-modify-write pattern
- linters:
- dupl
path: pkg/client/write\.go
# Package name is intentional
- linters:
- revive
path: pkg/types/
issues:
max-issues-per-linter: 0
max-same-issues: 0
formatters:
enable:
- gofmt
- goimports
settings:
goimports:
local-prefixes:
- github.com/txn2/mcp-datahub