11AllCops :
2- TargetRubyVersion : 2.2
2+ TargetRubyVersion : 2.4
33 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
44 # to ignore them, so only the ones explicitly set in this file are enabled.
55 DisabledByDefault : true
@@ -8,80 +8,117 @@ AllCops:
88Style/AndOr :
99 Enabled : true
1010
11- # Do not use braces for hash literals when they are the last argument of a
12- # method call.
13- Style/BracesAroundHashParameters :
11+ # Align `when` with `case`.
12+ Layout/CaseIndentation :
1413 Enabled : true
1514
16- # Align `when` with `case`.
17- Style/CaseIndentation :
15+ Layout/ClosingHeredocIndentation :
1816 Enabled : true
1917
2018# Align comments with method definitions.
21- Style/CommentIndentation :
19+ Layout/CommentIndentation :
20+ Enabled : true
21+
22+ Layout/ElseAlignment :
23+ Enabled : true
24+
25+ # Align `end` with the matching keyword or starting expression except for
26+ # assignments, where it should be aligned with the LHS.
27+ Layout/EndAlignment :
28+ Enabled : true
29+ EnforcedStyleAlignWith : variable
30+ AutoCorrect : true
31+
32+ Layout/EmptyLineAfterMagicComment :
2233 Enabled : true
2334
24- # No extra empty lines.
25- Style/EmptyLines :
35+ Layout/EmptyLinesAroundAccessModifier :
36+ Enabled : true
37+ EnforcedStyle : only_before
38+
39+ Layout/EmptyLinesAroundBlockBody :
2640 Enabled : true
2741
2842# In a regular class definition, no empty lines around the body.
29- Style/EmptyLinesAroundClassBody :
43+ Layout/EmptyLinesAroundClassBody :
44+ Enabled : true
45+
46+ # In a regular method definition, no empty lines around the body.
47+ Layout/EmptyLinesAroundMethodBody :
3048 Enabled : true
3149
3250# In a regular module definition, no empty lines around the body.
33- Style /EmptyLinesAroundModuleBody :
51+ Layout /EmptyLinesAroundModuleBody :
3452 Enabled : true
3553
3654# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
3755Style/HashSyntax :
3856 Enabled : true
3957
58+ Layout/FirstArgumentIndentation :
59+ Enabled : true
60+
4061# Method definitions after `private` or `protected` isolated calls need one
4162# extra level of indentation.
42- Style /IndentationConsistency :
63+ Layout /IndentationConsistency :
4364 Enabled : true
44- EnforcedStyle : rails
65+ EnforcedStyle : indented_internal_methods
4566
4667# Two spaces, no tabs (for indentation).
47- Style/IndentationWidth :
68+ Layout/IndentationWidth :
69+ Enabled : true
70+
71+ Layout/LeadingCommentSpace :
72+ Enabled : true
73+
74+ Layout/SpaceAfterColon :
75+ Enabled : true
76+
77+ Layout/SpaceAfterComma :
78+ Enabled : true
79+
80+ Layout/SpaceAfterSemicolon :
4881 Enabled : true
4982
50- Style/SpaceAfterColon :
83+ Layout/SpaceAroundEqualsInParameterDefault :
5184 Enabled : true
5285
53- Style/SpaceAfterComma :
86+ Layout/SpaceAroundKeyword :
5487 Enabled : true
5588
56- Style/SpaceAroundEqualsInParameterDefault :
89+ Layout/SpaceBeforeComma :
5790 Enabled : true
5891
59- Style/SpaceAroundKeyword :
92+ Layout/SpaceBeforeComment :
6093 Enabled : true
6194
62- Style/SpaceAroundOperators :
95+ Layout/SpaceBeforeFirstArg :
6396 Enabled : true
6497
65- Style/SpaceBeforeFirstArg :
66- Enabled : true
98+ Style/DefWithParentheses :
99+ Enabled : true
67100
68101# Defining a method with parameters needs parentheses.
69102Style/MethodDefParentheses :
70103 Enabled : true
71104
105+ Style/RedundantFreeze :
106+ Enabled : true
107+
72108# Use `foo {}` not `foo{}`.
73- Style /SpaceBeforeBlockBraces :
109+ Layout /SpaceBeforeBlockBraces :
74110 Enabled : true
75111
76112# Use `foo { bar }` not `foo {bar}`.
77- Style /SpaceInsideBlockBraces :
113+ Layout /SpaceInsideBlockBraces :
78114 Enabled : true
115+ EnforcedStyleForEmptyBraces : space
79116
80117# Use `{ a: 1 }` not `{a:1}`.
81- Style /SpaceInsideHashLiteralBraces :
118+ Layout /SpaceInsideHashLiteralBraces :
82119 Enabled : true
83120
84- Style /SpaceInsideParens :
121+ Layout /SpaceInsideParens :
85122 Enabled : true
86123
87124# Check quotes usage according to lint rule below.
@@ -90,27 +127,66 @@ Style/StringLiterals:
90127 EnforcedStyle : double_quotes
91128
92129# Detect hard tabs, no hard tabs.
93- Style /Tab :
130+ Layout /Tab :
94131 Enabled : true
95132
96- # Blank lines should not have any spaces.
97- Style/TrailingBlankLines :
133+ # Empty lines should not have any spaces.
134+ Layout/TrailingEmptyLines :
98135 Enabled : true
99136
100137# No trailing whitespace.
101- Style /TrailingWhitespace :
138+ Layout /TrailingWhitespace :
102139 Enabled : true
103140
104141# Use quotes for string literals when they are enough.
105- Style/UnneededPercentQ :
142+ Style/RedundantPercentQ :
106143 Enabled : true
107144
108- # Align `end` with the matching keyword or starting expression except for
109- # assignments, where it should be aligned with the LHS.
110- Lint/EndAlignment :
145+ Lint/AmbiguousOperator :
146+ Enabled : true
147+
148+ Lint/AmbiguousRegexpLiteral :
149+ Enabled : true
150+
151+ Lint/ErbNewArguments :
111152 Enabled : true
112- AlignWith : variable
113153
114154# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
115155Lint/RequireParentheses :
116156 Enabled : true
157+
158+ Lint/ShadowingOuterLocalVariable :
159+ Enabled : true
160+
161+ Lint/RedundantStringCoercion :
162+ Enabled : true
163+
164+ Lint/UriEscapeUnescape :
165+ Enabled : true
166+
167+ Lint/UselessAssignment :
168+ Enabled : true
169+
170+ Lint/DeprecatedClassMethods :
171+ Enabled : true
172+
173+ Style/ParenthesesAroundCondition :
174+ Enabled : true
175+
176+ Style/RedundantBegin :
177+ Enabled : true
178+
179+ Style/RedundantReturn :
180+ Enabled : true
181+ AllowMultipleReturnValues : true
182+
183+ Style/Semicolon :
184+ Enabled : true
185+ AllowAsExpressionSeparator : true
186+
187+ # Prefer Foo.method over Foo::method
188+ Style/ColonMethodCall :
189+ Enabled : true
190+
191+ Style/TrivialAccessors :
192+ Enabled : true
0 commit comments