Skip to content

Address some FIXMEs for wen-restart #9865

Address some FIXMEs for wen-restart

Address some FIXMEs for wen-restart #9865

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