|
|
@ -10,19 +10,21 @@ linters:
|
|
|
|
- exportloopref
|
|
|
|
- exportloopref
|
|
|
|
linters-settings:
|
|
|
|
linters-settings:
|
|
|
|
depguard:
|
|
|
|
depguard:
|
|
|
|
list-type: denylist
|
|
|
|
rules:
|
|
|
|
include-go-root: true
|
|
|
|
main:
|
|
|
|
packages:
|
|
|
|
deny:
|
|
|
|
- github.com/sirupsen/logrus
|
|
|
|
- pkg: 'github.com/sirupsen/logrus'
|
|
|
|
- golang.org/x/exp
|
|
|
|
desc: 'logging is allowed only by github.com/rs/zerolog'
|
|
|
|
- github.com/portainer/libcrypto
|
|
|
|
- pkg: 'golang.org/x/exp'
|
|
|
|
- github.com/portainer/libhttp
|
|
|
|
desc: 'exp is not allowed'
|
|
|
|
packages-with-error-message:
|
|
|
|
- pkg: 'github.com/portainer/libcrypto'
|
|
|
|
- github.com/sirupsen/logrus: 'logging is allowed only by github.com/rs/zerolog'
|
|
|
|
desc: 'use github.com/portainer/portainer/pkg/libcrypto'
|
|
|
|
ignore-file-rules:
|
|
|
|
- pkg: 'github.com/portainer/libhttp'
|
|
|
|
- '**/*_test.go'
|
|
|
|
desc: 'use github.com/portainer/portainer/pkg/libhttp'
|
|
|
|
- '**/base.go'
|
|
|
|
files:
|
|
|
|
- '**/base_tx.go'
|
|
|
|
- '!**/*_test.go'
|
|
|
|
|
|
|
|
- '!**/base.go'
|
|
|
|
|
|
|
|
- '!**/base_tx.go'
|
|
|
|
|
|
|
|
|
|
|
|
# errorlint is causing a typecheck error for some reason. The go compiler will report these
|
|
|
|
# errorlint is causing a typecheck error for some reason. The go compiler will report these
|
|
|
|
# anyway, so ignore them from the linter
|
|
|
|
# anyway, so ignore them from the linter
|
|
|
|