Auto correct Rubocop's Layout/EmptyLinesAroundAccessModifier cop

This also `script/rubocop_autocorrect` to automate the process of fixing
a cop and comitting the changes.
This commit is contained in:
Pau Perez
2018-04-09 18:46:11 +02:00
parent e876ef7df1
commit 9da33b4e82
2 changed files with 7 additions and 10 deletions

View File

@@ -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.

7
script/rubocop_autocorrect Executable file
View File

@@ -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"