File: ruby-appraiser

package info (click to toggle)
ruby-cliver 0.3.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 208 kB
  • sloc: ruby: 760; makefile: 3
file content (17 lines) | stat: -rwxr-xr-x 549 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
echo -e "\033[0;36mRuby Appraiser: running\033[0m"
bundle exec ruby-appraiser --mode=staged reek rubocop
result_code=$?
if [ $result_code -gt "0" ]; then
  echo -en "\033[0;31m" # RED
  echo "[✘] Ruby Appraiser found newly-created defects and "
  echo "    has blocked your commit."
  echo "    Fix the defects and commit again."
  echo "    To bypass, commit again with --no-verify."
  echo -en "\033[0m" # RESET
  exit $result_code
else
  echo -en "\033[0;32m" # GREEN
  echo "[✔] Ruby Appraiser ok"
  echo -en "\033[0m" #RESET
fi