Add a check for trailing whitespace and TABs
Just use Git itself to check for it in the new files.
This commit is contained in:
19
.github/workflows/code_checks.yml
vendored
19
.github/workflows/code_checks.yml
vendored
@@ -41,3 +41,22 @@ jobs:
|
|||||||
- name: Run codespell
|
- name: Run codespell
|
||||||
run: |
|
run: |
|
||||||
CODESPELL=$HOME/.local/bin/codespell ./misc/scripts/spellcheck
|
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'
|
||||||
|
Reference in New Issue
Block a user