From 5d824d7d7b6168a650169897c85d595b786db13f Mon Sep 17 00:00:00 2001 From: Ricardo Abreu Date: Tue, 3 Dec 2024 12:27:07 +0000 Subject: [PATCH] [ci] Check whitespace on PRs --- .github/actions/whitespace/action.yml | 13 +++++++++++++ .github/workflows/linux.yml | 3 +++ 2 files changed, 16 insertions(+) create mode 100644 .github/actions/whitespace/action.yml diff --git a/.github/actions/whitespace/action.yml b/.github/actions/whitespace/action.yml new file mode 100644 index 0000000000..8c0aaa9b01 --- /dev/null +++ b/.github/actions/whitespace/action.yml @@ -0,0 +1,13 @@ +name: Whitespace +description: Run Whitespace steps + +runs: + using: composite + steps: + - name: Check for bad whitespace changes + shell: bash + run: | + set -e -o pipefail + + # On pull requests, HEAD^1 will always be the merge base + git diff --check HEAD^1 \ No newline at end of file diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 578af89107..db86d9cad3 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -28,6 +28,9 @@ jobs: with: fetch-depth: 2 + - name: Check whitespace + uses: ./.github/actions/whitespace + - name: Lint the code uses: ./.github/actions/lint