Exclude vendor directory from format checks
This commit is contained in:
parent
d9e57de108
commit
11295db68a
4
Makefile
4
Makefile
@ -10,12 +10,12 @@ check: fmt-check lint test
|
||||
# Check formatting without modifying files
|
||||
fmt-check:
|
||||
@echo "Checking formatting..."
|
||||
@test -z "$$(gofmt -l .)" || (echo "Files need formatting:"; gofmt -l .; exit 1)
|
||||
@test -z "$$(gofmt -l . | grep -v '^vendor/')" || (echo "Files need formatting:"; gofmt -l . | grep -v '^vendor/'; exit 1)
|
||||
|
||||
# Format code
|
||||
fmt:
|
||||
@echo "Formatting code..."
|
||||
gofmt -w .
|
||||
gofmt -w $$(find . -name '*.go' -not -path './vendor/*')
|
||||
|
||||
# Run linter
|
||||
lint:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user