name: Detect trailing whitespace on: pull_request: branches: - master jobs: whitespace: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Remove whitespace and check the diff run: | set -eu scripts/remove_trailing_whitespace.sh git diff >whitespace.patch cat whitespace.patch if [ $(wc -c