-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
100 lines (89 loc) · 2.35 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
linters:
disable-all: true
enable:
- errcheck
- goimports
- revive
- gosimple
- govet
- ineffassign
- lll
- misspell
- staticcheck
- typecheck
- unconvert
- unparam
- unused
- whitespace
- wsl
# - godot
# don't enable:
# - gochecknoglobals
# - gocognit
# - godox
# - maligned
# - prealloc
# output configuration options
output:
# print lines of code with issue, default is true
print-issued-lines: true
# print linter name in the end of issue text, default is true
print-linter-name: true
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.50.1 # use the fixed version to not introduce new linters unexpectedly
linters-settings:
errcheck:
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default.
check-blank: true
govet:
# report about shadowed variables
check-shadowing: true
revive:
# see https://github.com/mgechev/revive#available-rules for details.
ignore-generated-header: true
severity: warning
confidence: 0.8
rules:
- name: indent-error-flow
severity: warning
- name: errorf
severity: warning
- name: context-as-argument
severity: warning
- name: exported
severity: warning
- name: error-naming
severity: warning
- name: increment-decrement
severity: warning
- name: receiver-naming
severity: warning
- name: superfluous-else
severity: warning
- name: useless-break
severity: warning
- name: defer
severity: warning
- name: identical-branches
severity: warning
- name: early-return
severity: warning
- name: unnecessary-stmt
severity: warning
- name: unreachable-code
severity: warning
- name: confusing-naming
severity: warning
staticcheck:
# Select the Go version to target. The default is '1.13'.
go: "1.19"
# https://staticcheck.io/docs/options#checks
checks: [ "all" ]
issues:
exclude-use-default: false # this one is used due to golangci v1 blocking revive linter exported rule, this should be fixed in v2
godot:
period: true
capital: true