@@ -64,7 +64,7 @@ linters:
6464 - unconvert # Remove unnecessary type conversions
6565 - wastedassign # wastedassign finds wasted assignment statements.
6666 - godox # tool for detection of FIXME, TODO and other comment keywords
67- - revive # avoid bad imports
67+ - gomodguard # check for blocked dependencies
6868
6969# all available settings of specific linters
7070linters-settings :
@@ -137,22 +137,31 @@ linters-settings:
137137 # Enable to require nolint directives to mention the specific linter being suppressed. Default is false.
138138 require-specific : true
139139
140- revive :
141- enable-all-rules : false
142- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
143- rules :
144- - name : imports-blacklist
145- arguments :
146- - github.com/pkg/errors
147- - github.com/elastic/beats/v7
140+ gomodguard :
141+ blocked :
142+ # List of blocked modules.
143+ modules :
144+ # Blocked module.
145+ - github.com/pkg/errors :
146+ # Recommended modules that should be used instead. (Optional)
147+ recommendations :
148+ - errors
149+ - fmt
150+ reason : " This package is deprecated"
151+ - github.com/elastic/beats/v7 :
152+ reason : " There must be no Beats dependency"
148153
149154 staticcheck :
150155 # Select the Go version to target. The default is '1.13'.
151156 go : " 1.17.6"
157+ # https://staticcheck.io/docs/options#checks
158+ checks : ["all"]
152159
153160 stylecheck :
154161 # Select the Go version to target. The default is '1.13'.
155162 go : " 1.17.6"
163+ # https://staticcheck.io/docs/options#checks
164+ checks : ["all"]
156165
157166 unparam :
158167 # Inspect exported functions, default is false. Set to true if no external program/library imports your code.
0 commit comments