2021-02-05 07:09:31 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-02-03 22:25:57 -05:00
|
|
|
unless Rails.env.production?
|
|
|
|
require 'rubocop/rake_task'
|
2016-05-21 19:27:15 -04:00
|
|
|
|
2015-02-03 22:25:57 -05:00
|
|
|
RuboCop::RakeTask.new
|
2021-09-14 08:10:35 -04:00
|
|
|
|
|
|
|
namespace :rubocop do
|
|
|
|
namespace :todo do
|
|
|
|
desc 'Generate RuboCop todos'
|
2021-10-08 17:09:48 -04:00
|
|
|
task :generate do # rubocop:disable Rails/RakeEnvironment
|
2021-09-14 08:10:35 -04:00
|
|
|
require 'rubocop'
|
|
|
|
|
|
|
|
options = %w[
|
|
|
|
--auto-gen-config
|
|
|
|
--auto-gen-only-exclude
|
|
|
|
--exclude-limit=100000
|
2021-10-08 17:09:48 -04:00
|
|
|
--no-offense-counts
|
2021-09-14 08:10:35 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
RuboCop::CLI.new.run(options)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2015-02-03 22:25:57 -05:00
|
|
|
end
|