2019-04-24 05:18:40 -07:00
|
|
|
run:
|
2023-04-09 00:08:40 -07:00
|
|
|
timeout: 15m
|
2021-10-22 01:26:56 -07:00
|
|
|
skip-files:
|
|
|
|
# Skip autogenerated files.
|
|
|
|
- ^.*\.(pb|y)\.go$
|
2019-04-24 05:18:40 -07:00
|
|
|
|
2021-11-10 01:29:12 -08:00
|
|
|
output:
|
|
|
|
sort-results: true
|
|
|
|
|
2020-03-23 07:32:37 -07:00
|
|
|
linters:
|
|
|
|
enable:
|
2021-06-12 03:47:47 -07:00
|
|
|
- depguard
|
2023-04-09 00:08:40 -07:00
|
|
|
- gocritic
|
2021-10-22 01:27:37 -07:00
|
|
|
- gofumpt
|
|
|
|
- goimports
|
2022-03-03 09:11:19 -08:00
|
|
|
- misspell
|
2023-05-21 00:20:07 -07:00
|
|
|
- predeclared
|
|
|
|
- revive
|
2023-04-09 00:08:40 -07:00
|
|
|
- unconvert
|
|
|
|
- unused
|
2020-03-23 07:32:37 -07:00
|
|
|
|
2019-05-03 06:11:28 -07:00
|
|
|
issues:
|
2022-04-27 02:24:36 -07:00
|
|
|
max-same-issues: 0
|
2019-05-03 06:11:28 -07:00
|
|
|
exclude-rules:
|
2023-04-09 00:08:40 -07:00
|
|
|
- linters:
|
|
|
|
- gocritic
|
|
|
|
text: "appendAssign"
|
2021-06-12 03:47:47 -07:00
|
|
|
- path: _test.go
|
|
|
|
linters:
|
|
|
|
- errcheck
|
2019-05-03 06:11:28 -07:00
|
|
|
|
|
|
|
linters-settings:
|
2020-08-21 02:37:21 -07:00
|
|
|
depguard:
|
|
|
|
list-type: blacklist
|
|
|
|
include-go-root: true
|
|
|
|
packages-with-error-message:
|
|
|
|
- sync/atomic: "Use go.uber.org/atomic instead of sync/atomic"
|
2020-10-29 03:09:08 -07:00
|
|
|
- github.com/stretchr/testify/assert: "Use github.com/stretchr/testify/require instead of github.com/stretchr/testify/assert"
|
2021-07-27 04:07:39 -07:00
|
|
|
- github.com/go-kit/kit/log: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
|
2022-04-27 02:24:36 -07:00
|
|
|
- io/ioutil: "Use corresponding 'os' or 'io' functions instead."
|
2022-02-12 15:58:27 -08:00
|
|
|
- regexp: "Use github.com/grafana/regexp instead of regexp"
|
2019-05-03 06:11:28 -07:00
|
|
|
errcheck:
|
2023-04-03 00:05:10 -07:00
|
|
|
exclude-functions:
|
|
|
|
# Don't flag lines such as "io.Copy(io.Discard, resp.Body)".
|
|
|
|
- io.Copy
|
|
|
|
# The next two are used in HTTP handlers, any error is handled by the server itself.
|
|
|
|
- io.WriteString
|
|
|
|
- (net/http.ResponseWriter).Write
|
|
|
|
# No need to check for errors on server's shutdown.
|
|
|
|
- (*net/http.Server).Shutdown
|
|
|
|
# Never check for logger errors.
|
|
|
|
- (github.com/go-kit/log.Logger).Log
|
|
|
|
# Never check for rollback errors as Rollback() is called when a previous error was detected.
|
|
|
|
- (github.com/prometheus/prometheus/storage.Appender).Rollback
|
2021-10-22 01:27:37 -07:00
|
|
|
goimports:
|
|
|
|
local-prefixes: github.com/prometheus/prometheus
|
|
|
|
gofumpt:
|
|
|
|
extra-rules: true
|