diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-02-13 15:46:51 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-02-13 15:46:51 +0900 |
| commit | 9a9c95986a2bb5d647f7a610c04987cd2b9397f4 (patch) | |
| tree | 8633cea9ea49d12fc2c4595e27beadfa3e9610db /test | |
| parent | 8e01fc89336811d4200a2017e229b1b2a1b23e8f (diff) | |
| parent | d55a74c4187837347f8edbdd034e28cfee1e9a15 (diff) | |
| download | mruby-9a9c95986a2bb5d647f7a610c04987cd2b9397f4.tar.gz mruby-9a9c95986a2bb5d647f7a610c04987cd2b9397f4.zip | |
Merge pull request #5341 from jbampton/check-for-trailing-whitespace
feat(CI): check for trailing whitespace
Diffstat (limited to 'test')
| -rwxr-xr-x | test/check-for-trailing-whitespace.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/check-for-trailing-whitespace.sh b/test/check-for-trailing-whitespace.sh new file mode 100755 index 000000000..00be038f3 --- /dev/null +++ b/test/check-for-trailing-whitespace.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +cd .. || exit +# print first +grep -EHInr '( +)$' ./* + +var=$(grep -EHInr '( +)$' ./*) +# then exit with fail if found +if test -z "$var"; then + exit 0 +else + exit 1 +fi |
