File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -169,12 +169,16 @@ common-vet:
169
169
common-lint: $(GOLANGCI_LINT)
170
170
ifdef GOLANGCI_LINT
171
171
@echo ">> running golangci-lint"
172
- # 'go list' needs to be executed before staticcheck to prepopulate the modules cache.
173
- # Otherwise staticcheck might fail randomly for some reason not yet explained.
174
- $(GO) list -e -compiled -test=true -export=false -deps=true -find=false -tags= -- ./... > /dev/null
175
172
$(GOLANGCI_LINT) run $(GOLANGCI_LINT_OPTS) $(pkgs)
176
173
endif
177
174
175
+ .PHONY: common-lint-fix
176
+ common-lint-fix: $(GOLANGCI_LINT)
177
+ ifdef GOLANGCI_LINT
178
+ @echo ">> running golangci-lint fix"
179
+ $(GOLANGCI_LINT) run --fix $(GOLANGCI_LINT_OPTS) $(pkgs)
180
+ endif
181
+
178
182
.PHONY: common-yamllint
179
183
common-yamllint:
180
184
@echo ">> running yamllint on all YAML files in the repository"
You can’t perform that action at this time.
0 commit comments