mirror of https://github.com/databricks/cli.git
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:
parent
8d5351c1c3
commit
e39e94b12f
10
Makefile
10
Makefile
|
@ -7,13 +7,13 @@ fmt:
|
||||||
@gofmt -w $(shell find . -type f -name '*.go' -not -path "./vendor/*")
|
@gofmt -w $(shell find . -type f -name '*.go' -not -path "./vendor/*")
|
||||||
|
|
||||||
lint: 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/ ..."
|
@echo "✓ Linting source code with https://golangci-lint.run/ ..."
|
||||||
@golangci-lint run ./...
|
@golangci-lint run ./...
|
||||||
|
|
||||||
lintfix: vendor
|
|
||||||
@echo "✓ Linting source code with 'golangci-lint run --fix' ..."
|
|
||||||
@golangci-lint run --fix ./...
|
|
||||||
|
|
||||||
test: lint testonly
|
test: lint testonly
|
||||||
|
|
||||||
testonly:
|
testonly:
|
||||||
|
@ -39,4 +39,4 @@ vendor:
|
||||||
integration:
|
integration:
|
||||||
gotestsum --format github-actions --rerun-fails --jsonfile output.json --packages "./internal/..." -- -run "TestAcc.*" -parallel 4 -timeout=2h
|
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
|
||||||
|
|
Loading…
Reference in New Issue