Skip to content

Instantly share code, notes, and snippets.

@rafamaciel
Created June 25, 2019 15:55
Show Gist options
  • Save rafamaciel/8a72ae0d4c179c8dae9317e7d534763f to your computer and use it in GitHub Desktop.
Save rafamaciel/8a72ae0d4c179c8dae9317e7d534763f to your computer and use it in GitHub Desktop.
Check Rubycritic
rake rubycritic:specs:ci | tee /tmp/rubycritic.specs.log
export RUBYCRITIC_SPECS_SCORE=`cat /tmp/rubycritic.specs.log | grep 'Score' | cut -d " " -f 2 | tr -d '()'`
export RUBYCRITIC_SPECS_SCORE=${RUBYCRITIC_SPECS_SCORE%.*}
if [[ $RUBYCRITIC_SPECS_SCORE -lt $RUBYCRITIC_SPECS_MINIMUM_SCORE ]]
then
echo $RUBYCRITIC_SPECS_SCORE
exit 1
fi
rake rubycritic:ci | tee /tmp/rubycritic.log
export RUBYCRITIC_SCORE=`cat /tmp/rubycritic.log | grep 'Score' | cut -d " " -f 2 | tr -d '()'`
export RUBYCRITIC_SCORE=${RUBYCRITIC_SCORE%.*}
if [[ $RUBYCRITIC_SCORE -lt $RUBYCRITIC_MINIMUM_SCORE ]]
then
echo $RUBYCRITIC_SCORE
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment