mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 11:44:02 +00:00
Add rake tasks for Rubocop
To always run rubocop with the same options (specially important when regenerating the todo file). It creates the following three tasks: rake rubocop # Run RuboCop on the whole project rake rubocop:auto_correct # Auto-correct RuboCop offenses rake rubocop:auto_gen_config # Generate .rubocop_todo.yml
This commit is contained in:
parent
3fabb7a1e2
commit
e31d848e75
4 changed files with 16 additions and 0 deletions
BIN
lib/tasks/.capitalize_colors.rake.swp
Normal file
BIN
lib/tasks/.capitalize_colors.rake.swp
Normal file
Binary file not shown.
BIN
lib/tasks/.data.rake.swp
Normal file
BIN
lib/tasks/.data.rake.swp
Normal file
Binary file not shown.
BIN
lib/tasks/.rubocop.rake.swp
Normal file
BIN
lib/tasks/.rubocop.rake.swp
Normal file
Binary file not shown.
16
lib/tasks/rubocop.rake
Normal file
16
lib/tasks/rubocop.rake
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rubocop/rake_task'
|
||||
|
||||
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
|
||||
|
||||
desc 'Run RuboCop on the whole project'
|
||||
RuboCop::RakeTask.new(:rubocop) do |task|
|
||||
task.patterns = []
|
||||
task.options = ['--display-cop-names']
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue