This repository has been archived by the owner on Jun 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.golangci.yml
128 lines (121 loc) · 3.32 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
# This is the configuration file for golangci-lint.
# Options for analysis running.
run:
# Which files to skip: they will be analyzed, but issues from them won't be reported.
# Default value is empty list,
# but there is no need to include all autogenerated files,
# we confidently recognize autogenerated files.
# If it's not please let us know.
# "/" will be replaced by current OS file path separator to properly work on Windows.
skip-files:
- main.go
linters-settings:
goconst:
# Minimal length of string constant.
# Default: 3
min-len: 2
# Minimum occurrences of constant string count to trigger issue.
# Default: 3
min-occurrences: 3
goimports:
# Put imports beginning with prefix after 3rd-party packages.
# It's a comma-separated list of prefixes.
# Default: ""
local-prefixes: github.com/gardener/potter-controller
gocritic:
# Which checks should be disabled; can't be combined with 'enabled-checks'.
# Default: []
disabled-checks:
- wrapperFunc
- dupImport # https://github.com/go-critic/go-critic/issues/845
- ifElseChain
- unnamedResult
- httpNoBody
- redundantSprint
- deferInLoop
- appendAssign
- stringXbytes
- dynamicFmtString
- ioutilDeprecated
- whyNoLint
- timeCmpSimplify
- todoCommentWithoutDetail
- rangeValCopy
- sloppyReassign
- typeDefFirst
# Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks.
# See https://github.com/go-critic/go-critic#usage -> section "Tags".
# Default: []
enabled-tags:
- diagnostic
- style
- performance
- experimental
- opinionated
govet:
# Report about shadowed variables.
# Default: false
check-shadowing: true
misspell:
# Correct spellings using locale preferences for US or UK.
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
# Default is to use a neutral variety of English.
locale: US
linters:
# For a list of all supported linters, go here: https://github.com/golangci/golangci-lint#supported-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:
- bodyclose
- deadcode
- errcheck
- gochecknoglobals
- gochecknoinits
- goconst
- gocritic
#- goimports
#- golint
#- gosec
#- gosimple
- govet
- ineffassign
- interfacer
- misspell
- nakedret
- scopelint
#- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
#- whitespace
# Don't enable
#- depguard
#- dogsled
#- dupl
#- funlen
#- gocognit
#- gocyclo
#- godox
#- gofmt
#- lll
#- maligned
#- prealloc
#- wsl
issues:
exclude-rules:
- path: _test\.go
linters:
- gosec
- path: api/
linters:
- gochecknoglobals
- gochecknoinits
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-issues-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0