ledger: new fixed ledger test #10502
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Trailing Whitespace | |
on: | |
pull_request: | |
jobs: | |
check: | |
name: trailing-whitespace | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Check for whitespace errors | |
run: | | |
#!/bin/sh | |
if git rev-parse --verify HEAD >/dev/null 2>&1 | |
then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
fi | |
# Redirect output to stderr. | |
exec 1>&2 | |
# If there are whitespace errors, print the offending file names and fail. | |
if git show --check | |
then | |
echo "No whitespace errors detected." | |
else | |
echo "Whitespace errors detected! Please correct them and try again." | |
exit 1 | |
fi |