Skip to content

Instantly share code, notes, and snippets.

@koic
Last active January 18, 2018 03:07
Show Gist options
  • Save koic/72b70c899b92fb5077eccdb3dde0a3a1 to your computer and use it in GitHub Desktop.
Save koic/72b70c899b92fb5077eccdb3dde0a3a1 to your computer and use it in GitHub Desktop.
Enable autocorrect for Lint/EndAlignment cop
% g diff .rubocop.yml
diff --git a/.rubocop.yml b/.rubocop.yml
index a04de4b497..3b4dd79e81 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -26,6 +26,9 @@ Layout/CaseIndentation:
 Layout/CommentIndentation:
   Enabled: true

+Layout/ElseAlignment:
+  Enabled: true
+
 Layout/EmptyLineAfterMagicComment:
   Enabled: true

@@ -140,6 +143,7 @@ Style/UnneededPercentQ:
 Lint/EndAlignment:
   Enabled: true
   EnforcedStyleAlignWith: variable
+  AutoCorrect: true

 # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
 Lint/RequireParentheses:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment