Make whitespace fixing a script.

This commit is contained in:
Pentarctagon 2021-05-02 16:40:40 -05:00
parent 07a4be462b
commit 73c4e19ea2
No known key found for this signature in database
GPG Key ID: 9456BC54A21DBFA0
2 changed files with 6 additions and 3 deletions

View File

@ -41,9 +41,7 @@ execute() {
# check for trailing whitespace in hpp|cpp files
# check for trailing whitespace in lua files
checkindent() {
make -C data/tools reindent
find src/ -name \*.\[ch\]pp -print0 | xargs -0 sed -i 's/[[:blank:]]*$//'
find data/lua/ -name \*.lua -print0 | xargs -0 sed -i 's/[[:blank:]]*$//'
./utils/CI/fix_whitespace.sh
git status
(( $(git status --short | wc -l) == 0 ))
}

5
utils/CI/fix_whitespace.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
make -C data/tools reindent
find src/ -name \*.\[ch\]pp -print0 | xargs -0 sed -i 's/[[:blank:]]*$//'
find data/lua/ -name \*.lua -print0 | xargs -0 sed -i 's/[[:blank:]]*$//'