Created
July 17, 2014 07:04
-
-
Save matthijsgroen/df536872f095f8bcca13 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if Rails.env.development? | |
require 'rubocop/rake_task' | |
# http://img4.wikia.nocookie.net/__cb20131111193341/lego/images/8/8b/Good_bad_cop.png | |
namespace :cop do | |
desc 'Run RuboCop using the CI config' | |
RuboCop::RakeTask.new(:good) do |task| | |
task.formatters = ['progress'] | |
task.options = [['--config', 'tools/ci/rubocop.yml']] | |
task.fail_on_error = true | |
end | |
desc 'Run RuboCop the most strict config' | |
RuboCop::RakeTask.new(:bad) do |task| | |
task.formatters = ['offenses'] | |
# don't abort rake on failure | |
task.fail_on_error = false | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment