mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
feat(CI): check for trailing whitespace
Run on pull request only. Use a shell script to check for trailing whitespace in all files. Fail if trailing whitespace is found.
This commit is contained in:
Executable
+13
@@ -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
|
||||
Reference in New Issue
Block a user