Skip to content

Commit 82b1fee

Browse files
committed
checking ruby code same way we check php code
1 parent 783d0ad commit 82b1fee

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

ruby-check

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
[[ "$1" = "recent" ]] && ADDITONAL_OPTIONS="-mmin -240"
4+
5+
find . $ADDITONAL_OPTIONS -name "*.rb" -print0 | xargs -0 -n1 -P10 ruby -c | grep -v 'Syntax OK'
6+
7+
if [ "$?" -eq "0" ]; then
8+
exit 1
9+
else
10+
exit 0
11+
fi

0 commit comments

Comments
 (0)