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 7a1d7b7 commit ec8a1e5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/project-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}

- name: Git-check PR for conflict markers and trailing whitespace errors.
if: ${{ github.event_name == 'pull_request' }}
run: |
git fetch -q origin ${{ github.base_ref }}
if ! git diff-index --check origin/${{ github.base_ref }} --; then
echo "This PR would introduce the above errors."
echo "Please fix them and update the PR."
exit 1
fi
- name: make verify
run: |
make verify
Expand Down

0 comments on commit ec8a1e5

Please sign in to comment.