-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yaml
More file actions
172 lines (169 loc) · 3.94 KB
/
Copy path.golangci.yaml
File metadata and controls
172 lines (169 loc) · 3.94 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
164
165
166
167
168
169
170
171
version: "2"
run:
modules-download-mode: readonly
issues:
max-issues-per-linter: 0
max-same-issues: 0
linters:
default: all
enable:
- gomodguard_v2
disable:
- gomodguard
- gocognit
- gocyclo
- cyclop
- depguard
- dogsled
- dupl
- dupword
- nlreturn
- err113
- funcorder
- funlen
- interfacebloat
- noinlineerr
- varnamelen
- wrapcheck
- wsl
- wsl_v5
- godox
exclusions:
rules:
- path: _test\.go$
linters:
- goconst
settings:
gosec:
config:
G301: "0755"
G302: "0644"
G306: "0644"
excludes:
- G117
govet:
enable-all: true
disable:
- fieldalignment
settings:
shadow:
strict: true
nolintlint:
require-explanation: true
require-specific: true
revive:
enable-all-rules: true
rules:
- name: exported
severity: warning
disabled: false
exclude: [""]
arguments:
- "disable-checks-on-constants"
- "disable-checks-on-functions"
- "disable-checks-on-methods"
- "disable-checks-on-types"
- "disable-checks-on-variables"
- name: unused-receiver
disabled: true
- name: add-constant
disabled: true
- name: argument-limit
disabled: true
- name: cognitive-complexity
disabled: true
- name: confusing-naming
disabled: true
- name: confusing-results
disabled: true
- name: cyclomatic
disabled: true
- name: enforce-switch-style
disabled: true
- name: package-naming
exclude: [
"**/internal/model/cve_v5/cve_v5.go",
"**/internal/model/cvss_v4_0/cvss_v4_0.go",
"**/internal/model/cvss_v3_x/cvss_v3_x.go",
"**/internal/model/cvss_v2_0/cvss_v2_0.go",
]
- name: flag-parameter
disabled: true
- name: function-length
disabled: true
- name: function-result-limit
disabled: true
- name: line-length-limit
disabled: true
- name: max-public-structs
disabled: true
- name: nested-structs
disabled: true
- name: package-comments
disabled: true
- name: struct-tag
arguments:
- mapstructure,omitzero,remain
- yaml,omitzero,remain
- name: unchecked-type-assertion
arguments:
- accept-ignored-assertion-result: true
- name: var-naming
exclude: [
"**/internal/model/cve_v5/cve_v5.go",
"**/internal/model/cvss_v4_0/cvss_v4_0.go",
"**/internal/model/cvss_v3_x/cvss_v3_x.go",
"**/internal/model/cvss_v2_0/cvss_v2_0.go",
]
arguments:
- ["ID", "CVEV5", "CVSSV4_0", "CVSSV3_x", "CVSSV3_1", "CVSSV3_0", "CVSSV2_0"]
- []
- - skip-initialism-name-checks: false
- name: unhandled-error
arguments:
- "^fmt\\.Printf$"
- "^fmt\\.Println$"
- "^fmt\\.Fprintf$"
- "^fmt\\.Print$"
- "^strings\\.Builder\\.WriteString$"
- "^strings\\.Builder\\.Write$"
- "^strings\\.Builder\\.WriteByte$"
- "^strings\\.Builder\\.WriteRune$"
tagliatelle:
case:
rules:
json: snake
yaml: camel
xml: camel
toml: snake
bson: camel
avro: snake
header: snake
mapstructure: snake
env: upperSnake
envconfig: upperSnake
ignored-fields:
- CollectionURL
- CVSSV4_0
- CVSSV3_x
- CVSSV3_1
- CVSSV3_0
- CVSSV2_0
exhaustruct:
include:
- "github.com/github.com/gardenlinux/glvd2"
formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
- golines
- swaggo
settings:
gofumpt:
extra-rules: true
golines:
max-len: 120
shorten-comments: true
reformat-tags: false