From 92ba45df97a6ca93f5f2c8d068ce43031dc832c5 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Wed, 2 Apr 2025 12:31:28 +0200 Subject: [PATCH] Include whitespace check in 'make' and 'make ws' Also use 'make ws' in github action. Follow up to #2603 --- .github/workflows/push.yml | 2 +- Makefile | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 4b72aa1bb5..554a58fc36 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -114,7 +114,7 @@ jobs: # Exit with status code 1 if there are differences (i.e. unformatted files) git diff --exit-code - name: Run whitespace check - run: python tools/validate_whitespace.py + run: make ws validate-bundle-schema: needs: cleanups diff --git a/Makefile b/Makefile index 2a7e50fbf7..05c713eeeb 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -default: vendor fmt lint tidy +default: vendor fmt lint tidy ws PACKAGES=./acceptance/... ./libs/... ./internal/... ./cmd/... ./bundle/... . @@ -20,6 +20,9 @@ fmt: ruff format -qn golangci-lint fmt +ws: + ./tools/validate_whitespace.py + test: ${GOTESTSUM_CMD} -- ${PACKAGES} @@ -65,4 +68,4 @@ generate: [ ! -f tagging.py ] || mv tagging.py internal/genkit/tagging.py [ ! -f .github/workflows/next-changelog.yml ] || rm .github/workflows/next-changelog.yml -.PHONY: lint tidy lintcheck fmt test cover showcover build snapshot vendor schema integration integration-short acc-cover acc-showcover docs +.PHONY: lint tidy lintcheck fmt test cover showcover build snapshot vendor schema integration integration-short acc-cover acc-showcover docs ws