Remove unnecessary linting exclusions
This commit is contained in:
parent
e9de061b84
commit
996eccf5b7
3 changed files with 12 additions and 52 deletions
|
@ -182,35 +182,14 @@
|
||||||
]
|
]
|
||||||
[[issues.exclude-rules]]
|
[[issues.exclude-rules]]
|
||||||
path = "(.+)_test.go"
|
path = "(.+)_test.go"
|
||||||
linters = ["goconst", "funlen", "godot", "nosnakecase"]
|
linters = ["goconst", "funlen", "godot"]
|
||||||
[[issues.exclude-rules]]
|
[[issues.exclude-rules]]
|
||||||
path = "(.+)_test.go"
|
path = "(.+)_test.go"
|
||||||
text = " always receives "
|
text = " always receives "
|
||||||
linters = [ "unparam" ]
|
linters = [ "unparam" ]
|
||||||
[[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]]
|
|
||||||
path = "pkg/h2c/h2c.go"
|
|
||||||
text = "Error return value of `rw.Write` is not checked"
|
|
||||||
[[issues.exclude-rules]]
|
|
||||||
path = "pkg/provider/docker/builder_test.go"
|
|
||||||
text = "(U1000: func )?`(.+)` is unused"
|
|
||||||
[[issues.exclude-rules]]
|
|
||||||
path = "pkg/provider/kubernetes/builder_(endpoint|service)_test.go"
|
|
||||||
text = "(U1000: func )?`(.+)` is unused"
|
|
||||||
[[issues.exclude-rules]]
|
[[issues.exclude-rules]]
|
||||||
path = "pkg/server/service/bufferpool.go"
|
path = "pkg/server/service/bufferpool.go"
|
||||||
text = "SA6002: argument should be pointer-like to avoid allocations"
|
text = "SA6002: argument should be pointer-like to avoid allocations"
|
||||||
[[issues.exclude-rules]]
|
|
||||||
path = "cmd/configuration.go"
|
|
||||||
text = "string `traefik` has (\\d) occurrences, make it a constant"
|
|
||||||
[[issues.exclude-rules]]
|
[[issues.exclude-rules]]
|
||||||
path = "pkg/server/middleware/middlewares.go"
|
path = "pkg/server/middleware/middlewares.go"
|
||||||
text = "Function 'buildConstructor' has too many statements"
|
text = "Function 'buildConstructor' has too many statements"
|
||||||
|
@ -220,9 +199,6 @@
|
||||||
[[issues.exclude-rules]]
|
[[issues.exclude-rules]]
|
||||||
path = "pkg/tracing/tracing.go"
|
path = "pkg/tracing/tracing.go"
|
||||||
text = "printf-like formatting function 'SetErrorWithEvent' should be named 'SetErrorWithEventf'"
|
text = "printf-like formatting function 'SetErrorWithEvent' should be named 'SetErrorWithEventf'"
|
||||||
[[issues.exclude-rules]]
|
|
||||||
path = "pkg/log/deprecated.go"
|
|
||||||
linters = ["godot"]
|
|
||||||
[[issues.exclude-rules]]
|
[[issues.exclude-rules]]
|
||||||
path = "(.+)\\.go"
|
path = "(.+)\\.go"
|
||||||
text = "struct-tag: unknown option 'inline' in JSON tag"
|
text = "struct-tag: unknown option 'inline' in JSON tag"
|
||||||
|
@ -241,13 +217,3 @@
|
||||||
[[issues.exclude-rules]]
|
[[issues.exclude-rules]]
|
||||||
path = "pkg/metrics/metrics.go"
|
path = "pkg/metrics/metrics.go"
|
||||||
linters = ["interfacebloat"]
|
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"
|
|
||||||
[[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"
|
|
||||||
|
|
||||||
|
|
|
@ -9,67 +9,67 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// Debug logs a message at level Debug on the standard logger.
|
// Debug logs a message at level Debug on the standard logger.
|
||||||
// Deprecated
|
// Deprecated: use log.FromContext(ctx).Debug(...) instead.
|
||||||
func Debug(args ...interface{}) {
|
func Debug(args ...interface{}) {
|
||||||
mainLogger.Debug(args...)
|
mainLogger.Debug(args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debugf logs a message at level Debug on the standard logger.
|
// Debugf logs a message at level Debug on the standard logger.
|
||||||
// Deprecated
|
// Deprecated: use log.FromContext(ctx).Debugf(...) instead.
|
||||||
func Debugf(format string, args ...interface{}) {
|
func Debugf(format string, args ...interface{}) {
|
||||||
mainLogger.Debugf(format, args...)
|
mainLogger.Debugf(format, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Info logs a message at level Info on the standard logger.
|
// Info logs a message at level Info on the standard logger.
|
||||||
// Deprecated
|
// Deprecated: use log.FromContext(ctx).Info(...) instead.
|
||||||
func Info(args ...interface{}) {
|
func Info(args ...interface{}) {
|
||||||
mainLogger.Info(args...)
|
mainLogger.Info(args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Infof logs a message at level Info on the standard logger.
|
// Infof logs a message at level Info on the standard logger.
|
||||||
// Deprecated
|
// Deprecated: use log.FromContext(ctx).Infof(...) instead.
|
||||||
func Infof(format string, args ...interface{}) {
|
func Infof(format string, args ...interface{}) {
|
||||||
mainLogger.Infof(format, args...)
|
mainLogger.Infof(format, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Warn logs a message at level Warn on the standard logger.
|
// Warn logs a message at level Warn on the standard logger.
|
||||||
// Deprecated
|
// Deprecated: use log.FromContext(ctx).Warn(...) instead.
|
||||||
func Warn(args ...interface{}) {
|
func Warn(args ...interface{}) {
|
||||||
mainLogger.Warn(args...)
|
mainLogger.Warn(args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Warnf logs a message at level Warn on the standard logger.
|
// Warnf logs a message at level Warn on the standard logger.
|
||||||
// Deprecated
|
// Deprecated: use log.FromContext(ctx).Warnf(...) instead.
|
||||||
func Warnf(format string, args ...interface{}) {
|
func Warnf(format string, args ...interface{}) {
|
||||||
mainLogger.Warnf(format, args...)
|
mainLogger.Warnf(format, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Error logs a message at level Error on the standard logger.
|
// Error logs a message at level Error on the standard logger.
|
||||||
// Deprecated
|
// Deprecated: use log.FromContext(ctx).Error(...) instead.
|
||||||
func Error(args ...interface{}) {
|
func Error(args ...interface{}) {
|
||||||
mainLogger.Error(args...)
|
mainLogger.Error(args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Errorf logs a message at level Error on the standard logger.
|
// Errorf logs a message at level Error on the standard logger.
|
||||||
// Deprecated
|
// Deprecated: use log.FromContext(ctx).Errorf(...) instead.
|
||||||
func Errorf(format string, args ...interface{}) {
|
func Errorf(format string, args ...interface{}) {
|
||||||
mainLogger.Errorf(format, args...)
|
mainLogger.Errorf(format, args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Panic logs a message at level Panic on the standard logger.
|
// Panic logs a message at level Panic on the standard logger.
|
||||||
// Deprecated
|
// Deprecated: use log.FromContext(ctx).Panic(...) instead.
|
||||||
func Panic(args ...interface{}) {
|
func Panic(args ...interface{}) {
|
||||||
mainLogger.Panic(args...)
|
mainLogger.Panic(args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fatal logs a message at level Fatal on the standard logger.
|
// Fatal logs a message at level Fatal on the standard logger.
|
||||||
// Deprecated
|
// Deprecated: use log.FromContext(ctx).Fatal(...) instead.
|
||||||
func Fatal(args ...interface{}) {
|
func Fatal(args ...interface{}) {
|
||||||
mainLogger.Fatal(args...)
|
mainLogger.Fatal(args...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fatalf logs a message at level Fatal on the standard logger.
|
// Fatalf logs a message at level Fatal on the standard logger.
|
||||||
// Deprecated
|
// Deprecated: use log.FromContext(ctx).Fatalf(...) instead.
|
||||||
func Fatalf(format string, args ...interface{}) {
|
func Fatalf(format string, args ...interface{}) {
|
||||||
mainLogger.Fatalf(format, args...)
|
mainLogger.Fatalf(format, args...)
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,12 +47,6 @@ func nodeIP(ip string) func(*docker.ContainerJSON) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func labels(labels map[string]string) func(*docker.ContainerJSON) {
|
|
||||||
return func(c *docker.ContainerJSON) {
|
|
||||||
c.Config.Labels = labels
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func ports(portMap nat.PortMap) func(*docker.ContainerJSON) {
|
func ports(portMap nat.PortMap) func(*docker.ContainerJSON) {
|
||||||
return func(c *docker.ContainerJSON) {
|
return func(c *docker.ContainerJSON) {
|
||||||
c.NetworkSettings.NetworkSettingsBase.Ports = portMap
|
c.NetworkSettings.NetworkSettingsBase.Ports = portMap
|
||||||
|
|
Loading…
Reference in a new issue