Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linters #1432

Merged
merged 2 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.61.0
args: --timeout 5m0s
- name: lint
run:
make lint
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,13 @@ CLEANFILES += $(GOLANGCI_TMP_FILE)
vet: ## Run go vet against code.
go vet ./...

GOLANGCI_LINT_TIMEOUT ?= 5m0s
.PHONY: lint
lint: golangci-lint ## Run golangci-lint against code.
$(GOLANGCI_LINT) run --timeout=$(GOLANGCI_LINT_TIMEOUT) --sort-results

.PHONY: lint-fix
lint-fix: golangci-lint ## Run golangci-lint against code.
$(GOLANGCI_LINT) run --fix --sort-results

.PHONY: get-manifests
Expand Down
1 change: 1 addition & 0 deletions controllers/dscinitialization/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ var testScheme = runtime.NewScheme()
//nolint:fatcontext
var _ = BeforeSuite(func() {
// can't use suite's context as the manager should survive the function
//nolint:fatcontext
gCtx, gCancel = context.WithCancel(context.Background())

logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true)))
Expand Down
1 change: 1 addition & 0 deletions controllers/webhook/webhook_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func TestAPIs(t *testing.T) {
//nolint:fatcontext
var _ = BeforeSuite(func() {
// can't use suite's context as the manager should survive the function
//nolint:fatcontext
gCtx, gCancel = context.WithCancel(context.Background())

logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true)))
Expand Down
Loading