diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d817553734..b80f2ed33b 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -245,16 +245,6 @@ Layout/EmptyLines: - 'spec/support/delayed_job_helper.rb' - 'spec/support/matchers/table_matchers.rb' -# Offense count: 6 -# Cop supports --auto-correct. -Layout/EmptyLinesAroundAccessModifier: - Exclude: - - 'app/controllers/admin/order_cycles_controller.rb' - - 'app/controllers/spree/admin/shipping_methods_controller_decorator.rb' - - 'app/helpers/angular_form_builder.rb' - - 'spec/helpers/products_helper_spec.rb' - - 'spec/support/request/web_helper.rb' - # Offense count: 66 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. diff --git a/script/rubocop_autocorrect b/script/rubocop_autocorrect new file mode 100755 index 0000000000..bacbb97dcc --- /dev/null +++ b/script/rubocop_autocorrect @@ -0,0 +1,7 @@ +#!/bin/sh + +$COP=$1 + +bundle exec rubocop -a --only "$COP" +git add -A +git commit -m "Auto correct Rubocop's ${COP} cop"