gitlab-org--gitlab-foss/lib/tasks/rubocop.rake

26 lines
514 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2015-02-03 22:25:57 -05:00
unless Rails.env.production?
require 'rubocop/rake_task'
2015-02-03 22:25:57 -05:00
RuboCop::RakeTask.new
namespace :rubocop do
namespace :todo do
desc 'Generate RuboCop todos'
task :generate do # rubocop:disable Rails/RakeEnvironment
require 'rubocop'
options = %w[
--auto-gen-config
--auto-gen-only-exclude
--exclude-limit=100000
--no-offense-counts
]
RuboCop::CLI.new.run(options)
end
end
end
2015-02-03 22:25:57 -05:00
end