From 5358dd70076dc56989dacd884ed047b4b3e2657c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 28 Sep 2020 02:43:26 +0200 Subject: [PATCH] Add a check for trailing whitespace and TABs Just use Git itself to check for it in the new files. --- .github/workflows/code_checks.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/code_checks.yml b/.github/workflows/code_checks.yml index 121701be0b..85191fa9c4 100644 --- a/.github/workflows/code_checks.yml +++ b/.github/workflows/code_checks.yml @@ -41,3 +41,22 @@ jobs: - name: Run codespell run: | CODESPELL=$HOME/.local/bin/codespell ./misc/scripts/spellcheck + + + check-whitespace: + runs-on: ubuntu-20.04 + name: Check Whitespace + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Check for trailing whitespace and TABs + run: | + git fetch --depth=1 origin master + git -c core.whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol,tab-in-indent \ + diff --check origin/master '*' \ + '!**/*akefile*' \ + '!**/*.sln' \ + '!**/*.vcproj' \ + '!**/*.xpm'