Sha256: 3d92da1ad903afb8718ac02b9c125ccb7d5dbd7feb0be948cf505cb0d637061f

Contents?: true

Size: 743 Bytes

Versions: 2

Compression:

Stored size: 743 Bytes

Contents

#!/usr/bin/env bash
#
# Usage:
# bin/rubocop [-A|-t|-h]
#
# Options:
#  Autocorrect  -A
#  Make todo    -t
#  Usage        -h,--help,help

set -e

case $1 in
  -A)
     echo "Rubocop autocorrect is ON" >&2
     bundle exec rake -f lib/tasks/rubocop.rake rubocop:auto_correct
     ;;

  -t)
     echo "Rubocop is generating a new TODO" >&2
     bundle exec rake -f lib/tasks/rubocop.rake rubocop:auto_gen_config
     ;;

  -h|--help|help)
     sed -ne '/^#/!q;s/.\{1,2\}//;1d;p' < "$0"
     ;;

  *)
     # with no args, run vanilla rubocop
     # else assume we're passing in arbitrary arguments
     if [ -z "$1" ]; then
       bundle exec rake -f lib/tasks/rubocop.rake rubocop
     else
       bundle exec rubocop "$@"
     fi
     ;;
esac

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
api_doc_server-1.0.1 bin/rubocop
api_doc_server-1.0.0 bin/rubocop