Skip to content

Commit

Permalink
.github: add trailing whitespace error check.
Browse files Browse the repository at this point in the history
Add trailing whitespace error check to our project-checks workflow.

Signed-off-by: Krisztian Litkey <[email protected]>
  • Loading branch information
klihub committed Oct 23, 2023
1 parent c96ed9b commit 863d604
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/project-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}

- name: Git-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 }} --
if [ "$?" != "0" ]; then
echo "This PR would introduce trailing whitespace errors."
echo "Please fix them and update the PR."
exit 1
else
echo "OK, no whitespace errors"
fi
- name: make verify
run: |
make verify
Expand Down

0 comments on commit 863d604

Please sign in to comment.