/home/asoro/work/projects/backstage/janus-idp/operator/bin/golangci-lint-v2.1.6 run --timeout 15m pkg/utils/yaml_test.go:15:20: Error return value of `os.RemoveAll` is not checked (errcheck) defer os.RemoveAll(dir) ^ pkg/utils/yaml_test.go:44:20: Error return value of `os.RemoveAll` is not checked (errcheck) defer os.RemoveAll(dir) ^ tests/e2e/e2e_suite_test.go:78:20: Error return value of `stdin.Close` is not checked (errcheck) defer stdin.Close() ^ tests/e2e/e2e_test.go:202:27: Error return value of `stdin.Close` is not checked (errcheck) defer stdin.Close() ^ tests/e2e/e2e_upgrade_test.go:68:22: Error return value of `stdin.Close` is not checked (errcheck) defer stdin.Close() ^ tests/helper/helper_backstage.go:72:23: Error return value of `resp.Body.Close` is not checked (errcheck) defer resp.Body.Close() ^ tests/helper/helper_backstage.go:95:14: Error return value of `fmt.Fprintln` is not checked (errcheck) fmt.Fprintln(GinkgoWriter, string(status)) ^ tests/helper/helper_backstage.go:104:14: Error return value of `fmt.Fprintln` is not checked (errcheck) fmt.Fprintln(GinkgoWriter, string(status)) ^ tests/helper/helper_backstage.go:175:14: Error return value of `fmt.Fprintln` is not checked (errcheck) fmt.Fprintln(GinkgoWriter, host) ^ tests/helper/helper_backstage.go:206:14: Error return value of `fmt.Fprintf` is not checked (errcheck) fmt.Fprintf(GinkgoWriter, "--> GET %q\n", url) ^ tests/helper/helper_backstage.go:209:24: Error return value of `resp.Body.Close` is not checked (errcheck) defer resp.Body.Close() ^ tests/helper/utils.go:158:13: Error return value of `fmt.Fprintf` is not checked (errcheck) fmt.Fprintf(GinkgoWriter, "running dir: %s\n", cmd.Dir) ^ tests/helper/utils.go:163:14: Error return value of `fmt.Fprintf` is not checked (errcheck) fmt.Fprintf(GinkgoWriter, "chdir dir: %s\n", err) ^ integration_tests/config-refresh_test.go:97:10: QF1004: could use strings.ReplaceAll instead (staticcheck) out = strings.Replace(out, "\r", "", -1) ^ internal/controller/backstage_controller.go:234:4: QF1003: could use tagged switch on c.Type (staticcheck) if c.Type == appsv1.DeploymentAvailable { ^ internal/controller/spec_preprocessor.go:11:2: ST1019: package "k8s.io/apimachinery/pkg/api/errors" is being imported more than once (staticcheck) k8serrors "k8s.io/apimachinery/pkg/api/errors" ^ internal/controller/spec_preprocessor.go:23:2: ST1019(related information): other import of "k8s.io/apimachinery/pkg/api/errors" (staticcheck) "k8s.io/apimachinery/pkg/api/errors" ^ internal/controller/spec_preprocessor.go:284:11: QF1008: could remove embedded field "Client" from selector (staticcheck) err := r.Client.Get(context.Background(), client.ObjectKey{ ^ internal/controller/watchers.go:154:34: QF1008: could remove embedded field "ObjectMeta" from selector (staticcheck) oldHash := deploy.Spec.Template.ObjectMeta.GetAnnotations()[model.ExtConfigHashAnnotation] ^ pkg/model/db-statefulset.go:101:51: QF1008: could remove embedded field "ObjectMeta" from selector (staticcheck) utils.GenerateLabel(&b.statefulSet.Spec.Template.ObjectMeta.Labels, BackstageAppLabel, utils.BackstageDbAppLabelValue(backstage.Name)) ^ pkg/model/deployment.go:94:17: ST1005: error strings should not be capitalized (staticcheck) return false, fmt.Errorf("Backstage Deployment is not initialized, make sure there is deployment.yaml in default or raw configuration") ^ pkg/model/deployment.go:98:17: ST1005: error strings should not be capitalized (staticcheck) return false, fmt.Errorf("Backstage Deployment is not initialized, Backstage Container is not identified") ^ pkg/model/deployment.go:101:32: QF1008: could remove embedded field "ObjectMeta" from selector (staticcheck) if b.deployment.Spec.Template.ObjectMeta.Annotations == nil { ^ pkg/model/deployment.go:321:2: QF1003: could use tagged switch on kind (staticcheck) if kind == ConfigMapObjectKind { ^ pkg/model/deployment.go:369:4: QF1003: could use tagged switch on kind (staticcheck) if kind == ConfigMapObjectKind { ^ pkg/model/deployment.go:379:4: QF1003: could use tagged switch on kind (staticcheck) if kind == ConfigMapObjectKind { ^ pkg/model/service.go:49:17: ST1005: error strings should not be capitalized (staticcheck) return false, fmt.Errorf("Backstage Service is not initialized, make sure there is service.yaml in default or raw configuration") ^ pkg/utils/utils.go:237:2: QF1003: could use tagged switch on filter (staticcheck) if filter == "*" { ^ tests/helper/helper_backstage.go:14:2: ST1001: should not use dot imports (staticcheck) . "github.com/onsi/ginkgo/v2" ^ tests/helper/helper_backstage.go:15:2: ST1001: should not use dot imports (staticcheck) . "github.com/onsi/gomega" ^ tests/helper/utils.go:12:2: ST1001: should not use dot imports (staticcheck) . "github.com/onsi/ginkgo/v2" ^ tests/helper/utils.go:189:7: QF1004: could use strings.ReplaceAll instead (staticcheck) wd = strings.Replace(wd, "/tests/e2e", "", -1) ^ 32 issues: * errcheck: 13 * staticcheck: 19