diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index b94a07e6..4c8898c5 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -1,5 +1,5 @@ --- -name: "golangci-lint" +name: "Golang Lint" on: - push - pull_request @@ -16,5 +16,5 @@ jobs: - name: lint uses: golangci/golangci-lint-action@v3 with: - version: v1.54 - args: --timeout=30m + version: v1.55 + args: --timeout=5m diff --git a/Makefile b/Makefile index a1bc94f8..4df439a4 100644 --- a/Makefile +++ b/Makefile @@ -98,6 +98,10 @@ fmt: vet: go vet ./... +# Run golangci-lint +lint: + go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.0 + golangci-lint --timeout 5m run ./... # Generate code generate: controller-gen $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." diff --git a/controllers/testrun_controller.go b/controllers/testrun_controller.go index 12a8a4c5..5e742ae6 100644 --- a/controllers/testrun_controller.go +++ b/controllers/testrun_controller.go @@ -268,7 +268,7 @@ func (r *TestRunReconciler) reconcile(ctx context.Context, req ctrl.Request, log // delete if configured if k6.GetSpec().Cleanup == "post" { log.Info("Cleaning up all resources") - r.Delete(ctx, k6) //nolint:errcheck + _ = r.Delete(ctx, k6) } // notify if configured return ctrl.Result{}, nil diff --git a/main.go b/main.go index ed60b2fc..d85f8ed5 100644 --- a/main.go +++ b/main.go @@ -89,8 +89,8 @@ func main() { os.Exit(1) } - mgr.AddHealthzCheck("health", healthz.Ping) //nolint:errcheck - mgr.AddReadyzCheck("ready", healthz.Ping) //nolint:errcheck + _ = mgr.AddHealthzCheck("health", healthz.Ping) + _ = mgr.AddReadyzCheck("ready", healthz.Ping) if err = (controllers.NewK6Reconciler(&controllers.TestRunReconciler{ Client: mgr.GetClient(),