Exclude vendor directory from format checks

This commit is contained in:
2026-01-08 03:37:58 -08:00
parent d9e57de108
commit 11295db68a

View File

@@ -10,12 +10,12 @@ check: fmt-check lint test
# Check formatting without modifying files # Check formatting without modifying files
fmt-check: fmt-check:
@echo "Checking formatting..." @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 # Format code
fmt: fmt:
@echo "Formatting code..." @echo "Formatting code..."
gofmt -w . gofmt -w $$(find . -name '*.go' -not -path './vendor/*')
# Run linter # Run linter
lint: lint: