Skip to content

Commit

Permalink
Automatically Fix Linting Issues (aws#7164)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanmeier5 authored Dec 13, 2023
1 parent f5dd593 commit 1d5a8a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ envtest-setup: $(SETUP_ENVTEST)
lint: $(GOLANGCI_LINT) ## Run golangci-lint
$(GOLANGCI_LINT) run --new-from-rev main

.PHONY: lint-fix
lint-fix: $(GOLANGCI_LINT) ## Run golangci-lint and automatically fix lint errors
$(GOLANGCI_LINT) run --fix --new-from-rev main

$(GOLANGCI_LINT): $(TOOLS_BIN_DIR) $(GOLANGCI_LINT_CONFIG)
$(eval GOLANGCI_LINT_VERSION?=$(shell cat .github/workflows/golangci-lint.yml | yq e '.jobs.golangci.steps[] | select(.name == "golangci-lint") .with.version' -))
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(TOOLS_BIN_DIR) $(GOLANGCI_LINT_VERSION)
Expand Down

0 comments on commit 1d5a8a4

Please sign in to comment.