Guard::Rubocop
Guard::Rubocop allows you to automatically check Ruby code style with RuboCop when files are modified.
Tested on MRI 1.9 and MRI 2.0, according to RuboCop.
Installation
Please make sure to have Guard installed before continue.
Add guard-rubocop to your Gemfile:
group :development do
gem 'guard-rubocop'
endand then execute:
$ bundle installor install it yourself as:
$ gem install guard-rubocopAdd the default Guard::Rubocop definition to your Guardfile by running:
$ guard init rubocopUsage
Please read the Guard usage documentation.
Options
You can pass some options in Guardfile:
guard :rubocop, all_on_start: false, notification: true do
# ...
endAvailable Options
all_on_start: true # Check all files at Guard startup, default: true
keep_failed: true # Keep failed files until they pass, default: true
notification: :failed # Display Growl notification after each run
# true - Always notify
# false - Never notify
# :failed - Notify only when failed
# default: :failedContributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request