File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed
Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -5,18 +5,15 @@ if [[ $# -lt 1 ]]; then
55 exit 1
66fi
77
8- funcs=(assertTrue)
98rc=0
10- for func in " ${funcs[@]} " ; do
11- # --color=never because magit git output log doesn't support it
12- grep_rc=0; grep -H --color=never --line-number -P ' \b' " $func " ' \s*[\(;]' " $@ " || grep_rc=$?
13- case " $grep_rc " in
14- 0)
15- echo " $func () is not allowed! use an exception instead." ; rc=1 ;;
16- 1)
17- : ;; # code is good, do nothing
18- * )
19- echo " grep failed!" ; rc=1 ;;
20- esac
21- done
9+ # --color=never because magit git output log doesn't support it
10+ grep_rc=0; grep -H --color=never --line-number -P ' \bassertTrue\s*[\(;]' " $@ " || grep_rc=$?
11+ case " $grep_rc " in
12+ 0)
13+ echo " assertTrue() is not allowed! use assert() instead." ; rc=1 ;;
14+ 1)
15+ : ;; # code is good, do nothing
16+ * )
17+ echo " grep failed!" ; rc=1 ;;
18+ esac
2219exit " $rc "
You can’t perform that action at this time.
0 commit comments