We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 783d0ad commit 82b1feeCopy full SHA for 82b1fee
1 file changed
ruby-check
@@ -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