open-consul/.golangci.yml
Daniel Nephin ea6c2b2adc ci: Add staticcheck and fix most errors
Three of the checks are temporarily disabled to limit the size of the
diff, and allow us to enable all the other checks in CI.

In a follow up we can fix the issues reported by the other checks one
at a time, and enable them.
2020-05-28 11:59:58 -04:00

34 lines
777 B
YAML

linters:
disable-all: true
enable:
- gofmt
- govet
- unconvert
- staticcheck
issues:
# Disable the default exclude list so that all excludes are explicitly
# defined in this file.
exclude-use-default: false
exclude-rules:
# Temp Ignore SA9004: only the first constant in this group has an explicit type
# https://staticcheck.io/docs/checks#SA9004
- linters: [staticcheck]
text: "SA9004:"
# Temp ignore SA4006: this value of `x` is never used
- linters: [staticcheck]
text: "SA4006:"
# Temp ignore SA2002: the goroutine calls T.Fatalf, which must be called in the same goroutine as the test
- linters: [staticcheck]
text: "SA2002:"
linters-settings:
gofmt:
simplify: false
run:
timeout: 5m