2022-10-17 10:00:10 +00:00
|
|
|
run:
|
|
|
|
timeout: 10m
|
|
|
|
|
|
|
|
linters-settings:
|
|
|
|
govet:
|
2023-04-03 08:06:06 +00:00
|
|
|
enable-all: true
|
|
|
|
disable:
|
|
|
|
- shadow
|
|
|
|
- fieldalignment
|
2022-10-17 10:00:10 +00:00
|
|
|
gocyclo:
|
|
|
|
min-complexity: 14
|
|
|
|
goconst:
|
|
|
|
min-len: 3
|
|
|
|
min-occurrences: 4
|
|
|
|
misspell:
|
|
|
|
locale: US
|
|
|
|
funlen:
|
|
|
|
lines: -1
|
|
|
|
statements: 120
|
|
|
|
forbidigo:
|
|
|
|
forbid:
|
|
|
|
- ^print(ln)?$
|
|
|
|
- ^spew\.Print(f|ln)?$
|
|
|
|
- ^spew\.Dump$
|
|
|
|
depguard:
|
2023-06-05 08:24:06 +00:00
|
|
|
rules:
|
|
|
|
main:
|
|
|
|
deny:
|
|
|
|
- pkg: "github.com/instana/testify"
|
|
|
|
desc: not allowed
|
|
|
|
- pkg: "github.com/pkg/errors"
|
|
|
|
desc: Should be replaced by standard lib errors package
|
2022-10-17 10:00:10 +00:00
|
|
|
godox:
|
|
|
|
keywords:
|
|
|
|
- FIXME
|
|
|
|
importas:
|
2023-04-03 08:06:06 +00:00
|
|
|
no-unaliased: true
|
|
|
|
alias:
|
|
|
|
- alias: composeapi
|
|
|
|
pkg: github.com/docker/compose/v2/pkg/api
|
|
|
|
|
|
|
|
# Standard Kubernetes rewrites:
|
|
|
|
- alias: corev1
|
|
|
|
pkg: "k8s.io/api/core/v1"
|
|
|
|
- alias: netv1
|
|
|
|
pkg: "k8s.io/api/networking/v1"
|
|
|
|
- alias: netv1beta1
|
|
|
|
pkg: "k8s.io/api/networking/v1beta1"
|
|
|
|
- alias: admv1
|
|
|
|
pkg: "k8s.io/api/admission/v1"
|
|
|
|
- alias: admv1beta1
|
|
|
|
pkg: "k8s.io/api/admission/v1beta1"
|
|
|
|
- alias: extv1beta1
|
|
|
|
pkg: "k8s.io/api/extensions/v1beta1"
|
|
|
|
- alias: metav1
|
|
|
|
pkg: "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
|
|
- alias: ktypes
|
|
|
|
pkg: "k8s.io/apimachinery/pkg/types"
|
|
|
|
- alias: kerror
|
|
|
|
pkg: "k8s.io/apimachinery/pkg/api/errors"
|
|
|
|
- alias: kclientset
|
|
|
|
pkg: "k8s.io/client-go/kubernetes"
|
|
|
|
- alias: kinformers
|
|
|
|
pkg: "k8s.io/client-go/informers"
|
|
|
|
- alias: ktesting
|
|
|
|
pkg: "k8s.io/client-go/testing"
|
|
|
|
- alias: kschema
|
|
|
|
pkg: "k8s.io/apimachinery/pkg/runtime/schema"
|
|
|
|
- alias: kscheme
|
|
|
|
pkg: "k8s.io/client-go/kubernetes/scheme"
|
|
|
|
- alias: kversion
|
|
|
|
pkg: "k8s.io/apimachinery/pkg/version"
|
|
|
|
- alias: kubefake
|
|
|
|
pkg: "k8s.io/client-go/kubernetes/fake"
|
|
|
|
- alias: discoveryfake
|
|
|
|
pkg: "k8s.io/client-go/discovery/fake"
|
|
|
|
|
|
|
|
# Kubernetes Gateway rewrites:
|
|
|
|
- alias: gateclientset
|
|
|
|
pkg: "sigs.k8s.io/gateway-api/pkg/client/clientset/gateway/versioned"
|
|
|
|
- alias: gateinformers
|
|
|
|
pkg: "sigs.k8s.io/gateway-api/pkg/client/informers/gateway/externalversions"
|
|
|
|
- alias: gatev1alpha2
|
|
|
|
pkg: "sigs.k8s.io/gateway-api/apis/v1alpha2"
|
|
|
|
|
|
|
|
# Traefik Kubernetes rewrites:
|
|
|
|
- alias: containousv1alpha1
|
|
|
|
pkg: "github.com/traefik/traefik/v2/pkg/provider/kubernetes/crd/traefikcontainous/v1alpha1"
|
|
|
|
- alias: traefikv1alpha1
|
|
|
|
pkg: "github.com/traefik/traefik/v2/pkg/provider/kubernetes/crd/traefikio/v1alpha1"
|
|
|
|
- alias: traefikclientset
|
|
|
|
pkg: "github.com/traefik/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned"
|
|
|
|
- alias: traefikinformers
|
|
|
|
pkg: "github.com/traefik/traefik/v2/pkg/provider/kubernetes/crd/generated/informers/externalversions"
|
|
|
|
- alias: traefikscheme
|
|
|
|
pkg: "github.com/traefik/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme"
|
|
|
|
- alias: traefikcrdfake
|
|
|
|
pkg: "github.com/traefik/traefik/v2/pkg/provider/kubernetes/crd/generated/clientset/versioned/fake"
|
|
|
|
tagalign:
|
|
|
|
align: false
|
|
|
|
sort: true
|
|
|
|
order:
|
|
|
|
- description
|
|
|
|
- json
|
|
|
|
- toml
|
|
|
|
- yaml
|
|
|
|
- yml
|
|
|
|
- label
|
|
|
|
- label-slice-as-struct
|
|
|
|
- file
|
|
|
|
- kv
|
|
|
|
- export
|
2022-10-17 10:00:10 +00:00
|
|
|
revive:
|
|
|
|
rules:
|
|
|
|
- name: struct-tag
|
2023-04-03 08:06:06 +00:00
|
|
|
- name: blank-imports
|
|
|
|
- name: context-as-argument
|
|
|
|
- name: context-keys-type
|
|
|
|
- name: dot-imports
|
|
|
|
- name: error-return
|
|
|
|
- name: error-strings
|
|
|
|
- name: error-naming
|
|
|
|
- name: exported
|
|
|
|
disabled: true
|
|
|
|
- name: if-return
|
|
|
|
- name: increment-decrement
|
|
|
|
- name: var-naming
|
|
|
|
- name: var-declaration
|
|
|
|
- name: package-comments
|
|
|
|
disabled: true
|
|
|
|
- name: range
|
|
|
|
- name: receiver-naming
|
|
|
|
- name: time-naming
|
|
|
|
- name: unexported-return
|
|
|
|
- name: indent-error-flow
|
|
|
|
- name: errorf
|
|
|
|
- name: empty-block
|
|
|
|
- name: superfluous-else
|
|
|
|
- name: unused-parameter
|
|
|
|
disabled: true
|
|
|
|
- name: unreachable-code
|
|
|
|
- name: redefines-builtin-id
|
2022-10-17 10:00:10 +00:00
|
|
|
gomoddirectives:
|
|
|
|
replace-allow-list:
|
|
|
|
- github.com/abbot/go-http-auth
|
|
|
|
- github.com/gorilla/mux
|
|
|
|
- github.com/mailgun/minheap
|
|
|
|
- github.com/mailgun/multibuf
|
|
|
|
- github.com/jaguilar/vt100
|
2024-01-05 14:10:05 +00:00
|
|
|
- github.com/cucumber/godog
|
2023-11-17 00:50:06 +00:00
|
|
|
testifylint:
|
2024-02-07 16:14:07 +00:00
|
|
|
disable:
|
|
|
|
- suite-dont-use-pkg
|
|
|
|
- require-error
|
|
|
|
- go-require
|
2024-05-27 07:46:08 +00:00
|
|
|
errcheck:
|
|
|
|
exclude-functions:
|
|
|
|
- fmt.Fprintln
|
2022-10-17 10:00:10 +00:00
|
|
|
linters:
|
|
|
|
enable-all: true
|
|
|
|
disable:
|
2024-05-27 07:46:08 +00:00
|
|
|
- execinquery # deprecated
|
|
|
|
- gomnd # deprecated
|
2022-10-17 10:00:10 +00:00
|
|
|
- sqlclosecheck # not relevant (SQL)
|
|
|
|
- rowserrcheck # not relevant (SQL)
|
|
|
|
- cyclop # duplicate of gocyclo
|
|
|
|
- lll # Not relevant
|
|
|
|
- gocyclo # FIXME must be fixed
|
|
|
|
- gocognit # Too strict
|
|
|
|
- nestif # Too many false-positive.
|
|
|
|
- prealloc # Too many false-positive.
|
|
|
|
- makezero # Not relevant
|
|
|
|
- dupl # Too strict
|
|
|
|
- gosec # Too strict
|
|
|
|
- gochecknoinits
|
|
|
|
- gochecknoglobals
|
|
|
|
- wsl # Too strict
|
|
|
|
- nlreturn # Not relevant
|
2024-05-27 07:46:08 +00:00
|
|
|
- mnd # Too strict
|
2022-10-17 10:00:10 +00:00
|
|
|
- stylecheck # skip because report issues related to some generated files.
|
|
|
|
- testpackage # Too strict
|
|
|
|
- tparallel # Not relevant
|
|
|
|
- paralleltest # Not relevant
|
|
|
|
- exhaustive # Not relevant
|
|
|
|
- exhaustruct # Not relevant
|
2024-05-27 07:46:08 +00:00
|
|
|
- err113 # Too strict
|
2022-10-17 10:00:10 +00:00
|
|
|
- wrapcheck # Too strict
|
|
|
|
- noctx # Too strict
|
|
|
|
- bodyclose # too many false-positive
|
|
|
|
- forcetypeassert # Too strict
|
|
|
|
- tagliatelle # Too strict
|
|
|
|
- varnamelen # Not relevant
|
|
|
|
- nilnil # Not relevant
|
|
|
|
- ireturn # Not relevant
|
|
|
|
- contextcheck # too many false-positive
|
|
|
|
- containedctx # too many false-positive
|
|
|
|
- maintidx # kind of duplicate of gocyclo
|
|
|
|
- nonamedreturns # Too strict
|
2023-06-05 08:24:06 +00:00
|
|
|
- gosmopolitan # not relevant
|
2024-08-28 13:00:06 +00:00
|
|
|
- exportloopref # Not relevant since go1.22
|
2022-10-17 10:00:10 +00:00
|
|
|
|
|
|
|
issues:
|
|
|
|
exclude-use-default: false
|
2024-02-07 16:14:07 +00:00
|
|
|
max-issues-per-linter: 0
|
2022-10-17 10:00:10 +00:00
|
|
|
max-same-issues: 0
|
2024-03-20 09:26:03 +00:00
|
|
|
exclude-dirs:
|
|
|
|
- pkg/provider/kubernetes/crd/generated/
|
2022-10-17 10:00:10 +00:00
|
|
|
exclude:
|
|
|
|
- '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"
|
|
|
|
- 'SA1019: http.CloseNotifier has been deprecated' # FIXME must be fixed
|
|
|
|
- 'SA1019: cfg.SSLRedirect is deprecated'
|
|
|
|
- 'SA1019: cfg.SSLTemporaryRedirect is deprecated'
|
|
|
|
- 'SA1019: cfg.SSLHost is deprecated'
|
|
|
|
- 'SA1019: cfg.SSLForceHost is deprecated'
|
|
|
|
- 'SA1019: cfg.FeaturePolicy is deprecated'
|
|
|
|
- 'SA1019: c.Providers.ConsulCatalog.Namespace is deprecated'
|
|
|
|
- 'SA1019: c.Providers.Consul.Namespace is deprecated'
|
2023-03-21 14:50:06 +00:00
|
|
|
- 'SA1019: c.Providers.Nomad.Namespace is deprecated'
|
2024-02-19 14:44:03 +00:00
|
|
|
- 'fmt.Sprintf can be replaced with string'
|
2024-07-31 14:20:04 +00:00
|
|
|
- 'SA1019: dockertypes.ContainerNode is deprecated'
|
2022-10-17 10:00:10 +00:00
|
|
|
exclude-rules:
|
|
|
|
- path: '(.+)_test.go'
|
|
|
|
linters:
|
|
|
|
- goconst
|
|
|
|
- funlen
|
|
|
|
- godot
|
2024-05-27 07:46:08 +00:00
|
|
|
- canonicalheader
|
|
|
|
- fatcontext
|
2022-10-17 10:00:10 +00:00
|
|
|
- path: '(.+)_test.go'
|
|
|
|
text: ' always receives '
|
|
|
|
linters:
|
|
|
|
- unparam
|
|
|
|
- path: '(.+)\.go'
|
|
|
|
text: 'struct-tag: unknown option ''inline'' in JSON tag'
|
|
|
|
linters:
|
|
|
|
- revive
|
|
|
|
- path: pkg/server/service/bufferpool.go
|
|
|
|
text: 'SA6002: argument should be pointer-like to avoid allocations'
|
|
|
|
- path: pkg/server/middleware/middlewares.go
|
|
|
|
text: "Function 'buildConstructor' has too many statements"
|
|
|
|
linters:
|
|
|
|
- funlen
|
|
|
|
- path: pkg/tracing/haystack/logger.go
|
|
|
|
linters:
|
|
|
|
- goprintffuncname
|
|
|
|
- path: pkg/tracing/tracing.go
|
|
|
|
text: "printf-like formatting function 'SetErrorWithEvent' should be named 'SetErrorWithEventf'"
|
|
|
|
linters:
|
|
|
|
- goprintffuncname
|
|
|
|
- path: pkg/tls/tlsmanager_test.go
|
|
|
|
text: 'SA1019: config.ClientCAs.Subjects has been deprecated since Go 1.18'
|
|
|
|
- path: pkg/types/tls_test.go
|
|
|
|
text: 'SA1019: tlsConfig.RootCAs.Subjects has been deprecated since Go 1.18'
|
|
|
|
- path: pkg/provider/kubernetes/(crd|gateway)/client.go
|
|
|
|
linters:
|
|
|
|
- interfacebloat
|
|
|
|
- path: pkg/metrics/metrics.go
|
|
|
|
linters:
|
|
|
|
- interfacebloat
|
|
|
|
- path: integration/healthcheck_test.go
|
|
|
|
text: 'Duplicate words \(wsp2,\) found'
|
|
|
|
linters:
|
|
|
|
- dupword
|
|
|
|
- path: pkg/types/domain_test.go
|
|
|
|
text: 'Duplicate words \(sub\) found'
|
|
|
|
linters:
|
|
|
|
- dupword
|
2023-04-03 08:06:06 +00:00
|
|
|
- path: pkg/provider/kubernetes/gateway/client_mock_test.go
|
|
|
|
text: 'unusedwrite: unused write to field'
|
|
|
|
linters:
|
|
|
|
- govet
|
2024-08-28 13:00:06 +00:00
|
|
|
- path: pkg/provider/acme/local_store.go
|
|
|
|
linters:
|
|
|
|
- musttag
|