2018-11-14 09:18:03 +00:00
|
|
|
[run]
|
2019-10-09 17:12:05 +00:00
|
|
|
timeout = "10m"
|
2019-04-01 13:30:07 +00:00
|
|
|
skip-files = []
|
2019-10-09 09:48:04 +00:00
|
|
|
skip-dirs = [
|
|
|
|
"pkg/provider/kubernetes/crd/generated/",
|
|
|
|
]
|
2018-11-14 09:18:03 +00:00
|
|
|
|
2018-08-06 18:00:03 +00:00
|
|
|
[linters-settings]
|
|
|
|
|
|
|
|
[linters-settings.govet]
|
2019-03-04 15:40:05 +00:00
|
|
|
check-shadowing = false
|
2018-08-06 18:00:03 +00:00
|
|
|
|
|
|
|
[linters-settings.golint]
|
|
|
|
min-confidence = 0.0
|
|
|
|
|
|
|
|
[linters-settings.gocyclo]
|
2019-03-04 15:40:05 +00:00
|
|
|
min-complexity = 14.0
|
2018-08-06 18:00:03 +00:00
|
|
|
|
|
|
|
[linters-settings.goconst]
|
2018-11-14 09:18:03 +00:00
|
|
|
min-len = 3.0
|
2019-02-05 16:10:03 +00:00
|
|
|
min-occurrences = 4.0
|
2018-08-06 18:00:03 +00:00
|
|
|
|
|
|
|
[linters-settings.misspell]
|
|
|
|
locale = "US"
|
|
|
|
|
2019-09-10 15:52:04 +00:00
|
|
|
[linters-settings.funlen]
|
|
|
|
lines = 230 # default 60
|
|
|
|
statements = 120 # default 40
|
|
|
|
|
2021-03-04 08:02:03 +00:00
|
|
|
[linters-settings.forbidigo]
|
|
|
|
forbid = [
|
|
|
|
'^print(ln)?$',
|
|
|
|
'^spew\.Print(f|ln)?$',
|
|
|
|
'^spew\.Dump$',
|
|
|
|
]
|
|
|
|
|
|
|
|
[linters-settings.depguard]
|
|
|
|
list-type = "blacklist"
|
|
|
|
include-go-root = false
|
|
|
|
packages = ["github.com/pkg/errors"]
|
|
|
|
|
|
|
|
[linters-settings.godox]
|
|
|
|
keywords = ["FIXME"]
|
|
|
|
|
|
|
|
[linters-settings.importas]
|
|
|
|
corev1 = "k8s.io/api/core/v1"
|
|
|
|
networkingv1beta1 = "k8s.io/api/networking/v1beta1"
|
|
|
|
extensionsv1beta1 = "k8s.io/api/extensions/v1beta1"
|
|
|
|
metav1 = "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
|
|
kubeerror = "k8s.io/apimachinery/pkg/api/errors"
|
2021-11-25 10:10:06 +00:00
|
|
|
composeapi = "github.com/docker/compose/v2/pkg/api"
|
2021-03-04 08:02:03 +00:00
|
|
|
|
2022-02-21 11:10:08 +00:00
|
|
|
[linters-settings.revive]
|
|
|
|
[[linters-settings.revive.rules]]
|
|
|
|
name = "struct-tag"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "blank-imports"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "context-as-argument"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "context-keys-type"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "dot-imports"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "error-return"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "error-strings"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "error-naming"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "exported"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "if-return"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "increment-decrement"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "var-naming"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "var-declaration"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "package-comments"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "range"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "receiver-naming"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "time-naming"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "unexported-return"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "indent-error-flow"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "errorf"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "empty-block"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "superfluous-else"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "unused-parameter"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "unreachable-code"
|
|
|
|
[[linters-settings.rules]]
|
|
|
|
name = "redefines-builtin-id"
|
|
|
|
|
2021-03-29 07:20:03 +00:00
|
|
|
[linters-settings.gomoddirectives]
|
|
|
|
replace-allow-list = [
|
|
|
|
"github.com/abbot/go-http-auth",
|
|
|
|
"github.com/go-check/check",
|
|
|
|
"github.com/gorilla/mux",
|
|
|
|
"github.com/mailgun/minheap",
|
|
|
|
"github.com/mailgun/multibuf",
|
2021-11-25 10:10:06 +00:00
|
|
|
"github.com/jaguilar/vt100",
|
2022-10-04 10:36:09 +00:00
|
|
|
"github.com/BurntSushi/toml",
|
2021-03-29 07:20:03 +00:00
|
|
|
]
|
|
|
|
|
2018-08-06 18:00:03 +00:00
|
|
|
[linters]
|
|
|
|
enable-all = true
|
|
|
|
disable = [
|
2021-03-04 08:02:03 +00:00
|
|
|
"scopelint", # Deprecated
|
|
|
|
"interfacer", # Deprecated
|
|
|
|
"maligned", # Deprecated
|
2021-06-21 22:08:06 +00:00
|
|
|
"golint", # Deprecated
|
2022-08-31 06:24:08 +00:00
|
|
|
"exhaustivestruct",# Deprecated
|
2022-08-09 15:36:08 +00:00
|
|
|
"nosnakecase", # Deprecated
|
2022-08-31 06:24:08 +00:00
|
|
|
"ifshort", # Deprecated
|
|
|
|
"structcheck", # Deprecated
|
|
|
|
"varcheck", # Deprecated
|
|
|
|
"deadcode", # Deprecated
|
2022-05-17 13:48:08 +00:00
|
|
|
"execinquery", # Not relevant (SQL)
|
2021-03-04 08:02:03 +00:00
|
|
|
"sqlclosecheck", # Not relevant (SQL)
|
|
|
|
"rowserrcheck", # Not relevant (SQL)
|
|
|
|
"lll", # Not relevant
|
2019-03-04 15:40:05 +00:00
|
|
|
"gocyclo", # FIXME must be fixed
|
2021-03-04 08:02:03 +00:00
|
|
|
"cyclop", # Duplicate of gocyclo
|
|
|
|
"gocognit", # Too strict
|
|
|
|
"nestif", # Too many false-positive.
|
|
|
|
"prealloc", # Too many false-positive.
|
|
|
|
"makezero", # Not relevant
|
|
|
|
"dupl", # Too strict
|
|
|
|
"gosec", # Too strict
|
2019-02-05 16:10:03 +00:00
|
|
|
"gochecknoinits",
|
|
|
|
"gochecknoglobals",
|
2019-10-09 09:48:04 +00:00
|
|
|
"wsl", # Too strict
|
2021-03-04 08:02:03 +00:00
|
|
|
"nlreturn", # Not relevant
|
2020-01-19 22:00:06 +00:00
|
|
|
"gomnd", # Too strict
|
2019-10-09 09:48:04 +00:00
|
|
|
"stylecheck", # skip because report issues related to some generated files.
|
2020-05-11 10:06:07 +00:00
|
|
|
"testpackage", # Too strict
|
2020-11-06 08:26:03 +00:00
|
|
|
"tparallel", # Not relevant
|
2020-12-29 09:54:03 +00:00
|
|
|
"paralleltest", # Not relevant
|
2021-03-04 08:02:03 +00:00
|
|
|
"exhaustive", # Not relevant
|
2022-05-17 13:48:08 +00:00
|
|
|
"exhaustruct", # duplicate of exhaustivestruct
|
2021-03-04 08:02:03 +00:00
|
|
|
"goerr113", # Too strict
|
|
|
|
"wrapcheck", # Too strict
|
|
|
|
"noctx", # Too strict
|
|
|
|
"bodyclose", # Too many false-positive and panics.
|
|
|
|
"forcetypeassert", # Too strict
|
2021-06-21 22:08:06 +00:00
|
|
|
"tagliatelle", # Not compatible with current tags.
|
2021-11-04 08:50:11 +00:00
|
|
|
"varnamelen", # not relevant
|
|
|
|
"nilnil", # not relevant
|
|
|
|
"ireturn", # not relevant
|
|
|
|
"contextcheck", # too many false-positive
|
2022-02-15 13:56:53 +00:00
|
|
|
"containedctx", # too many false-positive
|
|
|
|
"maintidx", # kind of duplicate of gocyclo
|
2022-05-17 13:48:08 +00:00
|
|
|
"nonamedreturns", # not relevant
|
2018-11-14 09:18:03 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
[issues]
|
2019-03-04 15:40:05 +00:00
|
|
|
exclude-use-default = false
|
2018-11-14 09:18:03 +00:00
|
|
|
max-per-linter = 0
|
2019-03-04 15:40:05 +00:00
|
|
|
max-same-issues = 0
|
2018-11-14 09:18:03 +00:00
|
|
|
exclude = [
|
2019-03-04 15:40:05 +00:00
|
|
|
"Error return value of .((os\\.)?std(out|err)\\..*|.*Close|.*Flush|os\\.Remove(All)?|.*printf?|os\\.(Un)?Setenv). is not checked",
|
|
|
|
"should have a package comment, unless it's in another file for this package",
|
2021-03-04 08:02:03 +00:00
|
|
|
"SA1019: http.CloseNotifier has been deprecated", # FIXME must be fixed
|
2021-05-28 06:50:09 +00:00
|
|
|
"SA1019: cfg.SSLRedirect is deprecated",
|
|
|
|
"SA1019: cfg.SSLTemporaryRedirect is deprecated",
|
|
|
|
"SA1019: cfg.SSLHost is deprecated",
|
|
|
|
"SA1019: cfg.SSLForceHost is deprecated",
|
2021-06-21 13:16:13 +00:00
|
|
|
"SA1019: cfg.FeaturePolicy is deprecated",
|
2022-06-03 10:00:09 +00:00
|
|
|
"SA1019: c.Providers.ConsulCatalog.Namespace is deprecated",
|
|
|
|
"SA1019: c.Providers.Consul.Namespace is deprecated",
|
2022-09-19 14:26:08 +00:00
|
|
|
"SA1019: c.Providers.Nomad.Namespace is deprecated",
|
2018-11-14 09:18:03 +00:00
|
|
|
]
|
2019-03-04 15:40:05 +00:00
|
|
|
[[issues.exclude-rules]]
|
2019-09-10 15:52:04 +00:00
|
|
|
path = "(.+)_test.go"
|
2022-07-19 16:38:09 +00:00
|
|
|
linters = ["goconst", "funlen", "godot", "nosnakecase"]
|
2022-08-31 06:24:08 +00:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "(.+)_test.go"
|
|
|
|
text = " always receives "
|
|
|
|
linters = [ "unparam" ]
|
2019-03-04 15:40:05 +00:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "integration/.+_test.go"
|
|
|
|
text = "Error return value of `cmd\\.Process\\.Kill` is not checked"
|
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "integration/(consul_catalog_test|constraint_test).go"
|
|
|
|
text = "Error return value of `(s.deregisterService|s.deregisterAgentService)` is not checked"
|
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "integration/grpc_test.go"
|
|
|
|
text = "Error return value of `closer` is not checked"
|
|
|
|
[[issues.exclude-rules]]
|
2019-04-01 13:30:07 +00:00
|
|
|
path = "pkg/h2c/h2c.go"
|
|
|
|
text = "Error return value of `rw.Write` is not checked"
|
2019-03-04 15:40:05 +00:00
|
|
|
[[issues.exclude-rules]]
|
2019-04-01 13:30:07 +00:00
|
|
|
path = "pkg/provider/docker/builder_test.go"
|
2019-03-04 15:40:05 +00:00
|
|
|
text = "(U1000: func )?`(.+)` is unused"
|
|
|
|
[[issues.exclude-rules]]
|
2019-04-01 13:30:07 +00:00
|
|
|
path = "pkg/provider/kubernetes/builder_(endpoint|service)_test.go"
|
|
|
|
text = "(U1000: func )?`(.+)` is unused"
|
2019-03-04 15:40:05 +00:00
|
|
|
[[issues.exclude-rules]]
|
2019-04-01 13:30:07 +00:00
|
|
|
path = "pkg/server/service/bufferpool.go"
|
2019-03-04 15:40:05 +00:00
|
|
|
text = "SA6002: argument should be pointer-like to avoid allocations"
|
2019-04-01 13:30:07 +00:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "cmd/configuration.go"
|
|
|
|
text = "string `traefik` has (\\d) occurrences, make it a constant"
|
2020-01-21 17:06:03 +00:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "pkg/server/middleware/middlewares.go"
|
2020-04-20 16:36:34 +00:00
|
|
|
text = "Function 'buildConstructor' has too many statements"
|
2020-01-19 22:00:06 +00:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "pkg/tracing/haystack/logger.go"
|
|
|
|
linters = ["goprintffuncname"]
|
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "pkg/tracing/tracing.go"
|
|
|
|
text = "printf-like formatting function 'SetErrorWithEvent' should be named 'SetErrorWithEventf'"
|
2020-05-11 10:06:07 +00:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "pkg/log/deprecated.go"
|
2021-01-28 08:00:03 +00:00
|
|
|
linters = ["godot"]
|
2022-02-21 11:10:08 +00:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "(.+)\\.go"
|
|
|
|
text = "struct-tag: unknown option 'inline' in JSON tag"
|
2022-03-17 17:02:08 +00:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "pkg/server/router/tcp/manager.go"
|
|
|
|
text = "Function 'buildEntryPointHandler' is too long (.+)"
|
2022-07-19 16:38:09 +00:00
|
|
|
[[issues.exclude-rules]]
|
2022-08-09 15:36:08 +00:00
|
|
|
path = "pkg/tls/tlsmanager_test.go"
|
|
|
|
text = "SA1019: config.ClientCAs.Subjects has been deprecated since Go 1.18"
|
2022-07-19 16:38:09 +00:00
|
|
|
[[issues.exclude-rules]]
|
2022-08-09 15:36:08 +00:00
|
|
|
path = "pkg/types/tls_test.go"
|
|
|
|
text = "SA1019: tlsConfig.RootCAs.Subjects has been deprecated since Go 1.18"
|
2022-08-31 06:24:08 +00:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "pkg/provider/kubernetes/(crd|gateway)/client.go"
|
|
|
|
linters = ["interfacebloat"]
|
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "pkg/metrics/metrics.go"
|
|
|
|
linters = ["interfacebloat"]
|
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "pkg/provider/acme/provider.go"
|
|
|
|
text = "\\(\\*Provider\\)\\.resolveCertificate - result 0 \\(\\*github.com/go-acme/lego/v4/certificate.Resource\\) is never used"
|
2022-10-04 18:38:09 +00:00
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "integration/healthcheck_test.go"
|
|
|
|
text = "Duplicate words \\(wsp2,\\) found"
|
|
|
|
[[issues.exclude-rules]]
|
|
|
|
path = "pkg/types/domain_test.go"
|
|
|
|
text = "Duplicate words \\(sub\\) found"
|
2022-08-09 15:36:08 +00:00
|
|
|
|