You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've searched for similar issues and couldn't find anything matching
I've included steps to reproduce the behavior
Affected Components
K8sGPT (CLI)
K8sGPT Operator
K8sGPT Version
No response
Kubernetes Version
No response
Host OS and its Version
No response
Steps to reproduce
make lint
Expected behaviour
all pass
Actual behaviour
cmd/generate/generate.go:43:4: ineffectual assignment to backendType (ineffassign)
backendType = backend
^
cmd/auth/auth.go:38:12: Error return value of `cmd.Help` is not checked (errcheck)
cmd.Help()
^
cmd/auth/new.go:36:24: Error return value of `cmd.MarkFlagRequired` is not checked (errcheck)
cmd.MarkFlagRequired("engine")
^
cmd/auth/new.go:37:24: Error return value of `cmd.MarkFlagRequired` is not checked (errcheck)
cmd.MarkFlagRequired("baseurl")
^
cmd/integration/integration.go:35:11: Error return value of `cmd.Help` is not checked (errcheck)
cmd.Help()
^
cmd/filters/filters.go:28:12: Error return value of `cmd.Help` is not checked (errcheck)
cmd.Help()
^
pkg/analysis/analysis.go:237:13: Error return value of `bar.Exit` is not checked (errcheck)
bar.Exit()
^
pkg/analysis/analysis.go:258:11: Error return value of `bar.Add` is not checked (errcheck)
bar.Add(1)
^
cmd/serve/serve.go:100:20: Error return value of `logger.Sync` is not checked (errcheck)
defer logger.Sync()
^
cmd/root.go:88:24: Error return value of `viper.SafeWriteConfig` is not checked (errcheck)
viper.SafeWriteConfig()
^
pkg/server/server.go:41:2: field `maxConcurrency` is unused (unused)
maxConcurrency int
^
pkg/server/server.go:53:5: var `health` is unused (unused)
var health = Health{
^
pkg/server/server.go:104:18: func `(*Config).healthzHandler` is unused (unused)
func (s *Config) healthzHandler(w http.ResponseWriter, r *http.Request) {
^
pkg/server/server.go:113:6: func `getBoolParam` is unused (unused)
func getBoolParam(param string) bool {
^
pkg/analyzer/node.go:61:16: S1025: the argument is already a string, there's no need to use fmt.Sprintf (gosimple)
preAnalysis[fmt.Sprintf("%s", node.Name)] = common.PreAnalysis{
^
pkg/analyzer/pod.go:88:8: S1002: should omit comparison to bool constant, can be simplified to `!containerStatus.Ready` (gosimple)
if containerStatus.Ready == false && pod.Status.Phase == "Running" {
^
cmd/root.go:98:2: SA9003: empty branch (staticcheck)
if err := viper.ReadInConfig(); err == nil {
^
cmd/filters/list.go:40:3: SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead (staticcheck)
fmt.Printf(color.YellowString("Active: \n"))
^
cmd/filters/list.go:53:4: SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead (staticcheck)
fmt.Printf(color.YellowString("Unused: \n"))
^
pkg/server/server.go:110:2: SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead (staticcheck)
fmt.Fprintf(w, string(js))
^ pkg/analysis/analysis.go:170:35: SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead (staticcheck)
a.Errors = append(a.Errors, fmt.Sprintf(fmt.Sprintf("[%s] %s", filter, err)))
^
pkg/analysis/analysis.go:179:33: SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead (staticcheck)
a.Errors = append(a.Errors, fmt.Sprintf(fmt.Sprintf("\"%s\" filter does not exist. Please run k8sgpt filters list.", filter)))
Additional Information
golangci-lint --version
golangci-lint has version 1.52.2 built with go1.20.2
The text was updated successfully, but these errors were encountered:
Checklist
Affected Components
K8sGPT Version
No response
Kubernetes Version
No response
Host OS and its Version
No response
Steps to reproduce
make lint
Expected behaviour
all pass
Actual behaviour
Additional Information
golangci-lint --version
golangci-lint has version 1.52.2 built with go1.20.2
The text was updated successfully, but these errors were encountered: