lcgstyle 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ee961aab487d51ea7f48e7b2f667d6248e626166
4
- data.tar.gz: 953481c3b9531b94c7612460a6ee60ee67ca8d84
3
+ metadata.gz: 223cd50f0aa9c07cb2548aece94bd5f1189dcff4
4
+ data.tar.gz: 5690f5ddf32aa7844e2fb148ff15def783e9a5d4
5
5
  SHA512:
6
- metadata.gz: 02862a90f791df4c29546b6201b3e10ec02e297ff1bb158772b942b00c7788bb11f7fbd5641f62cac9e9b1117dea499eb4d1e898c2166226762180717839fa7d
7
- data.tar.gz: 47fd2b809e6af266eb4e08e1ed1885cf2d71fd5cdc8cabb837e08525e535b4964fa5fdb3336ede2c11ee7bffbcf49758fcbb5ed56a42dbbc0edd31953cd689d1
6
+ metadata.gz: 2c993c27513c40d0a2b423ee469b9cc2d887dd23322c6635efe068e88205feb07f4bf793d3d139da0b843ef995bb8c7c128dd5fc92e1730c29e1116322c609f9
7
+ data.tar.gz: 2c5b36ce6717806eceb8bbd907eba33178d085980ff364274df58b7a18fa055d6945c3e706eddbf3565c9bb6b83842754edf5d3287c7d97333b1465a6670e1f6
@@ -17,6 +17,8 @@ Lint/DefEndAlignment:
17
17
  Enabled: false
18
18
  Lint/DeprecatedClassMethods:
19
19
  Enabled: false
20
+ Lint/DuplicateCaseCondition:
21
+ Enabled: false
20
22
  Lint/DuplicateMethods:
21
23
  Enabled: false
22
24
  Lint/DuplicatedKey:
@@ -27,8 +29,12 @@ Lint/ElseLayout:
27
29
  Enabled: false
28
30
  Lint/EmptyEnsure:
29
31
  Enabled: false
32
+ Lint/EmptyExpression:
33
+ Enabled: false
30
34
  Lint/EmptyInterpolation:
31
35
  Enabled: false
36
+ Lint/EmptyWhen:
37
+ Enabled: false
32
38
  Lint/EndAlignment:
33
39
  Enabled: false
34
40
  Lint/EndInMethod:
@@ -83,8 +89,12 @@ Lint/StringConversionInInterpolation:
83
89
  Enabled: false
84
90
  Lint/UnderscorePrefixedVariableName:
85
91
  Enabled: false
92
+ Lint/UnifiedInteger:
93
+ Enabled: false
86
94
  Lint/UnneededDisable:
87
95
  Enabled: false
96
+ Lint/UnneededSplatExpansion:
97
+ Enabled: false
88
98
  Lint/UnreachableCode:
89
99
  Enabled: false
90
100
  Lint/UnusedBlockArgument:
@@ -93,8 +103,6 @@ Lint/UnusedMethodArgument:
93
103
  Enabled: false
94
104
  Lint/UselessAccessModifier:
95
105
  Enabled: false
96
- Lint/UselessArraySplat:
97
- Enabled: false
98
106
  Lint/UselessAssignment:
99
107
  Enabled: false
100
108
  Lint/UselessComparison:
@@ -109,6 +117,8 @@ Metrics/CyclomaticComplexity:
109
117
  Enabled: false
110
118
  Metrics/AbcSize:
111
119
  Enabled: false
120
+ Metrics/BlockLength:
121
+ Enabled: false
112
122
  Metrics/BlockNesting:
113
123
  Enabled: false
114
124
  Metrics/ClassLength:
@@ -143,8 +153,6 @@ Performance/HashEachMethods:
143
153
  Enabled: false
144
154
  Performance/LstripRstrip:
145
155
  Enabled: false
146
- Performance/PushSplat:
147
- Enabled: false
148
156
  Performance/RangeInclude:
149
157
  Enabled: false
150
158
  Performance/RedundantBlockCall:
@@ -161,6 +169,8 @@ Performance/Sample:
161
169
  Enabled: false
162
170
  Performance/Size:
163
171
  Enabled: false
172
+ Performance/SortWithBlock:
173
+ Enabled: false
164
174
  Performance/StartWith:
165
175
  Enabled: false
166
176
  Performance/StringReplacement:
@@ -241,6 +251,8 @@ Style/DefWithParentheses:
241
251
  Enabled: false
242
252
  Style/PreferredHashMethods:
243
253
  Enabled: false
254
+ Style/DocumentationMethod:
255
+ Enabled: false
244
256
  Style/Documentation:
245
257
  Enabled: false
246
258
  Style/DotPosition:
@@ -371,6 +383,10 @@ Style/MultilineHashBraceLayout:
371
383
  Enabled: false
372
384
  Style/MultilineIfThen:
373
385
  Enabled: false
386
+ Style/MultilineIfModifier:
387
+ Enabled: false
388
+ Style/MultilineMemoization:
389
+ Enabled: false
374
390
  Style/MultilineMethodCallBraceLayout:
375
391
  Enabled: false
376
392
  Style/MultilineMethodCallIndentation:
@@ -449,6 +465,8 @@ Style/RescueEnsureAlignment:
449
465
  Enabled: false
450
466
  Style/RescueModifier:
451
467
  Enabled: false
468
+ Style/SafeNavigation:
469
+ Enabled: false
452
470
  Style/SelfAssignment:
453
471
  Enabled: false
454
472
  Style/Semicolon:
@@ -489,6 +507,8 @@ Style/SpaceBeforeFirstArg:
489
507
  Enabled: false
490
508
  Style/SpaceBeforeSemicolon:
491
509
  Enabled: false
510
+ Style/SpaceInLambdaLiteral:
511
+ Enabled: false
492
512
  Style/SpaceInsideArrayPercentLiteral:
493
513
  Enabled: false
494
514
  Style/SpaceInsideBlockBraces:
@@ -551,6 +571,8 @@ Style/VariableInterpolation:
551
571
  Enabled: false
552
572
  Style/VariableName:
553
573
  Enabled: false
574
+ Style/VariableNumber:
575
+ Enabled: false
554
576
  Style/WhenThen:
555
577
  Enabled: false
556
578
  Style/WhileUntilDo:
@@ -565,8 +587,12 @@ Rails/ActionFilter:
565
587
  Enabled: false
566
588
  Rails/Date:
567
589
  Enabled: false
590
+ Rails/DynamicFindBy:
591
+ Enabled: false
568
592
  Rails/Delegate:
569
593
  Enabled: false
594
+ Rails/DelegateAllowBlank:
595
+ Enabled: false
570
596
  Rails/Exit:
571
597
  Enabled: false
572
598
  Rails/FindBy:
@@ -575,6 +601,10 @@ Rails/FindEach:
575
601
  Enabled: false
576
602
  Rails/HasAndBelongsToMany:
577
603
  Enabled: false
604
+ Rails/HttpPositionalArguments:
605
+ Enabled: false
606
+ Rails/NotNullColumn:
607
+ Enabled: false
578
608
  Rails/OutputSafety:
579
609
  Enabled: false
580
610
  Rails/Output:
@@ -585,6 +615,8 @@ Rails/ReadWriteAttribute:
585
615
  Enabled: false
586
616
  Rails/RequestReferer:
587
617
  Enabled: false
618
+ Rails/SafeNavigation:
619
+ Enabled: false
588
620
  Rails/SaveBang:
589
621
  Enabled: false
590
622
  Rails/ScopeArgs:
@@ -595,3 +627,5 @@ Rails/UniqBeforePluck:
595
627
  Enabled: false
596
628
  Rails/Validation:
597
629
  Enabled: false
630
+ Security/JSONLoad:
631
+ Enabled: false
@@ -16,16 +16,23 @@ Style/AutoResourceCleanup:
16
16
 
17
17
  Style/CollectionMethods:
18
18
  Description: 'Preferred collection methods.'
19
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size'
19
+ StyleGuide: '#map-find-select-reduce-size'
20
20
  Enabled: false
21
21
 
22
22
  Style/Copyright:
23
23
  Description: 'Include a copyright notice in each file before any code.'
24
24
  Enabled: false
25
25
 
26
+ Style/DocumentationMethod:
27
+ Description: 'Public methods.'
28
+ Enabled: false
29
+ Exclude:
30
+ - 'spec/**/*'
31
+ - 'test/**/*'
32
+
26
33
  Style/Encoding:
27
34
  Description: 'Use UTF-8 as the source file encoding.'
28
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#utf-8'
35
+ StyleGuide: '#utf-8'
29
36
  Enabled: false
30
37
 
31
38
  Style/FirstArrayElementLineBreak:
@@ -59,12 +66,12 @@ Style/ImplicitRuntimeError:
59
66
  Enabled: false
60
67
 
61
68
  Style/InlineComment:
62
- Description: 'Avoid inline comments.'
69
+ Description: 'Avoid trailing inline comments.'
63
70
  Enabled: false
64
71
 
65
72
  Style/MethodCalledOnDoEndBlock:
66
73
  Description: 'Avoid chaining a method call on a do...end block.'
67
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
74
+ StyleGuide: '#single-line-blocks'
68
75
  Enabled: false
69
76
 
70
77
  Style/MissingElse:
@@ -86,7 +93,7 @@ Style/MissingElse:
86
93
 
87
94
  Style/MultilineAssignmentLayout:
88
95
  Description: 'Check for a newline after the assignment operator in multi-line assignments.'
89
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-conditional-assignment'
96
+ StyleGuide: '#indent-conditional-assignment'
90
97
  Enabled: false
91
98
 
92
99
  Style/OptionHash:
@@ -95,7 +102,7 @@ Style/OptionHash:
95
102
 
96
103
  Style/Send:
97
104
  Description: 'Prefer `Object#__send__` or `Object#public_send` to `send`, as `send` may overlap with existing methods.'
98
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#prefer-public-send'
105
+ StyleGuide: '#prefer-public-send'
99
106
  Enabled: false
100
107
 
101
108
  Style/StringMethods:
@@ -104,5 +111,5 @@ Style/StringMethods:
104
111
 
105
112
  Style/SymbolArray:
106
113
  Description: 'Use %i or %I for arrays of symbols.'
107
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-i'
114
+ StyleGuide: '#percent-i'
108
115
  Enabled: false
@@ -2,24 +2,24 @@
2
2
 
3
3
  Style/AccessModifierIndentation:
4
4
  Description: Check indentation of private/protected visibility modifiers.
5
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
5
+ StyleGuide: '#indent-public-private-protected'
6
6
  Enabled: true
7
7
 
8
8
  Style/AccessorMethodName:
9
9
  Description: Check the naming of accessor methods for get_/set_.
10
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#accessor_mutator_method_names'
10
+ StyleGuide: '#accessor_mutator_method_names'
11
11
  Enabled: true
12
12
 
13
13
  Style/Alias:
14
14
  Description: 'Use alias instead of alias_method.'
15
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
15
+ StyleGuide: '#alias-method'
16
16
  Enabled: true
17
17
 
18
18
  Style/AlignArray:
19
19
  Description: >-
20
20
  Align the elements of an array literal if they span more than
21
21
  one line.
22
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
22
+ StyleGuide: '#align-multiline-arrays'
23
23
  Enabled: true
24
24
 
25
25
  Style/AlignHash:
@@ -32,47 +32,47 @@ Style/AlignParameters:
32
32
  Description: >-
33
33
  Align the parameters of a method call if they span more
34
34
  than one line.
35
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
35
+ StyleGuide: '#no-double-indent'
36
36
  Enabled: true
37
37
 
38
38
  Style/AndOr:
39
39
  Description: 'Use &&/|| instead of and/or.'
40
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
40
+ StyleGuide: '#no-and-or-or'
41
41
  Enabled: true
42
42
 
43
43
  Style/ArrayJoin:
44
44
  Description: 'Use Array#join instead of Array#*.'
45
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
45
+ StyleGuide: '#array-join'
46
46
  Enabled: true
47
47
 
48
48
  Style/AsciiComments:
49
49
  Description: 'Use only ascii symbols in comments.'
50
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
50
+ StyleGuide: '#english-comments'
51
51
  Enabled: true
52
52
 
53
53
  Style/AsciiIdentifiers:
54
54
  Description: 'Use only ascii symbols in identifiers.'
55
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
55
+ StyleGuide: '#english-identifiers'
56
56
  Enabled: true
57
57
 
58
58
  Style/Attr:
59
59
  Description: 'Checks for uses of Module#attr.'
60
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
60
+ StyleGuide: '#attr'
61
61
  Enabled: true
62
62
 
63
63
  Style/BeginBlock:
64
64
  Description: 'Avoid the use of BEGIN blocks.'
65
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
65
+ StyleGuide: '#no-BEGIN-blocks'
66
66
  Enabled: true
67
67
 
68
68
  Style/BarePercentLiterals:
69
69
  Description: 'Checks if usage of %() or %Q() matches configuration.'
70
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
70
+ StyleGuide: '#percent-q-shorthand'
71
71
  Enabled: true
72
72
 
73
73
  Style/BlockComments:
74
74
  Description: 'Do not use block comments.'
75
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
75
+ StyleGuide: '#no-block-comments'
76
76
  Enabled: true
77
77
 
78
78
  Style/BlockEndNewline:
@@ -84,7 +84,7 @@ Style/BlockDelimiters:
84
84
  Avoid using {...} for multi-line blocks (multiline chaining is
85
85
  always ugly).
86
86
  Prefer {...} over do...end for single-line blocks.
87
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
87
+ StyleGuide: '#single-line-blocks'
88
88
  Enabled: true
89
89
 
90
90
  Style/BracesAroundHashParameters:
@@ -93,22 +93,22 @@ Style/BracesAroundHashParameters:
93
93
 
94
94
  Style/CaseEquality:
95
95
  Description: 'Avoid explicit use of the case equality operator(===).'
96
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
96
+ StyleGuide: '#no-case-equality'
97
97
  Enabled: true
98
98
 
99
99
  Style/CaseIndentation:
100
100
  Description: 'Indentation of when in a case/when/[else/]end.'
101
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
101
+ StyleGuide: '#indent-when-to-case'
102
102
  Enabled: true
103
103
 
104
104
  Style/CharacterLiteral:
105
105
  Description: 'Checks for uses of character literals.'
106
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
106
+ StyleGuide: '#no-character-literals'
107
107
  Enabled: true
108
108
 
109
109
  Style/ClassAndModuleCamelCase:
110
110
  Description: 'Use CamelCase for classes and modules.'
111
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
111
+ StyleGuide: '#camelcase-classes'
112
112
  Enabled: true
113
113
 
114
114
  Style/ClassAndModuleChildren:
@@ -121,12 +121,12 @@ Style/ClassCheck:
121
121
 
122
122
  Style/ClassMethods:
123
123
  Description: 'Use self when defining module/class methods.'
124
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
124
+ StyleGuide: '#def-self-class-methods'
125
125
  Enabled: true
126
126
 
127
127
  Style/ClassVars:
128
128
  Description: 'Avoid the use of class variables.'
129
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
129
+ StyleGuide: '#no-class-vars'
130
130
  Enabled: true
131
131
 
132
132
  Style/ClosingParenthesisIndentation:
@@ -135,19 +135,19 @@ Style/ClosingParenthesisIndentation:
135
135
 
136
136
  Style/ColonMethodCall:
137
137
  Description: 'Do not use :: for method call.'
138
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
138
+ StyleGuide: '#double-colons'
139
139
  Enabled: true
140
140
 
141
141
  Style/CommandLiteral:
142
142
  Description: 'Use `` or %x around command literals.'
143
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
143
+ StyleGuide: '#percent-x'
144
144
  Enabled: true
145
145
 
146
146
  Style/CommentAnnotation:
147
147
  Description: >-
148
148
  Checks formatting of special comments
149
149
  (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
150
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
150
+ StyleGuide: '#annotate-keywords'
151
151
  Enabled: true
152
152
 
153
153
  Style/CommentIndentation:
@@ -163,17 +163,12 @@ Style/ConditionalAssignment:
163
163
 
164
164
  Style/ConstantName:
165
165
  Description: 'Constants should use SCREAMING_SNAKE_CASE.'
166
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
166
+ StyleGuide: '#screaming-snake-case'
167
167
  Enabled: true
168
168
 
169
169
  Style/DefWithParentheses:
170
170
  Description: 'Use def with parentheses when there are arguments.'
171
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
172
- Enabled: true
173
-
174
- Style/PreferredHashMethods:
175
- Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
176
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
171
+ StyleGuide: '#method-parens'
177
172
  Enabled: true
178
173
 
179
174
  Style/Documentation:
@@ -185,12 +180,12 @@ Style/Documentation:
185
180
 
186
181
  Style/DotPosition:
187
182
  Description: 'Checks the position of the dot in multi-line method calls.'
188
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
183
+ StyleGuide: '#consistent-multi-line-chains'
189
184
  Enabled: true
190
185
 
191
186
  Style/DoubleNegation:
192
187
  Description: 'Checks for uses of double negation (!!).'
193
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
188
+ StyleGuide: '#no-bang-bang'
194
189
  Enabled: true
195
190
 
196
191
  Style/EachForSimpleLoop:
@@ -217,7 +212,7 @@ Style/EmptyCaseCondition:
217
212
 
218
213
  Style/EmptyLineBetweenDefs:
219
214
  Description: 'Use empty lines between defs.'
220
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
215
+ StyleGuide: '#empty-lines-between-methods'
221
216
  Enabled: true
222
217
 
223
218
  Style/EmptyLines:
@@ -246,22 +241,22 @@ Style/EmptyLinesAroundMethodBody:
246
241
 
247
242
  Style/EmptyLiteral:
248
243
  Description: 'Prefer literals to Array.new/Hash.new/String.new.'
249
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
244
+ StyleGuide: '#literal-array-hash'
250
245
  Enabled: true
251
246
 
252
247
  Style/EndBlock:
253
248
  Description: 'Avoid the use of END blocks.'
254
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
249
+ StyleGuide: '#no-END-blocks'
255
250
  Enabled: true
256
251
 
257
252
  Style/EndOfLine:
258
253
  Description: 'Use Unix-style line endings.'
259
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
254
+ StyleGuide: '#crlf'
260
255
  Enabled: true
261
256
 
262
257
  Style/EvenOdd:
263
- Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
264
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
258
+ Description: 'Favor the use of Integer#even? && Integer#odd?'
259
+ StyleGuide: '#predicate-methods'
265
260
  Enabled: true
266
261
 
267
262
  Style/ExtraSpacing:
@@ -270,7 +265,7 @@ Style/ExtraSpacing:
270
265
 
271
266
  Style/FileName:
272
267
  Description: 'Use snake_case for source file names.'
273
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
268
+ StyleGuide: '#snake-case-files'
274
269
  Enabled: true
275
270
 
276
271
  Style/FrozenStringLiteralComment:
@@ -290,35 +285,35 @@ Style/FirstParameterIndentation:
290
285
 
291
286
  Style/FlipFlop:
292
287
  Description: 'Checks for flip flops'
293
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
288
+ StyleGuide: '#no-flip-flops'
294
289
  Enabled: true
295
290
 
296
291
  Style/For:
297
292
  Description: 'Checks use of for or each in multiline loops.'
298
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
293
+ StyleGuide: '#no-for-loops'
299
294
  Enabled: true
300
295
 
301
296
  Style/FormatString:
302
297
  Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
303
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
298
+ StyleGuide: '#sprintf'
304
299
  Enabled: true
305
300
 
306
301
  Style/GlobalVars:
307
302
  Description: 'Do not introduce global variables.'
308
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
303
+ StyleGuide: '#instance-vars'
309
304
  Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
310
305
  Enabled: true
311
306
 
312
307
  Style/GuardClause:
313
308
  Description: 'Check for conditionals that can be replaced with guard clauses'
314
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
309
+ StyleGuide: '#no-nested-conditionals'
315
310
  Enabled: true
316
311
 
317
312
  Style/HashSyntax:
318
313
  Description: >-
319
314
  Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
320
315
  { :a => 1, :b => 2 }.
321
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
316
+ StyleGuide: '#hash-literals'
322
317
  Enabled: true
323
318
 
324
319
  Style/IfInsideElse:
@@ -329,7 +324,7 @@ Style/IfUnlessModifier:
329
324
  Description: >-
330
325
  Favor modifier if/unless usage when you have a
331
326
  single-line body.
332
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
327
+ StyleGuide: '#if-as-a-modifier'
333
328
  Enabled: true
334
329
 
335
330
  Style/IfUnlessModifierOfIfUnless:
@@ -339,7 +334,7 @@ Style/IfUnlessModifierOfIfUnless:
339
334
 
340
335
  Style/IfWithSemicolon:
341
336
  Description: 'Do not use if x; .... Use the ternary operator instead.'
342
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
337
+ StyleGuide: '#no-semicolon-ifs'
343
338
  Enabled: true
344
339
 
345
340
  Style/IndentationConsistency:
@@ -348,7 +343,7 @@ Style/IndentationConsistency:
348
343
 
349
344
  Style/IndentationWidth:
350
345
  Description: 'Use 2 spaces for indentation.'
351
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
346
+ StyleGuide: '#spaces-indentation'
352
347
  Enabled: true
353
348
 
354
349
  Style/IdenticalConditionalBranches:
@@ -376,22 +371,26 @@ Style/IndentHash:
376
371
 
377
372
  Style/InfiniteLoop:
378
373
  Description: 'Use Kernel#loop for infinite loops.'
379
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
374
+ StyleGuide: '#infinite-loop'
380
375
  Enabled: true
381
376
 
382
377
  Style/Lambda:
383
378
  Description: 'Use the new lambda literal syntax for single-line blocks.'
384
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
379
+ StyleGuide: '#lambda-multi-line'
380
+ Enabled: true
381
+
382
+ Style/SpaceInLambdaLiteral:
383
+ Description: 'Checks for spaces in lambda literals.'
385
384
  Enabled: true
386
385
 
387
386
  Style/LambdaCall:
388
387
  Description: 'Use lambda.call(...) instead of lambda.(...).'
389
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
388
+ StyleGuide: '#proc-call'
390
389
  Enabled: true
391
390
 
392
391
  Style/LeadingCommentSpace:
393
392
  Description: 'Comments should start with a space.'
394
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
393
+ StyleGuide: '#hash-space'
395
394
  Enabled: true
396
395
 
397
396
  Style/LineEndConcatenation:
@@ -402,29 +401,29 @@ Style/LineEndConcatenation:
402
401
 
403
402
  Style/MethodCallParentheses:
404
403
  Description: 'Do not use parentheses for method calls with no arguments.'
405
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
404
+ StyleGuide: '#method-invocation-parens'
406
405
  Enabled: true
407
406
 
408
407
  Style/MethodDefParentheses:
409
408
  Description: >-
410
409
  Checks if the method definitions have or don't have
411
410
  parentheses.
412
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
411
+ StyleGuide: '#method-parens'
413
412
  Enabled: true
414
413
 
415
414
  Style/MethodName:
416
415
  Description: 'Use the configured style when naming methods.'
417
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
416
+ StyleGuide: '#snake-case-symbols-methods-vars'
418
417
  Enabled: true
419
418
 
420
419
  Style/MethodMissing:
421
420
  Description: 'Avoid using `method_missing`.'
422
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-method-missing'
421
+ StyleGuide: '#no-method-missing'
423
422
  Enabled: true
424
423
 
425
424
  Style/ModuleFunction:
426
425
  Description: 'Checks for usage of `extend self` in modules.'
427
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
426
+ StyleGuide: '#module-function'
428
427
  Enabled: true
429
428
 
430
429
  Style/MultilineArrayBraceLayout:
@@ -436,7 +435,7 @@ Style/MultilineArrayBraceLayout:
436
435
 
437
436
  Style/MultilineBlockChain:
438
437
  Description: 'Avoid multi-line chains of blocks.'
439
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
438
+ StyleGuide: '#single-line-blocks'
440
439
  Enabled: true
441
440
 
442
441
  Style/MultilineBlockLayout:
@@ -452,7 +451,16 @@ Style/MultilineHashBraceLayout:
452
451
 
453
452
  Style/MultilineIfThen:
454
453
  Description: 'Do not use then for multi-line if/unless.'
455
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
454
+ StyleGuide: '#no-then'
455
+ Enabled: true
456
+
457
+ Style/MultilineIfModifier:
458
+ Description: 'Only use if/unless modifiers on single line statements.'
459
+ StyleGuide: '#no-multiline-if-modifiers'
460
+ Enabled: true
461
+
462
+ Style/MultilineMemoization:
463
+ Description: 'Wrap multiline memoizations in a `begin` and `end` block.'
456
464
  Enabled: true
457
465
 
458
466
  Style/MultilineMethodCallBraceLayout:
@@ -485,7 +493,7 @@ Style/MultilineTernaryOperator:
485
493
  Description: >-
486
494
  Avoid multi-line ?: (the ternary operator);
487
495
  use if/unless instead.
488
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
496
+ StyleGuide: '#no-multiline-ternary'
489
497
  Enabled: true
490
498
 
491
499
  Style/MutableConstant:
@@ -496,17 +504,17 @@ Style/NegatedIf:
496
504
  Description: >-
497
505
  Favor unless over if for negative conditions
498
506
  (or control flow or).
499
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
507
+ StyleGuide: '#unless-for-negatives'
500
508
  Enabled: true
501
509
 
502
510
  Style/NegatedWhile:
503
511
  Description: 'Favor until over while for negative conditions.'
504
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
512
+ StyleGuide: '#until-for-negatives'
505
513
  Enabled: true
506
514
 
507
515
  Style/NestedModifier:
508
516
  Description: 'Avoid using nested modifiers.'
509
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-modifiers'
517
+ StyleGuide: '#no-nested-modifiers'
510
518
  Enabled: true
511
519
 
512
520
  Style/NestedParenthesizedCalls:
@@ -517,64 +525,69 @@ Style/NestedParenthesizedCalls:
517
525
 
518
526
  Style/NestedTernaryOperator:
519
527
  Description: 'Use one expression per branch in a ternary operator.'
520
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
528
+ StyleGuide: '#no-nested-ternary'
521
529
  Enabled: true
522
530
 
523
531
  Style/Next:
524
532
  Description: 'Use `next` to skip iteration instead of a condition at the end.'
525
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
533
+ StyleGuide: '#no-nested-conditionals'
526
534
  Enabled: true
527
535
 
528
536
  Style/NilComparison:
529
537
  Description: 'Prefer x.nil? to x == nil.'
530
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
538
+ StyleGuide: '#predicate-methods'
531
539
  Enabled: true
532
540
 
533
541
  Style/NonNilCheck:
534
542
  Description: 'Checks for redundant nil checks.'
535
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
543
+ StyleGuide: '#no-non-nil-checks'
536
544
  Enabled: true
537
545
 
538
546
  Style/Not:
539
547
  Description: 'Use ! instead of not.'
540
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
548
+ StyleGuide: '#bang-not-not'
541
549
  Enabled: true
542
550
 
543
551
  Style/NumericLiterals:
544
552
  Description: >-
545
553
  Add underscores to large numeric literals to improve their
546
554
  readability.
547
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
555
+ StyleGuide: '#underscores-in-numerics'
548
556
  Enabled: true
549
557
 
550
558
  Style/NumericLiteralPrefix:
551
559
  Description: 'Use smallcase prefixes for numeric literals.'
552
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#numeric-literal-prefixes'
560
+ StyleGuide: '#numeric-literal-prefixes'
553
561
  Enabled: true
554
562
 
555
563
  Style/NumericPredicate:
556
564
  Description: >-
557
565
  Checks for the use of predicate- or comparison methods for
558
566
  numeric comparisons.
567
+ StyleGuide: '#predicate-methods'
568
+ # This will change to a new method call which isn't guaranteed to be on the
569
+ # object. Switching these methods has to be done with knowledge of the types
570
+ # of the variables which rubocop doesn't have.
571
+ AutoCorrect: false
559
572
  Enabled: true
560
573
 
561
574
  Style/OneLineConditional:
562
575
  Description: >-
563
576
  Favor the ternary operator(?:) over
564
577
  if/then/else/end constructs.
565
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
578
+ StyleGuide: '#ternary-operator'
566
579
  Enabled: true
567
580
 
568
581
  Style/OpMethod:
569
582
  Description: 'When defining binary operators, name the argument other.'
570
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
583
+ StyleGuide: '#other-arg'
571
584
  Enabled: true
572
585
 
573
586
  Style/OptionalArguments:
574
587
  Description: >-
575
588
  Checks for optional arguments that do not appear at the end
576
589
  of the argument list
577
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
590
+ StyleGuide: '#optional-arguments'
578
591
  Enabled: true
579
592
 
580
593
  Style/ParallelAssignment:
@@ -582,19 +595,19 @@ Style/ParallelAssignment:
582
595
  Check for simple usages of parallel assignment.
583
596
  It will only warn when the number of variables
584
597
  matches on both sides of the assignment.
585
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
598
+ StyleGuide: '#parallel-assignment'
586
599
  Enabled: true
587
600
 
588
601
  Style/ParenthesesAroundCondition:
589
602
  Description: >-
590
603
  Don't use parentheses around the condition of an
591
604
  if/unless/while.
592
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
605
+ StyleGuide: '#no-parens-if'
593
606
  Enabled: true
594
607
 
595
608
  Style/PercentLiteralDelimiters:
596
609
  Description: 'Use `%`-literal delimiters consistently'
597
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
610
+ StyleGuide: '#percent-literal-braces'
598
611
  Enabled: true
599
612
 
600
613
  Style/PercentQLiterals:
@@ -603,32 +616,37 @@ Style/PercentQLiterals:
603
616
 
604
617
  Style/PerlBackrefs:
605
618
  Description: 'Avoid Perl-style regex back references.'
606
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
619
+ StyleGuide: '#no-perl-regexp-last-matchers'
607
620
  Enabled: true
608
621
 
609
622
  Style/PredicateName:
610
623
  Description: 'Check the names of predicate methods.'
611
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
624
+ StyleGuide: '#bool-methods-qmark'
625
+ Enabled: true
626
+
627
+ Style/PreferredHashMethods:
628
+ Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
629
+ StyleGuide: '#hash-key'
612
630
  Enabled: true
613
631
 
614
632
  Style/Proc:
615
633
  Description: 'Use proc instead of Proc.new.'
616
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
634
+ StyleGuide: '#proc'
617
635
  Enabled: true
618
636
 
619
637
  Style/RaiseArgs:
620
638
  Description: 'Checks the arguments passed to raise/fail.'
621
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
639
+ StyleGuide: '#exception-class-messages'
622
640
  Enabled: true
623
641
 
624
642
  Style/RedundantBegin:
625
643
  Description: "Don't use begin blocks when they are not needed."
626
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
644
+ StyleGuide: '#begin-implicit'
627
645
  Enabled: true
628
646
 
629
647
  Style/RedundantException:
630
648
  Description: "Checks for an obsolete RuntimeException argument in raise/fail."
631
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
649
+ StyleGuide: '#no-explicit-runtimeerror'
632
650
  Enabled: true
633
651
 
634
652
  Style/RedundantFreeze:
@@ -641,17 +659,17 @@ Style/RedundantParentheses:
641
659
 
642
660
  Style/RedundantReturn:
643
661
  Description: "Don't use return where it's not required."
644
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
662
+ StyleGuide: '#no-explicit-return'
645
663
  Enabled: true
646
664
 
647
665
  Style/RedundantSelf:
648
666
  Description: "Don't use self where it's not needed."
649
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
667
+ StyleGuide: '#no-self-unless-required'
650
668
  Enabled: true
651
669
 
652
670
  Style/RegexpLiteral:
653
671
  Description: 'Use / or %r around regular expressions.'
654
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
672
+ StyleGuide: '#percent-r'
655
673
  Enabled: true
656
674
 
657
675
  Style/RescueEnsureAlignment:
@@ -660,34 +678,40 @@ Style/RescueEnsureAlignment:
660
678
 
661
679
  Style/RescueModifier:
662
680
  Description: 'Avoid using rescue in its modifier form.'
663
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
681
+ StyleGuide: '#no-rescue-modifiers'
682
+ Enabled: true
683
+
684
+ Style/SafeNavigation:
685
+ Description: >-
686
+ This cop transforms usages of a method call safeguarded by
687
+ a check for the existance of the object to
688
+ safe navigation (`&.`).
664
689
  Enabled: true
665
690
 
666
691
  Style/SelfAssignment:
667
692
  Description: >-
668
693
  Checks for places where self-assignment shorthand should have
669
694
  been used.
670
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
695
+ StyleGuide: '#self-assignment'
671
696
  Enabled: true
672
697
 
673
698
  Style/Semicolon:
674
699
  Description: "Don't use semicolons to terminate expressions."
675
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
700
+ StyleGuide: '#no-semicolon'
676
701
  Enabled: true
677
702
 
678
703
  Style/SignalException:
679
704
  Description: 'Checks for proper usage of fail and raise.'
680
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#prefer-raise-over-fail'
705
+ StyleGuide: '#prefer-raise-over-fail'
681
706
  Enabled: true
682
707
 
683
708
  Style/SingleLineBlockParams:
684
709
  Description: 'Enforces the names of some block params.'
685
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
686
710
  Enabled: true
687
711
 
688
712
  Style/SingleLineMethods:
689
713
  Description: 'Avoid single-line methods.'
690
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
714
+ StyleGuide: '#no-single-line-methods'
691
715
  Enabled: true
692
716
 
693
717
  Style/SpaceBeforeFirstArg:
@@ -698,29 +722,29 @@ Style/SpaceBeforeFirstArg:
698
722
 
699
723
  Style/SpaceAfterColon:
700
724
  Description: 'Use spaces after colons.'
701
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
725
+ StyleGuide: '#spaces-operators'
702
726
  Enabled: true
703
727
 
704
728
  Style/SpaceAfterComma:
705
729
  Description: 'Use spaces after commas.'
706
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
730
+ StyleGuide: '#spaces-operators'
707
731
  Enabled: true
708
732
 
709
733
  Style/SpaceAfterMethodName:
710
734
  Description: >-
711
735
  Do not put a space between a method name and the opening
712
736
  parenthesis in a method definition.
713
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
737
+ StyleGuide: '#parens-no-spaces'
714
738
  Enabled: true
715
739
 
716
740
  Style/SpaceAfterNot:
717
741
  Description: Tracks redundant space after the ! operator.
718
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
742
+ StyleGuide: '#no-space-bang'
719
743
  Enabled: true
720
744
 
721
745
  Style/SpaceAfterSemicolon:
722
746
  Description: 'Use spaces after semicolons.'
723
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
747
+ StyleGuide: '#spaces-operators'
724
748
  Enabled: true
725
749
 
726
750
  Style/SpaceBeforeBlockBraces:
@@ -759,7 +783,7 @@ Style/SpaceAroundEqualsInParameterDefault:
759
783
  Checks that the equals signs in parameter default assignments
760
784
  have or don't have surrounding space depending on
761
785
  configuration.
762
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
786
+ StyleGuide: '#spaces-around-equals'
763
787
  Enabled: true
764
788
 
765
789
  Style/SpaceAroundKeyword:
@@ -768,7 +792,7 @@ Style/SpaceAroundKeyword:
768
792
 
769
793
  Style/SpaceAroundOperators:
770
794
  Description: 'Use a single space around operators.'
771
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
795
+ StyleGuide: '#spaces-operators'
772
796
  Enabled: true
773
797
 
774
798
  Style/SpaceInsideArrayPercentLiteral:
@@ -781,42 +805,42 @@ Style/SpaceInsidePercentLiteralDelimiters:
781
805
 
782
806
  Style/SpaceInsideBrackets:
783
807
  Description: 'No spaces after [ or before ].'
784
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
808
+ StyleGuide: '#no-spaces-braces'
785
809
  Enabled: true
786
810
 
787
811
  Style/SpaceInsideHashLiteralBraces:
788
812
  Description: "Use spaces inside hash literal braces - or don't."
789
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
813
+ StyleGuide: '#spaces-operators'
790
814
  Enabled: true
791
815
 
792
816
  Style/SpaceInsideParens:
793
817
  Description: 'No spaces after ( or before ).'
794
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
818
+ StyleGuide: '#no-spaces-braces'
795
819
  Enabled: true
796
820
 
797
821
  Style/SpaceInsideRangeLiteral:
798
822
  Description: 'No spaces inside range literals.'
799
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
823
+ StyleGuide: '#no-space-inside-range-literals'
800
824
  Enabled: true
801
825
 
802
826
  Style/SpaceInsideStringInterpolation:
803
827
  Description: 'Checks for padding/surrounding spaces inside string interpolation.'
804
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
828
+ StyleGuide: '#string-interpolation'
805
829
  Enabled: true
806
830
 
807
831
  Style/SpecialGlobalVars:
808
832
  Description: 'Avoid Perl-style global variables.'
809
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
833
+ StyleGuide: '#no-cryptic-perlisms'
810
834
  Enabled: true
811
835
 
812
836
  Style/StabbyLambdaParentheses:
813
837
  Description: 'Check for the usage of parentheses around stabby lambda arguments.'
814
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#stabby-lambda-with-args'
838
+ StyleGuide: '#stabby-lambda-with-args'
815
839
  Enabled: true
816
840
 
817
841
  Style/StringLiterals:
818
842
  Description: 'Checks if uses of quotes match the configured preference.'
819
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
843
+ StyleGuide: '#consistent-string-literals'
820
844
  Enabled: true
821
845
 
822
846
  Style/StringLiteralsInInterpolation:
@@ -827,7 +851,7 @@ Style/StringLiteralsInInterpolation:
827
851
 
828
852
  Style/StructInheritance:
829
853
  Description: 'Checks for inheritance from Struct.new.'
830
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
854
+ StyleGuide: '#no-extend-struct-new'
831
855
  Enabled: true
832
856
 
833
857
  Style/SymbolLiteral:
@@ -840,7 +864,7 @@ Style/SymbolProc:
840
864
 
841
865
  Style/Tab:
842
866
  Description: 'No hard tabs.'
843
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
867
+ StyleGuide: '#spaces-indentation'
844
868
  Enabled: true
845
869
 
846
870
  Style/TernaryParentheses:
@@ -849,34 +873,34 @@ Style/TernaryParentheses:
849
873
 
850
874
  Style/TrailingBlankLines:
851
875
  Description: 'Checks trailing blank lines and final newline.'
852
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
876
+ StyleGuide: '#newline-eof'
853
877
  Enabled: true
854
878
 
855
879
  Style/TrailingCommaInArguments:
856
880
  Description: 'Checks for trailing comma in argument lists.'
857
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
881
+ StyleGuide: '#no-trailing-params-comma'
858
882
  Enabled: true
859
883
 
860
884
  Style/TrailingCommaInLiteral:
861
885
  Description: 'Checks for trailing comma in array and hash literals.'
862
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
886
+ StyleGuide: '#no-trailing-array-commas'
863
887
  Enabled: true
864
888
 
865
889
  Style/TrailingWhitespace:
866
890
  Description: 'Avoid trailing whitespace.'
867
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
891
+ StyleGuide: '#no-trailing-whitespace'
868
892
  Enabled: true
869
893
 
870
894
  Style/TrivialAccessors:
871
895
  Description: 'Prefer attr_* methods to trivial readers/writers.'
872
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
896
+ StyleGuide: '#attr_family'
873
897
  Enabled: true
874
898
 
875
899
  Style/UnlessElse:
876
900
  Description: >-
877
901
  Do not use unless with else. Rewrite these with the positive
878
902
  case first.
879
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
903
+ StyleGuide: '#no-else-with-unless'
880
904
  Enabled: true
881
905
 
882
906
  Style/UnneededCapitalW:
@@ -889,7 +913,7 @@ Style/UnneededInterpolation:
889
913
 
890
914
  Style/UnneededPercentQ:
891
915
  Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
892
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
916
+ StyleGuide: '#percent-q'
893
917
  Enabled: true
894
918
 
895
919
  Style/TrailingUnderscoreVariable:
@@ -903,34 +927,38 @@ Style/VariableInterpolation:
903
927
  Description: >-
904
928
  Don't interpolate global, instance and class variables
905
929
  directly in strings.
906
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
930
+ StyleGuide: '#curlies-interpolate'
907
931
  Enabled: true
908
932
 
909
933
  Style/VariableName:
910
934
  Description: 'Use the configured style when naming variables.'
911
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
935
+ StyleGuide: '#snake-case-symbols-methods-vars'
936
+ Enabled: true
937
+
938
+ Style/VariableNumber:
939
+ Description: 'Use the configured style when numbering variables.'
912
940
  Enabled: true
913
941
 
914
942
  Style/WhenThen:
915
943
  Description: 'Use when x then ... for one-line cases.'
916
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
944
+ StyleGuide: '#one-line-cases'
917
945
  Enabled: true
918
946
 
919
947
  Style/WhileUntilDo:
920
948
  Description: 'Checks for redundant do after while or until.'
921
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
949
+ StyleGuide: '#no-multiline-while-do'
922
950
  Enabled: true
923
951
 
924
952
  Style/WhileUntilModifier:
925
953
  Description: >-
926
954
  Favor modifier while/until usage when you have a
927
955
  single-line body.
928
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
956
+ StyleGuide: '#while-as-a-modifier'
929
957
  Enabled: true
930
958
 
931
959
  Style/WordArray:
932
960
  Description: 'Use %w or %W for arrays of words.'
933
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
961
+ StyleGuide: '#percent-w'
934
962
  Enabled: true
935
963
 
936
964
  Style/ZeroLengthPredicate:
@@ -948,7 +976,7 @@ Metrics/AbcSize:
948
976
 
949
977
  Metrics/BlockNesting:
950
978
  Description: 'Avoid excessive block nesting'
951
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
979
+ StyleGuide: '#three-is-the-number-thou-shalt-count'
952
980
  Enabled: true
953
981
 
954
982
  Metrics/ClassLength:
@@ -967,17 +995,21 @@ Metrics/CyclomaticComplexity:
967
995
 
968
996
  Metrics/LineLength:
969
997
  Description: 'Limit lines to 80 characters.'
970
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
998
+ StyleGuide: '#80-character-limits'
971
999
  Enabled: true
972
1000
 
973
1001
  Metrics/MethodLength:
974
1002
  Description: 'Avoid methods longer than 10 lines of code.'
975
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
1003
+ StyleGuide: '#short-methods'
1004
+ Enabled: true
1005
+
1006
+ Metrics/BlockLength:
1007
+ Description: 'Avoid long blocks with many lines.'
976
1008
  Enabled: true
977
1009
 
978
1010
  Metrics/ParameterLists:
979
1011
  Description: 'Avoid parameter lists longer than three or four parameters.'
980
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
1012
+ StyleGuide: '#too-many-params'
981
1013
  Enabled: true
982
1014
 
983
1015
  Metrics/PerceivedComplexity:
@@ -993,7 +1025,7 @@ Lint/AmbiguousOperator:
993
1025
  Description: >-
994
1026
  Checks for ambiguous operators in the first argument of a
995
1027
  method invocation without parentheses.
996
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
1028
+ StyleGuide: '#method-invocation-parens'
997
1029
  Enabled: true
998
1030
 
999
1031
  Lint/AmbiguousRegexpLiteral:
@@ -1004,7 +1036,7 @@ Lint/AmbiguousRegexpLiteral:
1004
1036
 
1005
1037
  Lint/AssignmentInCondition:
1006
1038
  Description: "Don't use assignment in conditions."
1007
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
1039
+ StyleGuide: '#safe-assignment-in-condition'
1008
1040
  Enabled: true
1009
1041
 
1010
1042
  Lint/BlockAlignment:
@@ -1019,7 +1051,7 @@ Lint/ConditionPosition:
1019
1051
  Description: >-
1020
1052
  Checks for condition placed in a confusing position relative to
1021
1053
  the keyword.
1022
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
1054
+ StyleGuide: '#same-line-condition'
1023
1055
  Enabled: true
1024
1056
 
1025
1057
  Lint/Debugger:
@@ -1034,6 +1066,10 @@ Lint/DeprecatedClassMethods:
1034
1066
  Description: 'Check for deprecated class method calls.'
1035
1067
  Enabled: true
1036
1068
 
1069
+ Lint/DuplicateCaseCondition:
1070
+ Description: 'Do not repeat values in case conditionals.'
1071
+ Enabled: true
1072
+
1037
1073
  Lint/DuplicateMethods:
1038
1074
  Description: 'Check for duplicate method definitions.'
1039
1075
  Enabled: true
@@ -1054,10 +1090,18 @@ Lint/EmptyEnsure:
1054
1090
  Description: 'Checks for empty ensure block.'
1055
1091
  Enabled: true
1056
1092
 
1093
+ Lint/EmptyExpression:
1094
+ Description: 'Checks for empty expressions.'
1095
+ Enabled: true
1096
+
1057
1097
  Lint/EmptyInterpolation:
1058
1098
  Description: 'Checks for empty string interpolation.'
1059
1099
  Enabled: true
1060
1100
 
1101
+ Lint/EmptyWhen:
1102
+ Description: 'Checks for `when` branches with empty bodies.'
1103
+ Enabled: true
1104
+
1061
1105
  Lint/EndAlignment:
1062
1106
  Description: 'Align ends correctly.'
1063
1107
  Enabled: true
@@ -1068,7 +1112,7 @@ Lint/EndInMethod:
1068
1112
 
1069
1113
  Lint/EnsureReturn:
1070
1114
  Description: 'Do not use return in an ensure block.'
1071
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
1115
+ StyleGuide: '#no-return-ensure'
1072
1116
  Enabled: true
1073
1117
 
1074
1118
  Lint/Eval:
@@ -1087,7 +1131,7 @@ Lint/FormatParameterMismatch:
1087
1131
 
1088
1132
  Lint/HandleExceptions:
1089
1133
  Description: "Don't suppress exception."
1090
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
1134
+ StyleGuide: '#dont-hide-exceptions'
1091
1135
  Enabled: true
1092
1136
 
1093
1137
  Lint/ImplicitStringConcatenation:
@@ -1124,12 +1168,12 @@ Lint/Loop:
1124
1168
  Description: >-
1125
1169
  Use Kernel#loop with break rather than begin/end/until or
1126
1170
  begin/end/while for post-loop tests.
1127
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
1171
+ StyleGuide: '#loop-with-break'
1128
1172
  Enabled: true
1129
1173
 
1130
1174
  Lint/NestedMethodDefinition:
1131
1175
  Description: 'Do not use nested method definitions.'
1132
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
1176
+ StyleGuide: '#no-nested-methods'
1133
1177
  Enabled: true
1134
1178
 
1135
1179
  Lint/NextWithoutAccumulator:
@@ -1146,7 +1190,7 @@ Lint/ParenthesesAsGroupedExpression:
1146
1190
  Description: >-
1147
1191
  Checks for method calls with a space before the opening
1148
1192
  parenthesis.
1149
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
1193
+ StyleGuide: '#parens-no-spaces'
1150
1194
  Enabled: true
1151
1195
 
1152
1196
  Lint/PercentStringArray:
@@ -1173,7 +1217,7 @@ Lint/RequireParentheses:
1173
1217
 
1174
1218
  Lint/RescueException:
1175
1219
  Description: 'Avoid rescuing the Exception class.'
1176
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
1220
+ StyleGuide: '#no-blind-rescues'
1177
1221
  Enabled: true
1178
1222
 
1179
1223
  Lint/ShadowedException:
@@ -1190,13 +1234,17 @@ Lint/ShadowingOuterLocalVariable:
1190
1234
 
1191
1235
  Lint/StringConversionInInterpolation:
1192
1236
  Description: 'Checks for Object#to_s usage in string interpolation.'
1193
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
1237
+ StyleGuide: '#no-to-s'
1194
1238
  Enabled: true
1195
1239
 
1196
1240
  Lint/UnderscorePrefixedVariableName:
1197
1241
  Description: 'Do not use prefix `_` for a variable that is used.'
1198
1242
  Enabled: true
1199
1243
 
1244
+ Lint/UnifiedInteger:
1245
+ Description: 'Use Integer instead of Fixnum or Bignum'
1246
+ Enabled: true
1247
+
1200
1248
  Lint/UnneededDisable:
1201
1249
  Description: >-
1202
1250
  Checks for rubocop:disable comments that can be removed.
@@ -1204,14 +1252,18 @@ Lint/UnneededDisable:
1204
1252
  It must be explicitly disabled.
1205
1253
  Enabled: true
1206
1254
 
1255
+ Lint/UnneededSplatExpansion:
1256
+ Description: 'Checks for splat unnecessarily being called on literals'
1257
+ Enabled: true
1258
+
1207
1259
  Lint/UnusedBlockArgument:
1208
1260
  Description: 'Checks for unused block arguments.'
1209
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
1261
+ StyleGuide: '#underscore-unused-vars'
1210
1262
  Enabled: true
1211
1263
 
1212
1264
  Lint/UnusedMethodArgument:
1213
1265
  Description: 'Checks for unused method arguments.'
1214
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
1266
+ StyleGuide: '#underscore-unused-vars'
1215
1267
  Enabled: true
1216
1268
 
1217
1269
  Lint/UnreachableCode:
@@ -1223,13 +1275,9 @@ Lint/UselessAccessModifier:
1223
1275
  Enabled: true
1224
1276
  ContextCreatingMethods: []
1225
1277
 
1226
- Lint/UselessArraySplat:
1227
- Description: 'Checks for useless array splats.'
1228
- Enabled: true
1229
-
1230
1278
  Lint/UselessAssignment:
1231
1279
  Description: 'Checks for useless assignment to a local variable.'
1232
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
1280
+ StyleGuide: '#underscore-unused-vars'
1233
1281
  Enabled: true
1234
1282
 
1235
1283
  Lint/UselessComparison:
@@ -1295,6 +1343,10 @@ Performance/DoubleStartEndWith:
1295
1343
  Performance/EndWith:
1296
1344
  Description: 'Use `end_with?` instead of a regex match anchored to the end of a string.'
1297
1345
  Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end'
1346
+ # This will change to a new method call which isn't guaranteed to be on the
1347
+ # object. Switching these methods has to be done with knowledge of the types
1348
+ # of the variables which rubocop doesn't have.
1349
+ AutoCorrect: false
1298
1350
  Enabled: true
1299
1351
 
1300
1352
  Performance/FixedSize:
@@ -1318,7 +1370,7 @@ Performance/HashEachMethods:
1318
1370
  Description: >-
1319
1371
  Use `Hash#each_key` and `Hash#each_value` instead of
1320
1372
  `Hash#keys.each` and `Hash#values.each`.
1321
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-each'
1373
+ StyleGuide: '#hash-each'
1322
1374
  Enabled: true
1323
1375
  AutoCorrect: false
1324
1376
 
@@ -1326,10 +1378,6 @@ Performance/LstripRstrip:
1326
1378
  Description: 'Use `strip` instead of `lstrip.rstrip`.'
1327
1379
  Enabled: true
1328
1380
 
1329
- Performance/PushSplat:
1330
- Description: 'Use `concat` instead of `push(*)`.'
1331
- Enabled: true
1332
-
1333
1381
  Performance/RangeInclude:
1334
1382
  Description: 'Use `Range#cover?` instead of `Range#include?`.'
1335
1383
  Reference: 'https://github.com/JuanitoFatas/fast-ruby#cover-vs-include-code'
@@ -1363,7 +1411,7 @@ Performance/ReverseEach:
1363
1411
  Performance/Sample:
1364
1412
  Description: >-
1365
1413
  Use `sample` instead of `shuffle.first`,
1366
- `shuffle.last`, and `shuffle[Fixnum]`.
1414
+ `shuffle.last`, and `shuffle[Integer]`.
1367
1415
  Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
1368
1416
  Enabled: true
1369
1417
 
@@ -1374,9 +1422,17 @@ Performance/Size:
1374
1422
  Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
1375
1423
  Enabled: true
1376
1424
 
1425
+ Performance/SortWithBlock:
1426
+ Description: 'Use `sort_by(&:foo)` instead of `sort_by { |a, b| a.foo <=> b.foo }`.'
1427
+ Enabled: true
1428
+
1377
1429
  Performance/StartWith:
1378
1430
  Description: 'Use `start_with?` instead of a regex match anchored to the beginning of a string.'
1379
1431
  Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringmatch-vs-stringstart_withstringend_with-code-start-code-end'
1432
+ # This will change to a new method call which isn't guaranteed to be on the
1433
+ # object. Switching these methods has to be done with knowledge of the types
1434
+ # of the variables which rubocop doesn't have.
1435
+ AutoCorrect: false
1380
1436
  Enabled: true
1381
1437
 
1382
1438
  Performance/StringReplacement:
@@ -1407,6 +1463,15 @@ Rails/Delegate:
1407
1463
  Description: 'Prefer delegate method for delegations.'
1408
1464
  Enabled: true
1409
1465
 
1466
+ Rails/DelegateAllowBlank:
1467
+ Description: 'Do not use allow_blank as an option to delegate.'
1468
+ Enabled: true
1469
+
1470
+ Rails/DynamicFindBy:
1471
+ Description: 'Use `find_by` instead of dynamic `find_by_*`.'
1472
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#find_by'
1473
+ Enabled: true
1474
+
1410
1475
  Rails/Exit:
1411
1476
  Description: >-
1412
1477
  Favor `fail`, `break`, `return`, etc. over `exit` in
@@ -1429,6 +1494,17 @@ Rails/HasAndBelongsToMany:
1429
1494
  StyleGuide: 'https://github.com/bbatsov/rails-style-guide#has-many-through'
1430
1495
  Enabled: true
1431
1496
 
1497
+ Rails/HttpPositionalArguments:
1498
+ Description: 'Use keyword arguments instead of positional arguments in http method calls.'
1499
+ Enabled: true
1500
+ Include:
1501
+ - 'spec/**/*'
1502
+ - 'test/**/*'
1503
+
1504
+ Rails/NotNullColumn:
1505
+ Description: 'Do not add a NOT NULL column without a default value'
1506
+ Enabled: true
1507
+
1432
1508
  Rails/Output:
1433
1509
  Description: 'Checks for calls to puts, print, etc.'
1434
1510
  Enabled: true
@@ -1452,6 +1528,10 @@ Rails/RequestReferer:
1452
1528
  Description: 'Use consistent syntax for request.referer.'
1453
1529
  Enabled: true
1454
1530
 
1531
+ Rails/SafeNavigation:
1532
+ Description: "Use Ruby's safe navigation operator (`&.`) instead of `try!`"
1533
+ Enabled: true
1534
+
1455
1535
  Rails/ScopeArgs:
1456
1536
  Description: 'Checks the arguments of ActiveRecord scopes.'
1457
1537
  Enabled: true
@@ -1469,3 +1549,13 @@ Rails/UniqBeforePluck:
1469
1549
  Rails/Validation:
1470
1550
  Description: 'Use validates :attribute, hash of validations.'
1471
1551
  Enabled: true
1552
+
1553
+ Security/JSONLoad:
1554
+ Description: >-
1555
+ Prefer usage of `JSON.parse` over `JSON.load` due to potential
1556
+ security issues. See reference for more information.
1557
+ Reference: 'http://ruby-doc.org/stdlib-2.3.0/libdoc/json/rdoc/JSON.html#method-i-load'
1558
+ Enabled: true
1559
+ # Autocorrect here will change to a method that may cause crashes depending
1560
+ # on the value of the argument.
1561
+ AutoCorrect: false