added TAB checker script, to be added to the PR checker action

This commit is contained in:
mrdudz 2022-04-16 18:18:51 +02:00
parent 2eb20b3e8a
commit 4b492ed4e5
3 changed files with 27 additions and 1 deletions

7
.github/checks/Makefile vendored Normal file
View File

@ -0,0 +1,7 @@
.PHONY: tabs
check: tabs
tabs: tabs.sh
@./tabs.sh

16
.github/checks/tabs.sh vendored Executable file
View File

@ -0,0 +1,16 @@
#! /bin/bash
OLDCWD=`pwd`
SCRIPT_PATH=`dirname $0`
cd $SCRIPT_PATH/../../
FILES=`find $CHECK_PATH -type f \( \( -name \*.inc -a \! -name Makefile.inc \) -o -name \*.cfg -o -name \*.c -o -name \*.s -o -name \*.h -o -name \*.asm -o -name \*.sgml \) -print | xargs grep -l $'\t' | grep -v "libwrk/" | grep -v "testwrk/"`
cd $OLDCWD
if [ x"$FILES"x != xx ]; then
echo "error: found TABs in the following files:"
for n in $FILES; do
echo $n
done
exit -1
fi

View File

@ -1,4 +1,4 @@
.PHONY: all mostlyclean clean install zip avail unavail bin lib doc html info samples test util
.PHONY: all mostlyclean clean install zip avail unavail bin lib doc html info samples test util check
.SUFFIXES:
@ -24,6 +24,9 @@ samples:
test:
@$(MAKE) -C test --no-print-directory $@
check:
@$(MAKE) -C .github/checks --no-print-directory $@
util:
@$(MAKE) -C util --no-print-directory $@