-
Notifications
You must be signed in to change notification settings - Fork 36
/
.golangci.yml
132 lines (128 loc) · 3.15 KB
/
.golangci.yml
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
run:
timeout: 5m
modules-download-mode: readonly
go: "1.20"
issues:
# Enable all checks (which was as default disabled e.g. comments).
exclude-use-default: false
exclude-rules:
# Documenting comments are not required except on packages.
- linters:
- golint
text: exported (function|method) .*? should have comment or be unexported
- linters:
- golint
text: exported const .*? should have comment (\(or a comment on this block\) )?or be unexported
- linters:
- golint
text: exported type .*? should have comment or be unexported
# Stylecheck checks if at least one file has package comment but it's not required on all of them.
- linters:
- golint
text: package comment should be of the form "Package .*? ..."
- linters:
- revive
text: package-comments
- linters:
- stylecheck
text: ST1000
- linters:
- gocritic
text: whyNoLint
# Value 0 means show all.
max-issues-per-linter: 0
max-same-issues: 0
linters-settings:
goimports:
# Put imports beginning with prefix after 3rd-party packages,
# it's a comma-separated list of prefixes.
local-prefixes: github.com/OpenSLO/oslo
golint:
min-confidence: 0
govet:
# Report about shadowed variables.
check-shadowing: true
lll:
line-length: 120
gocritic:
enabled-tags:
- diagnostic
- opinionated
- style
exhaustive:
# In switch statement treat label default: as being exhaustive.
default-signifies-exhaustive: true
misspell:
locale: US
forbidigo:
forbid:
- ^ioutil\..*$ # Package ioutil is deprecated.
gci:
sections:
- standard # Captures all standard packages if they do not match another section.
- default # Contains all imports that could not be matched to another section type.
- prefix(github.com/OpenSLO/oslo) # Groups all imports with the specified Prefix.
revive:
rules:
- name: package-comments
severity: ok
linters:
# Please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint.
disable-all: true
enable:
# All linters from list https://golangci-lint.run/usage/linters/ are specifed here and explicit enable/disable.
- asciicheck
- bodyclose
- cyclop
- dogsled
- dupl
- durationcheck
- errcheck
- errorlint
- exhaustive
- exportloopref
- forbidigo
- gci
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- godox
- gofmt
- gofumpt
- goheader
- goimports
- goprintffuncname
- gosec
- gosimple
- govet
- importas
- ineffassign
- lll
- makezero
- misspell
- nakedret
- nestif
- nilerr
- noctx
- nolintlint
- paralleltest
- prealloc
- predeclared
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- stylecheck
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- unused
- wastedassign
- whitespace