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

Removing duplicate fix target #201

Merged
merged 1 commit into from
Oct 14, 2022
Merged
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
16 changes: 6 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,19 @@ test-sanity: generate fix lint ## Test repo formatting, linting, etc.
build:
CGO_ENABLED=0 mkdir -p $(BUILD_DIR) && go build $(GO_BUILD_ARGS) -o $(BUILD_DIR) ./

# Run go fmt and go mod tidy, and check for clean git tree
.PHONY: fix
fix:
go mod tidy
go fmt ./...
git diff --exit-code
.PHONY: setup-lint
setup-lint: ## Setup the lint
fetch golangci-lint 1.45.2

# Run various checks against code
.PHONY: lint
lint:
fetch golangci-lint 1.45.2 && golangci-lint run
lint: setup-lint
golangci-lint run
Copy link
Member

@varshaprasad96 varshaprasad96 Oct 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we missing to exit if tree is unclean? git diff --exit-code. Either in lint or fix


.PHONY: fix
fix: ## Fixup files in the repo.
fix: setup-lint ## Fixup files in the repo.
go mod tidy
go fmt ./...
make lint
golangci-lint run --fix

.PHONY: release
Expand Down