From 590cb7c3de5664ad424a94d361be6db02f0329cd Mon Sep 17 00:00:00 2001 From: Burt P Date: Thu, 20 Jul 2017 10:29:46 -0500 Subject: test/ws_scan.sh: scanner for updating issue #102 Signed-off-by: Burt P --- test/ws_scan.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/ws_scan.sh (limited to 'test') diff --git a/test/ws_scan.sh b/test/ws_scan.sh new file mode 100644 index 00000000..46b8a398 --- /dev/null +++ b/test/ws_scan.sh @@ -0,0 +1,11 @@ +#!bash + +# checks for mixed indentation and empty lines with whitespace +# run from test/ + +cd .. +grep -lHIrP --include=*.{h,c} -- '^((\t+ +)|( +\t+)|\s+$)' | sed 's/^/- [ ] /' > test/hardinfo-bad.txt +grep -LHIrP --include=*.{h,c} -- '^((\t+ +)|( +\t+)|\s+$)' | sed 's/^/- [x] /' > test/hardinfo-good.txt +cat test/hardinfo-bad.txt test/hardinfo-good.txt | LC_ALL=C sort -k 1.5 | grep -vP " (test|build)" +rm test/hardinfo-bad.txt test/hardinfo-good.txt +cd test -- cgit v1.2.3