diff --git a/.github/workflows/project-checks.yaml b/.github/workflows/project-checks.yaml index cce056bb0..46a34566b 100644 --- a/.github/workflows/project-checks.yaml +++ b/.github/workflows/project-checks.yaml @@ -27,6 +27,14 @@ jobs: with: go-version: ${{ env.GO_VERSION }} + - name: Check trailing whitespace errors + if: ${{ github.event_name == 'pull_request' }} + run: | + git fetch origin ${{ github.base_ref }} + git diff-index --check origin/${{ github.base_ref }} -- || { + echo "This PR introduces whitespace errors. Please fix them." + exit 1 + } - name: make verify run: | make verify