-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.golangci.yml
100 lines (97 loc) · 2.58 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
run:
timeout: 5m
modules-download-mode: readonly
skip-dirs-use-default: true
issues:
# Enable all checks (which was as default disabled e.g. comments).
exclude-use-default: false
exclude-rules:
- linters:
- revive
text: exported (function|method|type) .*? should have comment or be unexported
- linters:
- revive
text: exported (const|var) .*? should have comment (\(or a comment on this block\) )?or be unexported
- linters:
- revive
text: "if-return: redundant if ...; err != nil check, just return error instead."
- linters:
- revive
text: "^var-naming: .*"
- linters:
- revive
text: "error-strings: error strings should not be capitalized or end with punctuation or a newline"
# 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/nobl9/sloctl
govet:
# False positives and reporting on error shadowing (which is intended).
# Quoting Robi Pike:
# The shadow code is marked experimental.
# It has too many false positives to be enabled by default, so this is not entirely unexpected,
# but don't expect a fix soon. The right way to detect shadowing without flow analysis is elusive.
# Few years later (comment from 2015) and the Shadow analyer is still experimental...
check-shadowing: false
lll:
line-length: 120
gocritic:
enabled-tags:
- opinionated
disabled-checks:
- singleCaseSwitch
exhaustive:
# In switch statement treat label default: as being exhaustive.
default-signifies-exhaustive: true
misspell:
locale: US
gocognit:
min-complexity: 30
revive:
rules:
- name: unused-parameter
disabled: true
linters:
disable-all: true
enable:
# All linters from list https://golangci-lint.run/usage/linters/ are speciefed here and explicit enable/disable.
- asciicheck
- bodyclose
- dogsled
- errcheck
- exhaustive
- copyloopvar
- gochecknoinits
- gocognit
- gocritic
- gocyclo
- gofmt
- goheader
- goimports
- goprintffuncname
- gosimple
- govet
- importas
- ineffassign
- lll
- makezero
- misspell
- nakedret
- nilerr
- prealloc
- predeclared
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- tparallel
- typecheck
- unconvert
- unparam
- unused
- wastedassign
- whitespace