Skip to content

Commit f7010e9

Browse files
committed
Update rubocop
1 parent 35c0dcf commit f7010e9

File tree

1 file changed

+93
-91
lines changed

1 file changed

+93
-91
lines changed

.rubocop.yml

+93-91
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ AllCops:
55
- !ruby/regexp /(vendor|bundle|bin|db)\/.*/
66
DisplayCopNames: true
77
DisplayStyleGuide: true
8-
TargetRubyVersion: 2.2
8+
TargetRubyVersion: 2.4
9+
TargetRailsVersion: 4.2
910
# https://github.com/bbatsov/rubocop/blob/master/manual/caching.md
1011
# https://github.com/bbatsov/rubocop/blob/e8680418b351491e111a18cf5b453fc07a3c5239/config/default.yml#L60-L77
1112
UseCache: true
@@ -40,104 +41,20 @@ Style/MissingElse:
4041
Style/EmptyElse:
4142
EnforcedStyle: empty
4243

43-
Style/AlignParameters:
44-
EnforcedStyle: with_fixed_indentation
45-
Enabled: true
46-
47-
Style/AlignHash:
48-
EnforcedHashRocketStyle: key
49-
EnforcedColonStyle: key
50-
EnforcedLastArgumentHashStyle: ignore_implicit
51-
52-
Style/IndentHash:
53-
EnforcedStyle: consistent
54-
55-
Style/IndentationWidth:
56-
Width: 2
57-
58-
Style/MultilineOperationIndentation:
59-
EnforcedStyle: indented
60-
61-
Style/ClosingParenthesisIndentation:
62-
Enabled: false
63-
64-
Style/SpaceInsideHashLiteralBraces:
65-
EnforcedStyle: no_space
66-
67-
Style/FirstParameterIndentation:
68-
EnforcedStyle: special_for_inner_method_call_in_parentheses
69-
70-
Style/ExtraSpacing:
71-
Enabled: true
72-
7344
Lint/BlockAlignment:
7445
Enabled: true
7546
EnforcedStyleAlignWith: either
7647

7748
Lint/EndAlignment:
7849
Enabled: true
7950

80-
Style/SpaceAfterColon:
81-
Enabled: true
82-
83-
Style/SpaceAfterComma:
84-
Enabled: true
85-
86-
Style/SpaceAfterNot:
87-
Enabled: true
88-
89-
Style/SpaceAroundEqualsInParameterDefault:
90-
EnforcedStyle: no_space
91-
92-
Style/SpaceBeforeBlockBraces:
93-
Enabled: false
94-
# EnforcedStyle: space
95-
96-
Style/SpaceInsideBlockBraces:
97-
EnforcedStyle: space
98-
EnforcedStyleForEmptyBraces: no_space
99-
# Space between { and |. Overrides EnforcedStyle if there is a conflict.
100-
SpaceBeforeBlockParameters: true
101-
102-
Style/SpaceInsideBrackets:
103-
Enabled: true
104-
105-
Style/SpaceInsideParens:
106-
Enabled: true
107-
108-
Style/EmptyLines:
109-
Enabled: true
110-
111-
Style/EmptyLinesAroundAccessModifier:
112-
Enabled: true
113-
114-
Style/EmptyLinesAroundBlockBody:
115-
EnforcedStyle: no_empty_lines
116-
117-
Style/EmptyLinesAroundClassBody:
118-
EnforcedStyle: no_empty_lines
119-
120-
Style/EmptyLinesAroundModuleBody:
121-
EnforcedStyle: no_empty_lines
122-
123-
Style/EmptyLinesAroundMethodBody:
124-
Enabled: true
125-
126-
Style/EmptyLineBetweenDefs:
127-
Enabled: true
128-
129-
Style/LeadingCommentSpace:
130-
Enabled: true
13151

13252
Style/TrailingCommaInLiteral:
13353
EnforcedStyleForMultiline: no_comma
13454

13555
Style/TrailingCommaInArguments:
13656
EnforcedStyleForMultiline: no_comma
13757

138-
Style/TrailingWhitespace:
139-
Enabled: true
140-
14158
Style/PercentLiteralDelimiters:
14259
PreferredDelimiters:
14360
'%': '{}'
@@ -173,20 +90,105 @@ Style/VariableNumber:
17390
Rails/HttpPositionalArguments:
17491
Enabled: false
17592

176-
Style/IndentArray:
177-
EnforcedStyle: consistent
93+
Rails/Blank:
94+
Enabled: false
17895

17996
Style/NumericLiterals:
18097
Enabled: false
18198

18299
Style/Documentation:
183100
Enabled: false
184101

185-
Style/SpaceInLambdaLiteral:
102+
Style/DoubleNegation:
103+
Enabled: false
104+
105+
Layout/IndentArray:
106+
EnforcedStyle: consistent
107+
108+
Layout/SpaceInLambdaLiteral:
186109
EnforcedStyle: require_no_space
187110

188-
Style/DoubleNegation:
111+
Layout/AlignParameters:
112+
EnforcedStyle: with_fixed_indentation
113+
Enabled: true
114+
115+
Layout/AlignHash:
116+
EnforcedHashRocketStyle: key
117+
EnforcedColonStyle: key
118+
EnforcedLastArgumentHashStyle: ignore_implicit
119+
120+
Layout/IndentHash:
121+
EnforcedStyle: consistent
122+
123+
Layout/IndentationWidth:
124+
Width: 2
125+
126+
Layout/MultilineOperationIndentation:
127+
EnforcedStyle: indented
128+
129+
Layout/ClosingParenthesisIndentation:
189130
Enabled: false
190131

191-
Metrics/LineLength:
192-
Max: 100
132+
Layout/SpaceInsideHashLiteralBraces:
133+
EnforcedStyle: no_space
134+
135+
Layout/FirstParameterIndentation:
136+
EnforcedStyle: special_for_inner_method_call_in_parentheses
137+
138+
Layout/ExtraSpacing:
139+
Enabled: true
140+
141+
Layout/SpaceAfterColon:
142+
Enabled: true
143+
144+
Layout/SpaceAfterComma:
145+
Enabled: true
146+
147+
Layout/SpaceAfterNot:
148+
Enabled: true
149+
150+
Layout/SpaceAroundEqualsInParameterDefault:
151+
EnforcedStyle: no_space
152+
153+
Layout/SpaceBeforeBlockBraces:
154+
Enabled: false
155+
# EnforcedStyle: space
156+
157+
Layout/SpaceInsideBlockBraces:
158+
EnforcedStyle: space
159+
EnforcedStyleForEmptyBraces: no_space
160+
# Space between { and |. Overrides EnforcedStyle if there is a conflict.
161+
SpaceBeforeBlockParameters: true
162+
163+
Layout/SpaceInsideBrackets:
164+
Enabled: true
165+
166+
Layout/SpaceInsideParens:
167+
Enabled: true
168+
169+
Layout/EmptyLines:
170+
Enabled: true
171+
172+
Layout/EmptyLinesAroundAccessModifier:
173+
Enabled: true
174+
175+
Layout/EmptyLinesAroundBlockBody:
176+
EnforcedStyle: no_empty_lines
177+
178+
Layout/EmptyLinesAroundClassBody:
179+
EnforcedStyle: no_empty_lines
180+
181+
Layout/EmptyLinesAroundModuleBody:
182+
EnforcedStyle: no_empty_lines
183+
184+
Layout/EmptyLinesAroundMethodBody:
185+
Enabled: true
186+
187+
Layout/EmptyLineBetweenDefs:
188+
Enabled: true
189+
190+
Layout/LeadingCommentSpace:
191+
Enabled: true
192+
193+
Layout/TrailingWhitespace:
194+
Enabled: true

0 commit comments

Comments
 (0)