Make 'make lint' apply --fix (#1995)

Add 'make lintcheck' to lint without fixing. Fixing is what you usually
want.

No changes to github workflow since that does not call our Makefile.
This commit is contained in:
Denis Bilenko 2024-12-11 13:53:57 +01:00 committed by GitHub
parent 8d5351c1c3
commit e39e94b12f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 5 deletions

View File

@ -7,13 +7,13 @@ fmt:
@gofmt -w $(shell find . -type f -name '*.go' -not -path "./vendor/*")
lint: vendor
@echo "✓ Linting source code with https://golangci-lint.run/ (with --fix)..."
@golangci-lint run --fix ./...
lintcheck: vendor
@echo "✓ Linting source code with https://golangci-lint.run/ ..."
@golangci-lint run ./...
lintfix: vendor
@echo "✓ Linting source code with 'golangci-lint run --fix' ..."
@golangci-lint run --fix ./...
test: lint testonly
testonly:
@ -39,4 +39,4 @@ vendor:
integration:
gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./internal/..." -- -run "TestAcc.*" -parallel 4 -timeout=2h
.PHONY: fmt lint lintfix test testonly coverage build snapshot vendor integration
.PHONY: fmt lint lintcheck test testonly coverage build snapshot vendor integration