Skip to content

Commit a1c5c65

Browse files
authored
Merge pull request #203 from glennsarti/fix-rubocop
(maint) Fix Rubocop
2 parents 27cd3be + dca3f6d commit a1c5c65

33 files changed

+277
-204
lines changed

.rubocop.yml

Lines changed: 69 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
inherit_from: .rubocop_todo.yml
2+
13
AllCops:
24
Exclude:
35
# Ignore HTML related things
@@ -12,7 +14,7 @@ Bundler/OrderedGems:
1214
Bundler/DuplicatedGem:
1315
Enabled: false
1416

15-
Lint/ConditionPosition:
17+
Layout/ConditionPosition:
1618
Enabled: true
1719

1820
Lint/ElseLayout:
@@ -32,10 +34,6 @@ Lint/EnsureReturn:
3234
Lint/HandleExceptions:
3335
Enabled: false
3436

35-
# MAYBE useful - catches while 1
36-
Lint/LiteralInCondition:
37-
Enabled: false
38-
3937
# MAYBE useful - but too many instances
4038
Lint/ShadowingOuterLocalVariable:
4139
Enabled: false
@@ -56,7 +54,7 @@ Lint/AssignmentInCondition:
5654
Enabled: true
5755

5856
# DISABLED - not useful
59-
Style/SpaceBeforeComment:
57+
Layout/SpaceBeforeComment:
6058
Enabled: false
6159

6260
# DISABLED - not useful
@@ -92,15 +90,15 @@ Lint/AmbiguousRegexpLiteral:
9290
Enabled: false
9391

9492
# DISABLED
95-
Lint/BlockAlignment:
93+
Layout/BlockAlignment:
9694
Enabled: false
9795

9896
# DISABLED
99-
Lint/DefEndAlignment:
97+
Layout/DefEndAlignment:
10098
Enabled: false
10199

102100
# DISABLED
103-
Lint/EndAlignment:
101+
Layout/EndAlignment:
104102
Enabled: false
105103

106104
# DISABLED
@@ -130,28 +128,25 @@ Lint/UnusedMethodArgument:
130128
Lint/UselessAccessModifier:
131129
Enabled: true
132130

133-
Lint/UselessAssignment:
134-
Enabled: true
135-
136131
Lint/Void:
137132
Enabled: true
138133

139-
Style/AccessModifierIndentation:
134+
Layout/AccessModifierIndentation:
140135
Enabled: false
141136

142-
Style/AccessorMethodName:
137+
Naming/AccessorMethodName:
143138
Enabled: false
144139

145140
Style/Alias:
146141
Enabled: false
147142

148-
Style/AlignArray:
143+
Layout/AlignArray:
149144
Enabled: false
150145

151-
Style/AlignHash:
146+
Layout/AlignHash:
152147
Enabled: false
153148

154-
Style/AlignParameters:
149+
Layout/AlignParameters:
155150
Enabled: false
156151

157152
Metrics/BlockNesting:
@@ -169,13 +164,13 @@ Style/BracesAroundHashParameters:
169164
Style/CaseEquality:
170165
Enabled: false
171166

172-
Style/CaseIndentation:
167+
Layout/CaseIndentation:
173168
Enabled: false
174169

175170
Style/CharacterLiteral:
176171
Enabled: false
177172

178-
Style/ClassAndModuleCamelCase:
173+
Naming/ClassAndModuleCamelCase:
179174
Enabled: false
180175

181176
Style/ClassAndModuleChildren:
@@ -203,67 +198,64 @@ Style/WordArray:
203198
Style/UnneededPercentQ:
204199
Enabled: false
205200

206-
Style/Tab:
201+
Layout/Tab:
207202
Enabled: false
208203

209-
Style/SpaceBeforeSemicolon:
204+
Layout/SpaceBeforeSemicolon:
210205
Enabled: false
211206

212-
Style/TrailingBlankLines:
207+
Layout/TrailingBlankLines:
213208
Enabled: false
214209

215-
Style/SpaceInsideBlockBraces:
210+
Layout/SpaceInsideBlockBraces:
216211
Enabled: false
217212

218-
Style/SpaceInsideBrackets:
213+
Layout/SpaceInsideHashLiteralBraces:
219214
Enabled: false
220215

221-
Style/SpaceInsideHashLiteralBraces:
216+
Layout/SpaceInsideParens:
222217
Enabled: false
223218

224-
Style/SpaceInsideParens:
219+
Layout/LeadingCommentSpace:
225220
Enabled: false
226221

227-
Style/LeadingCommentSpace:
222+
Layout/SpaceBeforeFirstArg:
228223
Enabled: false
229224

230-
Style/SpaceBeforeFirstArg:
225+
Layout/SpaceAfterColon:
231226
Enabled: false
232227

233-
Style/SpaceAfterColon:
228+
Layout/SpaceAfterComma:
234229
Enabled: false
235230

236-
Style/SpaceAfterComma:
231+
Layout/SpaceAroundKeyword:
237232
Enabled: false
238233

239-
Style/SpaceAroundKeyword:
234+
Layout/SpaceAfterMethodName:
240235
Enabled: false
241236

242-
Style/SpaceAfterMethodName:
237+
Layout/SpaceAfterNot:
243238
Enabled: false
244239

245-
Style/SpaceAfterNot:
240+
Layout/SpaceAfterSemicolon:
246241
Enabled: false
247242

248-
Style/SpaceAfterSemicolon:
243+
Layout/SpaceAroundEqualsInParameterDefault:
249244
Enabled: false
250245

251-
Style/SpaceAroundEqualsInParameterDefault:
246+
Layout/SpaceAroundOperators:
252247
Enabled: false
253248

254-
Style/SpaceAroundOperators:
249+
Layout/SpaceBeforeBlockBraces:
255250
Enabled: false
256251

257-
Style/SpaceBeforeBlockBraces:
258-
Enabled: false
259-
260-
Style/SpaceBeforeComma:
252+
Layout/SpaceBeforeComma:
261253
Enabled: false
262254

263255
Style/CollectionMethods:
264256
Enabled: false
265257

266-
Style/CommentIndentation:
258+
Layout/CommentIndentation:
267259
Enabled: false
268260

269261
Style/ColonMethodCall:
@@ -275,7 +267,7 @@ Style/CommentAnnotation:
275267
Metrics/CyclomaticComplexity:
276268
Enabled: false
277269

278-
Style/ConstantName:
270+
Naming/ConstantName:
279271
Enabled: false
280272

281273
Style/Documentation:
@@ -284,7 +276,7 @@ Style/Documentation:
284276
Style/DefWithParentheses:
285277
Enabled: false
286278

287-
Style/DotPosition:
279+
Layout/DotPosition:
288280
Enabled: false
289281

290282
# DISABLED - used for converting to bool
@@ -294,25 +286,25 @@ Style/DoubleNegation:
294286
Style/EachWithObject:
295287
Enabled: false
296288

297-
Style/EmptyLineBetweenDefs:
289+
Layout/EmptyLineBetweenDefs:
298290
Enabled: false
299291

300-
Style/IndentArray:
292+
Layout/IndentArray:
301293
Enabled: false
302294

303-
Style/IndentHash:
295+
Layout/IndentHash:
304296
Enabled: false
305297

306-
Style/IndentationConsistency:
298+
Layout/IndentationConsistency:
307299
Enabled: true
308300

309-
Style/IndentationWidth:
301+
Layout/IndentationWidth:
310302
Enabled: true
311303

312-
Style/EmptyLines:
304+
Layout/EmptyLines:
313305
Enabled: false
314306

315-
Style/EmptyLinesAroundAccessModifier:
307+
Layout/EmptyLinesAroundAccessModifier:
316308
Enabled: false
317309

318310
Style/EmptyLiteral:
@@ -330,13 +322,16 @@ Style/MethodDefParentheses:
330322
Style/LineEndConcatenation:
331323
Enabled: false
332324

333-
Style/TrailingWhitespace:
325+
Layout/TrailingWhitespace:
334326
Enabled: false
335327

336328
Style/StringLiterals:
337329
Enabled: false
338330

339-
Style/TrailingCommaInLiteral:
331+
Style/TrailingCommaInArrayLiteral:
332+
Enabled: false
333+
334+
Style/TrailingCommaInHashLiteral:
340335
Enabled: false
341336

342337
Style/TrailingCommaInArguments:
@@ -381,7 +376,7 @@ Style/UnlessElse:
381376
Style/VariableInterpolation:
382377
Enabled: false
383378

384-
Style/VariableName:
379+
Naming/VariableName:
385380
Enabled: false
386381

387382
Style/WhileUntilDo:
@@ -390,7 +385,7 @@ Style/WhileUntilDo:
390385
Style/EvenOdd:
391386
Enabled: false
392387

393-
Style/FileName:
388+
Naming/FileName:
394389
Enabled: false
395390

396391
Style/For:
@@ -399,7 +394,7 @@ Style/For:
399394
Style/Lambda:
400395
Enabled: false
401396

402-
Style/MethodName:
397+
Naming/MethodName:
403398
Enabled: false
404399

405400
Style/MultilineTernaryOperator:
@@ -435,7 +430,7 @@ Style/NumericLiterals:
435430
Style/OneLineConditional:
436431
Enabled: false
437432

438-
Style/OpMethod:
433+
Naming/BinaryOperatorParameterName:
439434
Enabled: false
440435

441436
Style/ParenthesesAroundCondition:
@@ -447,7 +442,7 @@ Style/PercentLiteralDelimiters:
447442
Style/PerlBackrefs:
448443
Enabled: false
449444

450-
Style/PredicateName:
445+
Naming/PredicateName:
451446
Enabled: false
452447

453448
Style/RedundantException:
@@ -492,22 +487,22 @@ Style/IfWithSemicolon:
492487
Style/Encoding:
493488
Enabled: false
494489

495-
Style/MultilineOperationIndentation:
490+
Layout/MultilineOperationIndentation:
496491
Enabled: false
497492

498493
Style/BlockDelimiters:
499494
Enabled: false
500495

501-
Style/ExtraSpacing:
496+
Layout/ExtraSpacing:
502497
Enabled: false
503498

504-
Style/MultilineHashBraceLayout:
499+
Layout/MultilineHashBraceLayout:
505500
Enabled: false
506501

507-
Style/MultilineMethodCallBraceLayout:
502+
Layout/MultilineMethodCallBraceLayout:
508503
Enabled: false
509504

510-
Style/MultilineBlockLayout:
505+
Layout/MultilineBlockLayout:
511506
Enabled: false
512507

513508
Lint/UselessAssignment:
@@ -516,16 +511,16 @@ Lint/UselessAssignment:
516511
Lint/DuplicateMethods:
517512
Enabled: false
518513

519-
Style/EmptyLinesAroundMethodBody:
514+
Layout/EmptyLinesAroundMethodBody:
520515
Enabled: false
521516

522-
Style/EmptyLinesAroundModuleBody:
517+
Layout/EmptyLinesAroundModuleBody:
523518
Enabled: false
524519

525-
Style/EmptyLinesAroundBlockBody:
520+
Layout/EmptyLinesAroundBlockBody:
526521
Enabled: false
527522

528-
Style/EmptyLinesAroundClassBody:
523+
Layout/EmptyLinesAroundClassBody:
529524
Enabled: false
530525

531526
Style/UnneededInterpolation:
@@ -570,5 +565,12 @@ Metrics/PerceivedComplexity:
570565
Metrics/BlockLength:
571566
Enabled: false
572567

573-
Style/VariableNumber:
568+
Naming/VariableNumber:
569+
Enabled: false
570+
571+
# Enforce LF line endings, even when on Windows
572+
Layout/EndOfLine:
573+
EnforcedStyle: lf
574+
575+
Layout/IndentHeredoc: # Not appicable on Ruby 2.1
574576
Enabled: false

0 commit comments

Comments
 (0)