osem-fcy/lib/tasks/rubocop.rake
Henne Vogelsang 3f07a8e68c
Only define rubocop tasks in the dev env
This broke loading the rake tasks in the production environment as we only have
rubocop in development.
2019-05-07 15:43:25 +02:00

17 lines
398 B
Ruby

# frozen_string_literal: true
unless Rails.env.production?
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:rubocop) do |task|
task.patterns = []
task.options = ['--display-cop-names']
end
namespace :rubocop do
desc 'Generate .rubocop_todo.yml'
task :auto_gen_config do
sh 'rubocop --display-cop-names --auto-gen-config --auto-gen-only-exclude'
end
end
end