aboutsummaryrefslogtreecommitdiffstats
path: root/.rubocop.yml
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-07-21 13:49:13 +0200
committerXavier Noria <fxn@hashref.com>2016-07-21 13:52:30 +0200
commit58283b5acdb3434a1085120aa22f8905dad2f513 (patch)
tree54439825eea71091bde6034f8563f36390f91fc5 /.rubocop.yml
parent0800e5dcad571c00c8c33e886c50529001d0badc (diff)
downloadrails-58283b5acdb3434a1085120aa22f8905dad2f513.tar.gz
rails-58283b5acdb3434a1085120aa22f8905dad2f513.tar.bz2
rails-58283b5acdb3434a1085120aa22f8905dad2f513.zip
explain the meaning of some RuboCop config options [ci skip]
For consistency mainly. Also, some have a name that could make the reader think they enforce the opposite of what they do, because the default is not visible there.
Diffstat (limited to '.rubocop.yml')
-rw-r--r--.rubocop.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 62fb263c9e..fbca606605 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -26,18 +26,26 @@ Style/AndOr:
Lint/RequireParentheses:
Enabled: true
+# Do not use braces for hash literals when they are the last argument of a
+# method call.
Style/BracesAroundHashParameters:
Enabled: true
+# Method definitions after `private` or `protected` isolated calls need one
+# extra level of indentation.
Style/IndentationConsistency:
Enabled: true
EnforcedStyle: rails
+# In a regular class definition, no empty lines around the body.
Style/EmptyLinesAroundClassBody:
Enabled: true
+# In a regular module definition, no empty lines around the body.
Style/EmptyLinesAroundModuleBody:
Enabled: true
+# Align `end` with the matching keyword or starting expression except for
+# assignments, where it should be aligned with the LHS.
Lint/EndAlignment:
AlignWith: variable