@@ -90,9 +90,6 @@ linters-settings:
9090# - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
9191# - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
9292# - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
93- golint :
94- # minimal confidence for issues, default is 0.8
95- # min-confidence: 0.8
9693 gofmt :
9794 # simplify code: gofmt with `-s` option, true by default
9895# simplify: true
@@ -119,11 +116,19 @@ linters-settings:
119116 include-go-root : false
120117 packages :
121118 - github.com/magiconair/properties/assert
122- - gopkg.in/go-playground/assert.v1
123- - github.com/pborman/uuid # replace with github.com/google/uuid
124119 inTests :
125120 - github.com/davecgh/go-spew/spew
126121 - github.com/stretchr/testify
122+ gomodguard :
123+ blocked :
124+ modules :
125+ - gopkg.in/go-playground/assert.v1 :
126+ recommendations :
127+ - github.com/stretchr/testify
128+ reason : " testify is the test assertion framework we use"
129+ - github.com/pborman/uuid :
130+ recommendations :
131+ - github.com/google/uuid
127132 misspell :
128133 # Correct spellings using locale preferences for US or UK.
129134 # Default is to use a neutral variety of English.
@@ -201,25 +206,44 @@ linters:
201206 - depguard
202207# # - dogsled # checks for too many blank identifiers. don't care
203208 - dupl
209+ - errorlint
210+ # - exhaustive
211+ # - exhaustivestruct
212+ - exportloopref
204213# # - funlen # checks function length. don't care
214+ # - gci
205215# # - gochecknoglobals # too common
206216 - gochecknoinits
217+ - gocognit
207218 - goconst
208219 - gocritic
209220# # - gocyclo # checks cyclomatic complexity. don't care
221+ # - godot
210222# # - godox # checks for TODO comments. not standardized
223+ - goerr113
211224# # - gofmt # checks code is formatted, handled by make prep
225+ # - gofumpt
226+ # - goheader
212227# # - goimports # checks import order. We're not using goimports
213- - golint
228+ - revive
229+ # - gomnd
230+ - gomodguard
231+ - goprintffuncname
214232 - gosec
215- - interfacer
216233# # - lll # checks line length. not enforced
217234# # - maligned # optimizies struct field order, but structs are usually ordered for legibility
218235 - misspell
219236 - nakedret
237+ - nestif
238+ # - nlreturn # don't really like how this looks in all cases. wsl covers similar ground anyway.
239+ - noctx
240+ - nolintlint
220241# - prealloc # slice optimizations, but promotes too much premature optimization
221- - scopelint
242+ - rowserrcheck
243+ - exportloopref
222244 - stylecheck
245+ # - testpackage
246+ - tparallel
223247 - unconvert
224248# # - unparam # too many false positives
225249# # - whitespace # not enforced
@@ -235,8 +259,10 @@ issues:
235259 # But independently from this option we use default exclude patterns,
236260 # it can be disabled by `exclude-use-default: false`. To list all
237261 # excluded by default patterns execute `golangci-lint run --help`
238- # exclude:
239- # - abcdef
262+ exclude :
263+ - Error return value of .(.*\.Write). is not checked
264+ # we use merry errors a lot, and goerr113 doesn't recognize it as a valid sentinel error
265+ - use wrapped static errors instead
240266
241267 # Excluding configuration per-path, per-linter, per-text and per-source
242268 exclude-rules :
@@ -250,11 +276,17 @@ issues:
250276 - scopelint
251277 - gochecknoinits
252278 - gochecknoglobals
279+ - wsl
280+ - goconst
253281 - path : cmd
254282 linters :
255283 # init() functions are pretty common in main packages
256284 - gochecknoinits
257285 - gochecknoglobals
286+ # exclude requiring comments on all exported stuff
287+ - linters :
288+ - revive
289+ text : " exported:"
258290
259291 # Exclude known linters from partially hard-vendored code,
260292 # which is impossible to exclude via "nolint" comments.
0 commit comments