1
1
linters-settings :
2
2
depguard :
3
- list-type : blacklist
4
- packages :
5
- - github.com/jenkins-x/jx/v2/pkg/log/
6
- - github.com/satori/go.uuid
7
- - github.com/pborman/uuid
8
- packages-with-error-message :
9
- - github.com/jenkins-x/jx/v2/pkg/log/ : " use jenkins-x/jx-logging instead"
10
- - github.com/satori/go.uuid : " use github.com/google/uuid instead"
11
- - github.com/pborman/uuid : " use github.com/google/uuid instead"
3
+ rules :
4
+ # Name of a rule.
5
+ Main :
6
+ list-mode : lax
7
+ deny :
8
+ - pkg : github.com/jenkins-x/jx/v2/pkg/log/
9
+ desc : " use jenkins-x/jx-logging instead"
10
+ - pkg : github.com/satori/go.uuid
11
+ desc : " use github.com/google/uuid instead"
12
+ - pkg : github.com/pborman/uuid
13
+ desc : " use github.com/google/uuid instead"
12
14
dupl :
13
15
threshold : 100
14
16
exhaustive :
@@ -37,17 +39,14 @@ linters-settings:
37
39
gocyclo :
38
40
min-complexity : 15
39
41
goimports : {}
40
- golint :
41
- min- confidence : 0
42
+ revive :
43
+ confidence : 0
42
44
gofmt :
43
45
simplify : true
44
- gomnd :
45
- settings :
46
- mnd :
47
- # don't include the "operation" and "assign"
48
- checks : [argument, case, condition, return]
46
+ mnd :
47
+ # don't include the "operation" and "assign"
48
+ checks : [argument, case, condition, return]
49
49
govet :
50
- check-shadowing : true
51
50
settings :
52
51
printf :
53
52
funcs :
@@ -58,11 +57,8 @@ linters-settings:
58
57
- (github.com/jenkins-x/jx-logging/v3/pkg/log/Logger()).Fatalf
59
58
lll :
60
59
line-length : 140
61
- maligned :
62
- suggest-new : true
63
60
misspell : {}
64
61
nolintlint :
65
- allow-leading-space : true # don't require machine-readable nolint directives (i.e. with no leading space)
66
62
allow-unused : false # report any unused nolint directives
67
63
require-explanation : false # don't require an explanation for nolint directives
68
64
require-specific : false # don't require nolint directives to be specific about which linter is being skipped
@@ -102,17 +98,17 @@ issues:
102
98
- linters :
103
99
- gocritic
104
100
text : " unnecessaryDefer:"
101
+ - path : scm/driver/ # The drivers mostly implement interfaces and often the methods don't need all parameters
102
+ text : " unused-parameter"
103
+ linters :
104
+ - revive
105
105
exclude :
106
106
- ' shadow: declaration of "err" shadows declaration at'
107
107
max-same-issues : 0
108
+ exclude-dirs :
109
+ - cmd/docs
108
110
109
111
run :
110
112
timeout : 30m
111
- skip-dirs :
112
- - cmd/docs
113
113
# golangci.com configuration
114
114
# https://github.com/golangci/golangci/wiki/Configuration
115
- service :
116
- golangci-lint-version : 1.42.x # use the fixed version to not introduce new linters unexpectedly
117
- prepare :
118
- - echo "here I can run custom commands, but no preparation needed for this repo"
0 commit comments