museo 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.rubocop.yml +1307 -0
- data/.ruby-version +1 -0
- data/.travis.yml +8 -0
- data/Appraisals +10 -0
- data/Gemfile +4 -0
- data/Guardfile +20 -0
- data/README.md +38 -0
- data/Rakefile +38 -0
- data/app/views/layouts/museo/snapshot.html.erb +8 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/museo +7 -0
- data/gemfiles/rails_4.gemfile +9 -0
- data/gemfiles/rails_4.gemfile.lock +200 -0
- data/gemfiles/rails_5.gemfile +8 -0
- data/gemfiles/rails_5.gemfile.lock +205 -0
- data/lib/museo/cli.rb +67 -0
- data/lib/museo/engine.rb +5 -0
- data/lib/museo/formatter.rb +49 -0
- data/lib/museo/minitest_integration.rb +33 -0
- data/lib/museo/rspec_integration.rb +33 -0
- data/lib/museo/snapshot/minitest.rb +13 -0
- data/lib/museo/snapshot/rspec.rb +13 -0
- data/lib/museo/snapshot.rb +63 -0
- data/lib/museo/test_integration.rb +51 -0
- data/lib/museo/version.rb +3 -0
- data/lib/museo.rb +68 -0
- data/lib/tasks/museo_tasks.rake +1 -0
- data/museo.gemspec +31 -0
- metadata +221 -0
data/.rubocop.yml
ADDED
@@ -0,0 +1,1307 @@
|
|
1
|
+
AllCops:
|
2
|
+
Include:
|
3
|
+
- '**/*.gemspec'
|
4
|
+
- '**/*.podspec'
|
5
|
+
- '**/*.jbuilder'
|
6
|
+
- '**/*.rake'
|
7
|
+
- '**/*.opal'
|
8
|
+
- '**/Gemfile'
|
9
|
+
- '**/Rakefile'
|
10
|
+
- '**/Capfile'
|
11
|
+
- '**/Guardfile'
|
12
|
+
- '**/Podfile'
|
13
|
+
- '**/Thorfile'
|
14
|
+
- '**/Vagrantfile'
|
15
|
+
- '**/Berksfile'
|
16
|
+
- '**/Cheffile'
|
17
|
+
- '**/Vagabondfile'
|
18
|
+
Exclude:
|
19
|
+
- 'vendor/**/*'
|
20
|
+
- 'db/schema.rb'
|
21
|
+
- 'node_modules/**/*'
|
22
|
+
- 'tmp/**/*'
|
23
|
+
- 'bin/bundle'
|
24
|
+
- 'bin/rails'
|
25
|
+
- 'bin/rake'
|
26
|
+
- 'bin/spring'
|
27
|
+
DisplayCopNames: false
|
28
|
+
StyleGuideCopsOnly: false
|
29
|
+
TargetRubyVersion: 2.2
|
30
|
+
|
31
|
+
Style/AccessModifierIndentation:
|
32
|
+
Description: Check indentation of private/protected visibility modifiers.
|
33
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
|
34
|
+
Enabled: true
|
35
|
+
EnforcedStyle: indent
|
36
|
+
SupportedStyles:
|
37
|
+
- outdent
|
38
|
+
- indent
|
39
|
+
|
40
|
+
Style/AlignHash:
|
41
|
+
Description: Align the elements of a hash literal if they span more than one line.
|
42
|
+
Enabled: true
|
43
|
+
EnforcedHashRocketStyle: key
|
44
|
+
EnforcedColonStyle: key
|
45
|
+
EnforcedLastArgumentHashStyle: always_inspect
|
46
|
+
SupportedLastArgumentHashStyles:
|
47
|
+
- always_inspect
|
48
|
+
- always_ignore
|
49
|
+
- ignore_implicit
|
50
|
+
- ignore_explicit
|
51
|
+
|
52
|
+
Style/AlignParameters:
|
53
|
+
Description: Align the parameters of a method call if they span more than one line.
|
54
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
|
55
|
+
Enabled: true
|
56
|
+
EnforcedStyle: with_first_parameter
|
57
|
+
SupportedStyles:
|
58
|
+
- with_first_parameter
|
59
|
+
- with_fixed_indentation
|
60
|
+
|
61
|
+
Style/AndOr:
|
62
|
+
Description: Use &&/|| instead of and/or.
|
63
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
|
64
|
+
Enabled: true
|
65
|
+
EnforcedStyle: always
|
66
|
+
SupportedStyles:
|
67
|
+
- always
|
68
|
+
- conditionals
|
69
|
+
|
70
|
+
Style/BarePercentLiterals:
|
71
|
+
Description: Checks if usage of %() or %Q() matches configuration.
|
72
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
|
73
|
+
Enabled: true
|
74
|
+
EnforcedStyle: bare_percent
|
75
|
+
SupportedStyles:
|
76
|
+
- percent_q
|
77
|
+
- bare_percent
|
78
|
+
|
79
|
+
Style/BracesAroundHashParameters:
|
80
|
+
Description: Enforce braces style around hash parameters.
|
81
|
+
Enabled: true
|
82
|
+
EnforcedStyle: no_braces
|
83
|
+
SupportedStyles:
|
84
|
+
- braces
|
85
|
+
- no_braces
|
86
|
+
- context_dependent
|
87
|
+
|
88
|
+
Style/CaseIndentation:
|
89
|
+
Description: Indentation of when in a case/when/[else/]end.
|
90
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
|
91
|
+
Enabled: true
|
92
|
+
IndentWhenRelativeTo: case
|
93
|
+
SupportedStyles:
|
94
|
+
- case
|
95
|
+
- end
|
96
|
+
IndentOneStep: false
|
97
|
+
|
98
|
+
Style/ClassAndModuleChildren:
|
99
|
+
Description: Checks style of children classes and modules.
|
100
|
+
Enabled: true
|
101
|
+
EnforcedStyle: nested
|
102
|
+
SupportedStyles:
|
103
|
+
- nested
|
104
|
+
- compact
|
105
|
+
|
106
|
+
Style/ClassCheck:
|
107
|
+
Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
|
108
|
+
Enabled: true
|
109
|
+
EnforcedStyle: is_a?
|
110
|
+
SupportedStyles:
|
111
|
+
- is_a?
|
112
|
+
- kind_of?
|
113
|
+
|
114
|
+
Style/CollectionMethods:
|
115
|
+
Description: Preferred collection methods.
|
116
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
|
117
|
+
Enabled: true
|
118
|
+
PreferredMethods:
|
119
|
+
collect: map
|
120
|
+
collect!: map!
|
121
|
+
inject: reduce
|
122
|
+
detect: find
|
123
|
+
find_all: select
|
124
|
+
|
125
|
+
Style/CommentAnnotation:
|
126
|
+
Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
|
127
|
+
REVIEW).
|
128
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
|
129
|
+
Enabled: false
|
130
|
+
Keywords:
|
131
|
+
- TODO
|
132
|
+
- FIXME
|
133
|
+
- OPTIMIZE
|
134
|
+
- HACK
|
135
|
+
- REVIEW
|
136
|
+
|
137
|
+
Style/DotPosition:
|
138
|
+
Description: Checks the position of the dot in multi-line method calls.
|
139
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
|
140
|
+
Enabled: true
|
141
|
+
EnforcedStyle: trailing
|
142
|
+
SupportedStyles:
|
143
|
+
- leading
|
144
|
+
- trailing
|
145
|
+
|
146
|
+
Style/EmptyLineBetweenDefs:
|
147
|
+
Description: Use empty lines between defs.
|
148
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
|
149
|
+
Enabled: true
|
150
|
+
AllowAdjacentOneLineDefs: false
|
151
|
+
|
152
|
+
Style/EmptyLinesAroundBlockBody:
|
153
|
+
Description: Keeps track of empty lines around block bodies.
|
154
|
+
Enabled: true
|
155
|
+
EnforcedStyle: no_empty_lines
|
156
|
+
SupportedStyles:
|
157
|
+
- empty_lines
|
158
|
+
- no_empty_lines
|
159
|
+
|
160
|
+
Style/EmptyLinesAroundClassBody:
|
161
|
+
Description: Keeps track of empty lines around class bodies.
|
162
|
+
Enabled: true
|
163
|
+
EnforcedStyle: no_empty_lines
|
164
|
+
SupportedStyles:
|
165
|
+
- empty_lines
|
166
|
+
- no_empty_lines
|
167
|
+
|
168
|
+
Style/EmptyLinesAroundModuleBody:
|
169
|
+
Description: Keeps track of empty lines around module bodies.
|
170
|
+
Enabled: true
|
171
|
+
EnforcedStyle: no_empty_lines
|
172
|
+
SupportedStyles:
|
173
|
+
- empty_lines
|
174
|
+
- no_empty_lines
|
175
|
+
|
176
|
+
Style/Encoding:
|
177
|
+
Description: Use UTF-8 as the source file encoding.
|
178
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
|
179
|
+
Enabled: false
|
180
|
+
EnforcedStyle: always
|
181
|
+
SupportedStyles:
|
182
|
+
- when_needed
|
183
|
+
- always
|
184
|
+
|
185
|
+
Style/FileName:
|
186
|
+
Description: Use snake_case for source file names.
|
187
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
|
188
|
+
Enabled: true
|
189
|
+
Exclude: []
|
190
|
+
|
191
|
+
Style/FirstParameterIndentation:
|
192
|
+
Description: Checks the indentation of the first parameter in a method call.
|
193
|
+
Enabled: true
|
194
|
+
EnforcedStyle: consistent
|
195
|
+
SupportedStyles:
|
196
|
+
- consistent
|
197
|
+
- special_for_inner_method_call
|
198
|
+
- special_for_inner_method_call_in_parentheses
|
199
|
+
|
200
|
+
Style/For:
|
201
|
+
Description: Checks use of for or each in multiline loops.
|
202
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
|
203
|
+
Enabled: true
|
204
|
+
EnforcedStyle: each
|
205
|
+
SupportedStyles:
|
206
|
+
- for
|
207
|
+
- each
|
208
|
+
|
209
|
+
Style/FormatString:
|
210
|
+
Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
|
211
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
|
212
|
+
Enabled: true
|
213
|
+
EnforcedStyle: format
|
214
|
+
SupportedStyles:
|
215
|
+
- format
|
216
|
+
- sprintf
|
217
|
+
- percent
|
218
|
+
|
219
|
+
Style/GlobalVars:
|
220
|
+
Description: Do not introduce global variables.
|
221
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
|
222
|
+
Enabled: true
|
223
|
+
AllowedVariables: []
|
224
|
+
|
225
|
+
Style/GuardClause:
|
226
|
+
Description: Check for conditionals that can be replaced with guard clauses
|
227
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
228
|
+
Enabled: true
|
229
|
+
MinBodyLength: 1
|
230
|
+
|
231
|
+
Style/HashSyntax:
|
232
|
+
Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
|
233
|
+
1, :b => 2 }.'
|
234
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
|
235
|
+
Enabled: true
|
236
|
+
EnforcedStyle: ruby19
|
237
|
+
SupportedStyles:
|
238
|
+
- ruby19
|
239
|
+
- hash_rockets
|
240
|
+
|
241
|
+
Style/IfUnlessModifier:
|
242
|
+
Description: Favor modifier if/unless usage when you have a single-line body.
|
243
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
|
244
|
+
Enabled: false
|
245
|
+
MaxLineLength: 100
|
246
|
+
|
247
|
+
Style/IndentationWidth:
|
248
|
+
Description: Use 2 spaces for indentation.
|
249
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
250
|
+
Enabled: true
|
251
|
+
Width: 2
|
252
|
+
|
253
|
+
Style/IndentHash:
|
254
|
+
Description: Checks the indentation of the first key in a hash literal.
|
255
|
+
Enabled: true
|
256
|
+
EnforcedStyle: consistent
|
257
|
+
SupportedStyles:
|
258
|
+
- special_inside_parentheses
|
259
|
+
- consistent
|
260
|
+
|
261
|
+
Style/LambdaCall:
|
262
|
+
Description: Use lambda.call(...) instead of lambda.(...).
|
263
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
|
264
|
+
Enabled: true
|
265
|
+
EnforcedStyle: call
|
266
|
+
SupportedStyles:
|
267
|
+
- call
|
268
|
+
- braces
|
269
|
+
|
270
|
+
Style/Next:
|
271
|
+
Description: Use `next` to skip iteration instead of a condition at the end.
|
272
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
|
273
|
+
Enabled: true
|
274
|
+
EnforcedStyle: always
|
275
|
+
MinBodyLength: 3
|
276
|
+
SupportedStyles:
|
277
|
+
- skip_modifier_ifs
|
278
|
+
- always
|
279
|
+
|
280
|
+
Style/NonNilCheck:
|
281
|
+
Description: Checks for redundant nil checks.
|
282
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
|
283
|
+
Enabled: true
|
284
|
+
IncludeSemanticChanges: false
|
285
|
+
|
286
|
+
Style/MethodDefParentheses:
|
287
|
+
Description: Checks if the method definitions have or don't have parentheses.
|
288
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
289
|
+
Enabled: true
|
290
|
+
EnforcedStyle: require_parentheses
|
291
|
+
SupportedStyles:
|
292
|
+
- require_parentheses
|
293
|
+
- require_no_parentheses
|
294
|
+
|
295
|
+
Style/MethodName:
|
296
|
+
Description: Use the configured style when naming methods.
|
297
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
298
|
+
Enabled: true
|
299
|
+
EnforcedStyle: snake_case
|
300
|
+
SupportedStyles:
|
301
|
+
- snake_case
|
302
|
+
- camelCase
|
303
|
+
|
304
|
+
Style/MultilineMethodCallIndentation:
|
305
|
+
Description: Checks indentation of method calls with the dot operator that span more than one line.
|
306
|
+
Enabled: true
|
307
|
+
EnforcedStyle: indented
|
308
|
+
SupportedStyles:
|
309
|
+
- aligned
|
310
|
+
- indented
|
311
|
+
|
312
|
+
Style/MultilineOperationIndentation:
|
313
|
+
Description: Checks indentation of binary operations that span more than one line.
|
314
|
+
Enabled: true
|
315
|
+
EnforcedStyle: indented
|
316
|
+
SupportedStyles:
|
317
|
+
- aligned
|
318
|
+
- indented
|
319
|
+
|
320
|
+
Style/NumericLiterals:
|
321
|
+
Description: Add underscores to large numeric literals to improve their readability.
|
322
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
|
323
|
+
Enabled: false
|
324
|
+
MinDigits: 5
|
325
|
+
|
326
|
+
Style/ParenthesesAroundCondition:
|
327
|
+
Description: Don't use parentheses around the condition of an if/unless/while.
|
328
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
|
329
|
+
Enabled: true
|
330
|
+
AllowSafeAssignment: true
|
331
|
+
|
332
|
+
Style/PercentLiteralDelimiters:
|
333
|
+
Description: Use `%`-literal delimiters consistently
|
334
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
|
335
|
+
Enabled: true
|
336
|
+
PreferredDelimiters:
|
337
|
+
'%': '()'
|
338
|
+
'%i': '()'
|
339
|
+
'%q': '()'
|
340
|
+
'%Q': '()'
|
341
|
+
'%r': '{}'
|
342
|
+
'%s': '()'
|
343
|
+
'%w': '()'
|
344
|
+
'%W': '()'
|
345
|
+
'%x': '()'
|
346
|
+
|
347
|
+
Style/PercentQLiterals:
|
348
|
+
Description: Checks if uses of %Q/%q match the configured preference.
|
349
|
+
Enabled: true
|
350
|
+
EnforcedStyle: lower_case_q
|
351
|
+
SupportedStyles:
|
352
|
+
- lower_case_q
|
353
|
+
- upper_case_q
|
354
|
+
|
355
|
+
Style/PredicateName:
|
356
|
+
Description: Check the names of predicate methods.
|
357
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
|
358
|
+
Enabled: true
|
359
|
+
NamePrefix:
|
360
|
+
- is_
|
361
|
+
- has_
|
362
|
+
- have_
|
363
|
+
NamePrefixBlacklist:
|
364
|
+
- is_
|
365
|
+
- has_
|
366
|
+
- have_
|
367
|
+
|
368
|
+
Style/RaiseArgs:
|
369
|
+
Description: Checks the arguments passed to raise/fail.
|
370
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
|
371
|
+
Enabled: true
|
372
|
+
EnforcedStyle: exploded
|
373
|
+
SupportedStyles:
|
374
|
+
- compact
|
375
|
+
- exploded
|
376
|
+
|
377
|
+
Style/RedundantReturn:
|
378
|
+
Description: Don't use return where it's not required.
|
379
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
|
380
|
+
Enabled: true
|
381
|
+
AllowMultipleReturnValues: false
|
382
|
+
|
383
|
+
Style/RegexpLiteral:
|
384
|
+
Description: Use %r for regular expressions matching more than `MaxSlashes` '/'
|
385
|
+
characters. Use %r only for regular expressions matching more than `MaxSlashes`
|
386
|
+
'/' character.
|
387
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
|
388
|
+
Enabled: false
|
389
|
+
|
390
|
+
Style/Semicolon:
|
391
|
+
Description: Don't use semicolons to terminate expressions.
|
392
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
|
393
|
+
Enabled: true
|
394
|
+
AllowAsExpressionSeparator: false
|
395
|
+
|
396
|
+
Style/SignalException:
|
397
|
+
Description: Checks for proper usage of fail and raise.
|
398
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
|
399
|
+
Enabled: true
|
400
|
+
EnforcedStyle: semantic
|
401
|
+
SupportedStyles:
|
402
|
+
- only_raise
|
403
|
+
- only_fail
|
404
|
+
- semantic
|
405
|
+
|
406
|
+
Style/SingleLineBlockParams:
|
407
|
+
Description: Enforces the names of some block params.
|
408
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
|
409
|
+
Enabled: true
|
410
|
+
Methods:
|
411
|
+
- reduce:
|
412
|
+
- a
|
413
|
+
- e
|
414
|
+
- inject:
|
415
|
+
- a
|
416
|
+
- e
|
417
|
+
|
418
|
+
Style/SingleLineMethods:
|
419
|
+
Description: Avoid single-line methods.
|
420
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
|
421
|
+
Enabled: true
|
422
|
+
AllowIfMethodIsEmpty: true
|
423
|
+
|
424
|
+
Style/StringLiterals:
|
425
|
+
Description: Checks if uses of quotes match the configured preference.
|
426
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
|
427
|
+
Enabled: true
|
428
|
+
EnforcedStyle: double_quotes
|
429
|
+
SupportedStyles:
|
430
|
+
- single_quotes
|
431
|
+
- double_quotes
|
432
|
+
|
433
|
+
Style/StringLiteralsInInterpolation:
|
434
|
+
Description: Checks if uses of quotes inside expressions in interpolated strings
|
435
|
+
match the configured preference.
|
436
|
+
Enabled: true
|
437
|
+
EnforcedStyle: double_quotes
|
438
|
+
SupportedStyles:
|
439
|
+
- single_quotes
|
440
|
+
- double_quotes
|
441
|
+
|
442
|
+
Style/SpaceAroundBlockParameters:
|
443
|
+
Description: Checks the spacing inside and after block parameters pipes.
|
444
|
+
Enabled: true
|
445
|
+
EnforcedStyleInsidePipes: no_space
|
446
|
+
SupportedStyles:
|
447
|
+
- space
|
448
|
+
- no_space
|
449
|
+
|
450
|
+
Style/SpaceAroundEqualsInParameterDefault:
|
451
|
+
Description: Checks that the equals signs in parameter default assignments have
|
452
|
+
or don't have surrounding space depending on configuration.
|
453
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
|
454
|
+
Enabled: true
|
455
|
+
EnforcedStyle: space
|
456
|
+
SupportedStyles:
|
457
|
+
- space
|
458
|
+
- no_space
|
459
|
+
|
460
|
+
Style/SpaceBeforeBlockBraces:
|
461
|
+
Description: Checks that the left block brace has or doesn't have space before it.
|
462
|
+
Enabled: true
|
463
|
+
EnforcedStyle: space
|
464
|
+
SupportedStyles:
|
465
|
+
- space
|
466
|
+
- no_space
|
467
|
+
|
468
|
+
Style/SpaceInsideBlockBraces:
|
469
|
+
Description: Checks that block braces have or don't have surrounding space. For
|
470
|
+
blocks taking parameters, checks that the left brace has or doesn't have trailing
|
471
|
+
space.
|
472
|
+
Enabled: true
|
473
|
+
EnforcedStyle: space
|
474
|
+
SupportedStyles:
|
475
|
+
- space
|
476
|
+
- no_space
|
477
|
+
EnforcedStyleForEmptyBraces: no_space
|
478
|
+
SpaceBeforeBlockParameters: true
|
479
|
+
|
480
|
+
Style/SpaceInsideHashLiteralBraces:
|
481
|
+
Description: Use spaces inside hash literal braces - or don't.
|
482
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
483
|
+
Enabled: true
|
484
|
+
EnforcedStyle: space
|
485
|
+
EnforcedStyleForEmptyBraces: no_space
|
486
|
+
SupportedStyles:
|
487
|
+
- space
|
488
|
+
- no_space
|
489
|
+
|
490
|
+
Style/SymbolProc:
|
491
|
+
Description: Use symbols as procs instead of blocks when possible.
|
492
|
+
Enabled: true
|
493
|
+
IgnoredMethods:
|
494
|
+
- respond_to
|
495
|
+
|
496
|
+
Style/TrailingBlankLines:
|
497
|
+
Description: Checks trailing blank lines and final newline.
|
498
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
|
499
|
+
Enabled: true
|
500
|
+
EnforcedStyle: final_newline
|
501
|
+
SupportedStyles:
|
502
|
+
- final_newline
|
503
|
+
- final_blank_line
|
504
|
+
|
505
|
+
Style/TrailingCommaInArguments:
|
506
|
+
# If `comma`, the cop requires a comma after the last argument, but only for
|
507
|
+
# parenthesized method calls where each argument is on its own line.
|
508
|
+
# If `consistent_comma`, the cop requires a comma after the last argument,
|
509
|
+
# for all parenthesized method calls with arguments.
|
510
|
+
Enabled: true
|
511
|
+
EnforcedStyleForMultiline: comma
|
512
|
+
SupportedStyles:
|
513
|
+
- comma
|
514
|
+
- consistent_comma
|
515
|
+
- no_comma
|
516
|
+
|
517
|
+
Style/TrailingCommaInLiteral:
|
518
|
+
# If `comma`, the cop requires a comma after the last item in an array or
|
519
|
+
# hash, but only when each item is on its own line.
|
520
|
+
# If `consistent_comma`, the cop requires a comma after the last item of all
|
521
|
+
# non-empty array and hash literals.
|
522
|
+
Enabled: true
|
523
|
+
EnforcedStyleForMultiline: comma
|
524
|
+
SupportedStyles:
|
525
|
+
- comma
|
526
|
+
- consistent_comma
|
527
|
+
- no_comma
|
528
|
+
|
529
|
+
Style/TrivialAccessors:
|
530
|
+
Description: Prefer attr_* methods to trivial readers/writers.
|
531
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
|
532
|
+
Enabled: true
|
533
|
+
ExactNameMatch: false
|
534
|
+
AllowPredicates: false
|
535
|
+
AllowDSLWriters: false
|
536
|
+
Whitelist:
|
537
|
+
- to_ary
|
538
|
+
- to_a
|
539
|
+
- to_c
|
540
|
+
- to_enum
|
541
|
+
- to_h
|
542
|
+
- to_hash
|
543
|
+
- to_i
|
544
|
+
- to_int
|
545
|
+
- to_io
|
546
|
+
- to_open
|
547
|
+
- to_path
|
548
|
+
- to_proc
|
549
|
+
- to_r
|
550
|
+
- to_regexp
|
551
|
+
- to_str
|
552
|
+
- to_s
|
553
|
+
- to_sym
|
554
|
+
|
555
|
+
Style/VariableName:
|
556
|
+
Description: Use the configured style when naming variables.
|
557
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
|
558
|
+
Enabled: true
|
559
|
+
EnforcedStyle: snake_case
|
560
|
+
SupportedStyles:
|
561
|
+
- snake_case
|
562
|
+
- camelCase
|
563
|
+
|
564
|
+
Style/WhileUntilModifier:
|
565
|
+
Description: Favor modifier while/until usage when you have a single-line body.
|
566
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier
|
567
|
+
Enabled: false
|
568
|
+
MaxLineLength: 100
|
569
|
+
|
570
|
+
Style/WordArray:
|
571
|
+
Description: Use %w or %W for arrays of words.
|
572
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
|
573
|
+
Enabled: true
|
574
|
+
MinSize: 0
|
575
|
+
WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
|
576
|
+
|
577
|
+
Metrics/AbcSize:
|
578
|
+
Description: A calculated magnitude based on number of assignments, branches, and
|
579
|
+
conditions.
|
580
|
+
Enabled: true
|
581
|
+
Max: 15
|
582
|
+
|
583
|
+
Metrics/BlockNesting:
|
584
|
+
Description: Avoid excessive block nesting
|
585
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
|
586
|
+
Enabled: true
|
587
|
+
Max: 3
|
588
|
+
|
589
|
+
Metrics/ClassLength:
|
590
|
+
Description: Avoid classes longer than 100 lines of code.
|
591
|
+
Enabled: true
|
592
|
+
CountComments: false
|
593
|
+
Max: 100
|
594
|
+
|
595
|
+
Metrics/CyclomaticComplexity:
|
596
|
+
Description: A complexity metric that is strongly correlated to the number of test
|
597
|
+
cases needed to validate a method.
|
598
|
+
Enabled: true
|
599
|
+
Max: 6
|
600
|
+
|
601
|
+
Metrics/LineLength:
|
602
|
+
Description: Limit lines to 100 characters.
|
603
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
|
604
|
+
Enabled: true
|
605
|
+
Max: 100
|
606
|
+
AllowURI: true
|
607
|
+
URISchemes:
|
608
|
+
- http
|
609
|
+
- https
|
610
|
+
|
611
|
+
Metrics/MethodLength:
|
612
|
+
Description: Avoid methods longer than 10 lines of code.
|
613
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
|
614
|
+
Enabled: true
|
615
|
+
CountComments: false
|
616
|
+
Max: 10
|
617
|
+
|
618
|
+
Metrics/ParameterLists:
|
619
|
+
Description: Avoid parameter lists longer than three or four parameters.
|
620
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
|
621
|
+
Enabled: true
|
622
|
+
Max: 3
|
623
|
+
CountKeywordArgs: true
|
624
|
+
|
625
|
+
Metrics/PerceivedComplexity:
|
626
|
+
Description: A complexity metric geared towards measuring complexity for a human
|
627
|
+
reader.
|
628
|
+
Enabled: true
|
629
|
+
Max: 7
|
630
|
+
|
631
|
+
Lint/AssignmentInCondition:
|
632
|
+
Description: Don't use assignment in conditions.
|
633
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
|
634
|
+
Enabled: true
|
635
|
+
AllowSafeAssignment: true
|
636
|
+
|
637
|
+
Lint/EndAlignment:
|
638
|
+
Description: Align ends correctly.
|
639
|
+
Enabled: true
|
640
|
+
AlignWith: keyword
|
641
|
+
SupportedStyles:
|
642
|
+
- keyword
|
643
|
+
- variable
|
644
|
+
|
645
|
+
Lint/DefEndAlignment:
|
646
|
+
Description: Align ends corresponding to defs correctly.
|
647
|
+
Enabled: true
|
648
|
+
AlignWith: start_of_line
|
649
|
+
SupportedStyles:
|
650
|
+
- start_of_line
|
651
|
+
- def
|
652
|
+
|
653
|
+
Style/InlineComment:
|
654
|
+
Description: Avoid inline comments.
|
655
|
+
Enabled: false
|
656
|
+
|
657
|
+
Style/MethodCalledOnDoEndBlock:
|
658
|
+
Description: Avoid chaining a method call on a do...end block.
|
659
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
660
|
+
Enabled: true
|
661
|
+
|
662
|
+
Style/SymbolArray:
|
663
|
+
Description: Use %i or %I for arrays of symbols.
|
664
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
|
665
|
+
Enabled: true
|
666
|
+
|
667
|
+
Style/ExtraSpacing:
|
668
|
+
Description: Do not use unnecessary spacing.
|
669
|
+
Enabled: true
|
670
|
+
|
671
|
+
Style/AccessorMethodName:
|
672
|
+
Description: Check the naming of accessor methods for get_/set_.
|
673
|
+
Enabled: true
|
674
|
+
|
675
|
+
Style/Alias:
|
676
|
+
Description: Use alias_method instead of alias.
|
677
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
|
678
|
+
Enabled: true
|
679
|
+
|
680
|
+
Style/AlignArray:
|
681
|
+
Description: Align the elements of an array literal if they span more than one line.
|
682
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
|
683
|
+
Enabled: true
|
684
|
+
|
685
|
+
Style/ArrayJoin:
|
686
|
+
Description: Use Array#join instead of Array#*.
|
687
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
|
688
|
+
Enabled: true
|
689
|
+
|
690
|
+
Style/AsciiComments:
|
691
|
+
Description: Use only ascii symbols in comments.
|
692
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
|
693
|
+
Enabled: true
|
694
|
+
|
695
|
+
Style/AsciiIdentifiers:
|
696
|
+
Description: Use only ascii symbols in identifiers.
|
697
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
|
698
|
+
Enabled: true
|
699
|
+
|
700
|
+
Style/Attr:
|
701
|
+
Description: Checks for uses of Module#attr.
|
702
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
|
703
|
+
Enabled: true
|
704
|
+
|
705
|
+
Style/BeginBlock:
|
706
|
+
Description: Avoid the use of BEGIN blocks.
|
707
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
|
708
|
+
Enabled: true
|
709
|
+
|
710
|
+
Style/BlockComments:
|
711
|
+
Description: Do not use block comments.
|
712
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
|
713
|
+
Enabled: true
|
714
|
+
|
715
|
+
Style/BlockEndNewline:
|
716
|
+
Description: Put end statement of multiline block on its own line.
|
717
|
+
Enabled: true
|
718
|
+
|
719
|
+
Style/BlockDelimiters:
|
720
|
+
EnforcedStyle: line_count_based
|
721
|
+
SupportedStyles:
|
722
|
+
# The `line_count_based` style enforces braces around single line blocks and
|
723
|
+
# do..end around multi-line blocks.
|
724
|
+
- line_count_based
|
725
|
+
# The `semantic` style enforces braces around functional blocks, where the
|
726
|
+
# primary purpose of the block is to return a value and do..end for
|
727
|
+
# procedural blocks, where the primary purpose of the block is its
|
728
|
+
# side-effects.
|
729
|
+
#
|
730
|
+
# This looks at the usage of a block's method to determine its type (e.g. is
|
731
|
+
# the result of a `map` assigned to a variable or passed to another
|
732
|
+
# method) but exceptions are permitted in the `ProceduralMethods`,
|
733
|
+
# `FunctionalMethods` and `IgnoredMethods` sections below.
|
734
|
+
- semantic
|
735
|
+
# The `braces_for_chaining` style enforces braces around single line blocks
|
736
|
+
# and do..end around multi-line blocks, except for multi-line blocks whose
|
737
|
+
# return value is being chained with another method (in which case braces
|
738
|
+
# are enforced).
|
739
|
+
- braces_for_chaining
|
740
|
+
ProceduralMethods:
|
741
|
+
# Methods that are known to be procedural in nature but look functional from
|
742
|
+
# their usage, e.g.
|
743
|
+
#
|
744
|
+
# time = Benchmark.realtime do
|
745
|
+
# foo.bar
|
746
|
+
# end
|
747
|
+
#
|
748
|
+
# Here, the return value of the block is discarded but the return value of
|
749
|
+
# `Benchmark.realtime` is used.
|
750
|
+
- benchmark
|
751
|
+
- bm
|
752
|
+
- bmbm
|
753
|
+
- create
|
754
|
+
- each_with_object
|
755
|
+
- measure
|
756
|
+
- new
|
757
|
+
- realtime
|
758
|
+
- tap
|
759
|
+
- with_object
|
760
|
+
FunctionalMethods:
|
761
|
+
# Methods that are known to be functional in nature but look procedural from
|
762
|
+
# their usage, e.g.
|
763
|
+
#
|
764
|
+
# let(:foo) { Foo.new }
|
765
|
+
#
|
766
|
+
# Here, the return value of `Foo.new` is used to define a `foo` helper but
|
767
|
+
# doesn't appear to be used from the return value of `let`.
|
768
|
+
- let
|
769
|
+
- let!
|
770
|
+
- subject
|
771
|
+
- watch
|
772
|
+
IgnoredMethods:
|
773
|
+
# Methods that can be either procedural or functional and cannot be
|
774
|
+
# categorised from their usage alone, e.g.
|
775
|
+
#
|
776
|
+
# foo = lambda do |x|
|
777
|
+
# puts "Hello, #{x}"
|
778
|
+
# end
|
779
|
+
#
|
780
|
+
# foo = lambda do |x|
|
781
|
+
# x * 100
|
782
|
+
# end
|
783
|
+
#
|
784
|
+
# Here, it is impossible to tell from the return value of `lambda` whether
|
785
|
+
# the inner block's return value is significant.
|
786
|
+
- lambda
|
787
|
+
- proc
|
788
|
+
- it
|
789
|
+
|
790
|
+
Style/CaseEquality:
|
791
|
+
Description: Avoid explicit use of the case equality operator(===).
|
792
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
|
793
|
+
Enabled: true
|
794
|
+
|
795
|
+
Style/CharacterLiteral:
|
796
|
+
Description: Checks for uses of character literals.
|
797
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
|
798
|
+
Enabled: true
|
799
|
+
|
800
|
+
Style/ClassAndModuleCamelCase:
|
801
|
+
Description: Use CamelCase for classes and modules.
|
802
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
|
803
|
+
Enabled: true
|
804
|
+
|
805
|
+
Style/ClassMethods:
|
806
|
+
Description: Use self when defining module/class methods.
|
807
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons
|
808
|
+
Enabled: true
|
809
|
+
|
810
|
+
Style/ClassVars:
|
811
|
+
Description: Avoid the use of class variables.
|
812
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
|
813
|
+
Enabled: true
|
814
|
+
|
815
|
+
Style/ColonMethodCall:
|
816
|
+
Description: 'Do not use :: for method call.'
|
817
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
|
818
|
+
Enabled: true
|
819
|
+
|
820
|
+
Style/CommentIndentation:
|
821
|
+
Description: Indentation of comments.
|
822
|
+
Enabled: true
|
823
|
+
|
824
|
+
Style/ConstantName:
|
825
|
+
Description: Constants should use SCREAMING_SNAKE_CASE.
|
826
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
|
827
|
+
Enabled: true
|
828
|
+
|
829
|
+
Style/DefWithParentheses:
|
830
|
+
Description: Use def with parentheses when there are arguments.
|
831
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
|
832
|
+
Enabled: true
|
833
|
+
|
834
|
+
Style/Documentation:
|
835
|
+
Description: Document classes and non-namespace modules.
|
836
|
+
Enabled: false
|
837
|
+
|
838
|
+
Style/DoubleNegation:
|
839
|
+
Description: Checks for uses of double negation (!!).
|
840
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
|
841
|
+
Enabled: false
|
842
|
+
|
843
|
+
Style/EachWithObject:
|
844
|
+
Description: Prefer `each_with_object` over `inject` or `reduce`.
|
845
|
+
Enabled: false
|
846
|
+
|
847
|
+
Style/ElseAlignment:
|
848
|
+
Description: Align elses and elsifs correctly.
|
849
|
+
Enabled: true
|
850
|
+
|
851
|
+
Style/EmptyElse:
|
852
|
+
Description: Avoid empty else-clauses.
|
853
|
+
Enabled: true
|
854
|
+
|
855
|
+
Style/EmptyLines:
|
856
|
+
Description: Don't use several empty lines in a row.
|
857
|
+
Enabled: true
|
858
|
+
|
859
|
+
Style/EmptyLinesAroundAccessModifier:
|
860
|
+
Description: Keep blank lines around access modifiers.
|
861
|
+
Enabled: true
|
862
|
+
|
863
|
+
Style/EmptyLinesAroundMethodBody:
|
864
|
+
Description: Keeps track of empty lines around method bodies.
|
865
|
+
Enabled: true
|
866
|
+
|
867
|
+
Style/EmptyLiteral:
|
868
|
+
Description: Prefer literals to Array.new/Hash.new/String.new.
|
869
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
|
870
|
+
Enabled: true
|
871
|
+
|
872
|
+
Style/EndBlock:
|
873
|
+
Description: Avoid the use of END blocks.
|
874
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
|
875
|
+
Enabled: true
|
876
|
+
|
877
|
+
Style/EndOfLine:
|
878
|
+
Description: Use Unix-style line endings.
|
879
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
|
880
|
+
Enabled: true
|
881
|
+
|
882
|
+
Style/EvenOdd:
|
883
|
+
Description: Favor the use of Fixnum#even? && Fixnum#odd?
|
884
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
885
|
+
Enabled: true
|
886
|
+
|
887
|
+
Style/FlipFlop:
|
888
|
+
Description: Checks for flip flops
|
889
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
|
890
|
+
Enabled: false
|
891
|
+
|
892
|
+
Style/IfWithSemicolon:
|
893
|
+
Description: Do not use if x; .... Use the ternary operator instead.
|
894
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
|
895
|
+
Enabled: true
|
896
|
+
|
897
|
+
Style/IndentationConsistency:
|
898
|
+
Description: Keep indentation straight.
|
899
|
+
Enabled: true
|
900
|
+
|
901
|
+
Style/IndentArray:
|
902
|
+
Description: Checks the indentation of the first element in an array literal.
|
903
|
+
Enabled: true
|
904
|
+
|
905
|
+
Style/InfiniteLoop:
|
906
|
+
Description: Use Kernel#loop for infinite loops.
|
907
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
|
908
|
+
Enabled: true
|
909
|
+
|
910
|
+
Style/Lambda:
|
911
|
+
Description: Use the new lambda literal syntax for single-line blocks.
|
912
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
|
913
|
+
Enabled: true
|
914
|
+
|
915
|
+
Style/LeadingCommentSpace:
|
916
|
+
Description: Comments should start with a space.
|
917
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
|
918
|
+
Enabled: true
|
919
|
+
|
920
|
+
Style/LineEndConcatenation:
|
921
|
+
Description: Use \ instead of + or << to concatenate two string literals at line
|
922
|
+
end.
|
923
|
+
Enabled: true
|
924
|
+
|
925
|
+
Style/MethodCallParentheses:
|
926
|
+
Description: Do not use parentheses for method calls with no arguments.
|
927
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
|
928
|
+
Enabled: true
|
929
|
+
|
930
|
+
Style/ModuleFunction:
|
931
|
+
Description: Checks for usage of `extend self` in modules.
|
932
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
|
933
|
+
Enabled: true
|
934
|
+
|
935
|
+
Style/MultilineBlockChain:
|
936
|
+
Description: Avoid multi-line chains of blocks.
|
937
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
|
938
|
+
Enabled: true
|
939
|
+
|
940
|
+
Style/MultilineBlockLayout:
|
941
|
+
Description: Ensures newlines after multiline block do statements.
|
942
|
+
Enabled: true
|
943
|
+
|
944
|
+
Style/MultilineIfThen:
|
945
|
+
Description: Do not use then for multi-line if/unless.
|
946
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
|
947
|
+
Enabled: true
|
948
|
+
|
949
|
+
Style/MultilineTernaryOperator:
|
950
|
+
Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
|
951
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
|
952
|
+
Enabled: true
|
953
|
+
|
954
|
+
Style/NegatedIf:
|
955
|
+
Description: Favor unless over if for negative conditions (or control flow or).
|
956
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
|
957
|
+
Enabled: true
|
958
|
+
|
959
|
+
Style/NegatedWhile:
|
960
|
+
Description: Favor until over while for negative conditions.
|
961
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
|
962
|
+
Enabled: true
|
963
|
+
|
964
|
+
Style/NestedTernaryOperator:
|
965
|
+
Description: Use one expression per branch in a ternary operator.
|
966
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
|
967
|
+
Enabled: true
|
968
|
+
|
969
|
+
Style/NilComparison:
|
970
|
+
Description: Prefer x.nil? to x == nil.
|
971
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
|
972
|
+
Enabled: true
|
973
|
+
|
974
|
+
Style/Not:
|
975
|
+
Description: Use ! instead of not.
|
976
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
|
977
|
+
Enabled: true
|
978
|
+
|
979
|
+
Style/OneLineConditional:
|
980
|
+
Description: Favor the ternary operator(?:) over if/then/else/end constructs.
|
981
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
|
982
|
+
Enabled: false
|
983
|
+
|
984
|
+
Style/OpMethod:
|
985
|
+
Description: When defining binary operators, name the argument other.
|
986
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
|
987
|
+
Enabled: true
|
988
|
+
|
989
|
+
Style/PerlBackrefs:
|
990
|
+
Description: Avoid Perl-style regex back references.
|
991
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
|
992
|
+
Enabled: true
|
993
|
+
|
994
|
+
Style/Proc:
|
995
|
+
Description: Use proc instead of Proc.new.
|
996
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
|
997
|
+
Enabled: true
|
998
|
+
|
999
|
+
Style/RedundantBegin:
|
1000
|
+
Description: Don't use begin blocks when they are not needed.
|
1001
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
|
1002
|
+
Enabled: true
|
1003
|
+
|
1004
|
+
Style/RedundantException:
|
1005
|
+
Description: Checks for an obsolete RuntimeException argument in raise/fail.
|
1006
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
|
1007
|
+
Enabled: true
|
1008
|
+
|
1009
|
+
Style/RedundantSelf:
|
1010
|
+
Description: Don't use self where it's not needed.
|
1011
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
|
1012
|
+
Enabled: true
|
1013
|
+
|
1014
|
+
Style/RescueModifier:
|
1015
|
+
Description: Avoid using rescue in its modifier form.
|
1016
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
|
1017
|
+
Enabled: true
|
1018
|
+
|
1019
|
+
Style/SelfAssignment:
|
1020
|
+
Description: Checks for places where self-assignment shorthand should have been
|
1021
|
+
used.
|
1022
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
|
1023
|
+
Enabled: true
|
1024
|
+
|
1025
|
+
Style/SpaceBeforeFirstArg:
|
1026
|
+
Description: Put a space between a method name and the first argument in a method
|
1027
|
+
call without parentheses.
|
1028
|
+
Enabled: true
|
1029
|
+
|
1030
|
+
Style/SpaceAfterColon:
|
1031
|
+
Description: Use spaces after colons.
|
1032
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
1033
|
+
Enabled: true
|
1034
|
+
|
1035
|
+
Style/SpaceAfterComma:
|
1036
|
+
Description: Use spaces after commas.
|
1037
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
1038
|
+
Enabled: true
|
1039
|
+
|
1040
|
+
Style/SpaceAroundKeyword:
|
1041
|
+
Description: Use a space around keywords if appropriate.
|
1042
|
+
Enabled: true
|
1043
|
+
|
1044
|
+
Style/SpaceAfterMethodName:
|
1045
|
+
Description: Do not put a space between a method name and the opening parenthesis
|
1046
|
+
in a method definition.
|
1047
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
1048
|
+
Enabled: true
|
1049
|
+
|
1050
|
+
Style/SpaceAfterNot:
|
1051
|
+
Description: Tracks redundant space after the ! operator.
|
1052
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
|
1053
|
+
Enabled: true
|
1054
|
+
|
1055
|
+
Style/SpaceAfterSemicolon:
|
1056
|
+
Description: Use spaces after semicolons.
|
1057
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
1058
|
+
Enabled: true
|
1059
|
+
|
1060
|
+
Style/SpaceBeforeComma:
|
1061
|
+
Description: No spaces before commas.
|
1062
|
+
Enabled: true
|
1063
|
+
|
1064
|
+
Style/SpaceBeforeComment:
|
1065
|
+
Description: Checks for missing space between code and a comment on the same line.
|
1066
|
+
Enabled: true
|
1067
|
+
|
1068
|
+
Style/SpaceBeforeSemicolon:
|
1069
|
+
Description: No spaces before semicolons.
|
1070
|
+
Enabled: true
|
1071
|
+
|
1072
|
+
Style/SpaceAroundOperators:
|
1073
|
+
Description: Use spaces around operators.
|
1074
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
|
1075
|
+
Enabled: true
|
1076
|
+
|
1077
|
+
Style/SpaceInsideBrackets:
|
1078
|
+
Description: No spaces after [ or before ].
|
1079
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
1080
|
+
Enabled: true
|
1081
|
+
|
1082
|
+
Style/SpaceInsideParens:
|
1083
|
+
Description: No spaces after ( or before ).
|
1084
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
|
1085
|
+
Enabled: true
|
1086
|
+
|
1087
|
+
Style/SpaceInsideRangeLiteral:
|
1088
|
+
Description: No spaces inside range literals.
|
1089
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
|
1090
|
+
Enabled: true
|
1091
|
+
|
1092
|
+
Style/SpecialGlobalVars:
|
1093
|
+
Description: Avoid Perl-style global variables.
|
1094
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
|
1095
|
+
Enabled: true
|
1096
|
+
|
1097
|
+
Style/StructInheritance:
|
1098
|
+
Description: Checks for inheritance from Struct.new.
|
1099
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
|
1100
|
+
Enabled: true
|
1101
|
+
|
1102
|
+
Style/Tab:
|
1103
|
+
Description: No hard tabs.
|
1104
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
|
1105
|
+
Enabled: true
|
1106
|
+
|
1107
|
+
Style/TrailingWhitespace:
|
1108
|
+
Description: Avoid trailing whitespace.
|
1109
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
|
1110
|
+
Enabled: true
|
1111
|
+
|
1112
|
+
Style/UnlessElse:
|
1113
|
+
Description: Do not use unless with else. Rewrite these with the positive case first.
|
1114
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
|
1115
|
+
Enabled: true
|
1116
|
+
|
1117
|
+
Style/UnneededCapitalW:
|
1118
|
+
Description: Checks for %W when interpolation is not needed.
|
1119
|
+
Enabled: true
|
1120
|
+
|
1121
|
+
Style/UnneededPercentQ:
|
1122
|
+
Description: Checks for %q/%Q when single quotes or double quotes would do.
|
1123
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
|
1124
|
+
Enabled: true
|
1125
|
+
|
1126
|
+
# Use ` or %x around command literals.
|
1127
|
+
Style/CommandLiteral:
|
1128
|
+
EnforcedStyle: mixed
|
1129
|
+
# backticks: Always use backticks.
|
1130
|
+
# percent_x: Always use %x.
|
1131
|
+
# mixed: Use backticks on single-line commands, and %x on multi-line commands.
|
1132
|
+
SupportedStyles:
|
1133
|
+
- backticks
|
1134
|
+
- percent_x
|
1135
|
+
- mixed
|
1136
|
+
# If false, the cop will always recommend using %x if one or more backticks
|
1137
|
+
# are found in the command string.
|
1138
|
+
AllowInnerBackticks: false
|
1139
|
+
|
1140
|
+
Style/VariableInterpolation:
|
1141
|
+
Description: Don't interpolate global, instance and class variables directly in
|
1142
|
+
strings.
|
1143
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
|
1144
|
+
Enabled: true
|
1145
|
+
|
1146
|
+
Style/WhenThen:
|
1147
|
+
Description: Use when x then ... for one-line cases.
|
1148
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
|
1149
|
+
Enabled: false
|
1150
|
+
|
1151
|
+
Style/WhileUntilDo:
|
1152
|
+
Description: Checks for redundant do after while or until.
|
1153
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
|
1154
|
+
Enabled: true
|
1155
|
+
|
1156
|
+
Lint/AmbiguousOperator:
|
1157
|
+
Description: Checks for ambiguous operators in the first argument of a method invocation
|
1158
|
+
without parentheses.
|
1159
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
|
1160
|
+
Enabled: true
|
1161
|
+
|
1162
|
+
Lint/AmbiguousRegexpLiteral:
|
1163
|
+
Description: Checks for ambiguous regexp literals in the first argument of a method
|
1164
|
+
invocation without parenthesis.
|
1165
|
+
Enabled: true
|
1166
|
+
|
1167
|
+
Lint/BlockAlignment:
|
1168
|
+
Description: Align block ends correctly.
|
1169
|
+
Enabled: true
|
1170
|
+
|
1171
|
+
Lint/ConditionPosition:
|
1172
|
+
Description: Checks for condition placed in a confusing position relative to the
|
1173
|
+
keyword.
|
1174
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
|
1175
|
+
Enabled: true
|
1176
|
+
|
1177
|
+
Lint/Debugger:
|
1178
|
+
Description: Check for debugger calls.
|
1179
|
+
Enabled: true
|
1180
|
+
|
1181
|
+
Lint/DeprecatedClassMethods:
|
1182
|
+
Description: Check for deprecated class method calls.
|
1183
|
+
Enabled: true
|
1184
|
+
|
1185
|
+
Lint/DuplicateMethods:
|
1186
|
+
Description: Check for duplicate methods calls.
|
1187
|
+
Enabled: true
|
1188
|
+
|
1189
|
+
Lint/ElseLayout:
|
1190
|
+
Description: Check for odd code arrangement in an else block.
|
1191
|
+
Enabled: true
|
1192
|
+
|
1193
|
+
Lint/EmptyEnsure:
|
1194
|
+
Description: Checks for empty ensure block.
|
1195
|
+
Enabled: true
|
1196
|
+
|
1197
|
+
Lint/EmptyInterpolation:
|
1198
|
+
Description: Checks for empty string interpolation.
|
1199
|
+
Enabled: true
|
1200
|
+
|
1201
|
+
Lint/EndInMethod:
|
1202
|
+
Description: END blocks should not be placed inside method definitions.
|
1203
|
+
Enabled: true
|
1204
|
+
|
1205
|
+
Lint/EnsureReturn:
|
1206
|
+
Description: Do not use return in an ensure block.
|
1207
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
|
1208
|
+
Enabled: true
|
1209
|
+
|
1210
|
+
Lint/Eval:
|
1211
|
+
Description: The use of eval represents a serious security risk.
|
1212
|
+
Enabled: true
|
1213
|
+
|
1214
|
+
Lint/HandleExceptions:
|
1215
|
+
Description: Don't suppress exception.
|
1216
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
|
1217
|
+
Enabled: true
|
1218
|
+
|
1219
|
+
Lint/InvalidCharacterLiteral:
|
1220
|
+
Description: Checks for invalid character literals with a non-escaped whitespace
|
1221
|
+
character.
|
1222
|
+
Enabled: true
|
1223
|
+
|
1224
|
+
Lint/LiteralInCondition:
|
1225
|
+
Description: Checks of literals used in conditions.
|
1226
|
+
Enabled: true
|
1227
|
+
|
1228
|
+
Lint/LiteralInInterpolation:
|
1229
|
+
Description: Checks for literals used in interpolation.
|
1230
|
+
Enabled: true
|
1231
|
+
|
1232
|
+
Lint/Loop:
|
1233
|
+
Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
|
1234
|
+
for post-loop tests.
|
1235
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
|
1236
|
+
Enabled: false
|
1237
|
+
|
1238
|
+
Lint/ParenthesesAsGroupedExpression:
|
1239
|
+
Description: Checks for method calls with a space before the opening parenthesis.
|
1240
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
|
1241
|
+
Enabled: true
|
1242
|
+
|
1243
|
+
Lint/RequireParentheses:
|
1244
|
+
Description: Use parentheses in the method call to avoid confusion about precedence.
|
1245
|
+
Enabled: false
|
1246
|
+
|
1247
|
+
Lint/RescueException:
|
1248
|
+
Description: Avoid rescuing the Exception class.
|
1249
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
|
1250
|
+
Enabled: true
|
1251
|
+
|
1252
|
+
Lint/ShadowingOuterLocalVariable:
|
1253
|
+
Description: Do not use the same name as outer local variable for block arguments
|
1254
|
+
or block local variables.
|
1255
|
+
Enabled: true
|
1256
|
+
|
1257
|
+
Lint/StringConversionInInterpolation:
|
1258
|
+
Description: Checks for Object#to_s usage in string interpolation.
|
1259
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
|
1260
|
+
Enabled: true
|
1261
|
+
|
1262
|
+
Lint/UnderscorePrefixedVariableName:
|
1263
|
+
Description: Do not use prefix `_` for a variable that is used.
|
1264
|
+
Enabled: true
|
1265
|
+
|
1266
|
+
Lint/UnusedBlockArgument:
|
1267
|
+
Description: Checks for unused block arguments.
|
1268
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1269
|
+
Enabled: true
|
1270
|
+
|
1271
|
+
Lint/UnusedMethodArgument:
|
1272
|
+
Description: Checks for unused method arguments.
|
1273
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1274
|
+
Enabled: true
|
1275
|
+
|
1276
|
+
Lint/UnreachableCode:
|
1277
|
+
Description: Unreachable code.
|
1278
|
+
Enabled: true
|
1279
|
+
|
1280
|
+
Lint/UselessAccessModifier:
|
1281
|
+
Description: Checks for useless access modifiers.
|
1282
|
+
Enabled: true
|
1283
|
+
|
1284
|
+
Lint/UselessAssignment:
|
1285
|
+
Description: Checks for useless assignment to a local variable.
|
1286
|
+
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
|
1287
|
+
Enabled: true
|
1288
|
+
|
1289
|
+
Lint/UselessComparison:
|
1290
|
+
Description: Checks for comparison of something with itself.
|
1291
|
+
Enabled: true
|
1292
|
+
|
1293
|
+
Lint/UselessElseWithoutRescue:
|
1294
|
+
Description: Checks for useless `else` in `begin..end` without `rescue`.
|
1295
|
+
Enabled: true
|
1296
|
+
|
1297
|
+
Lint/UselessSetterCall:
|
1298
|
+
Description: Checks for useless setter call to a local variable.
|
1299
|
+
Enabled: true
|
1300
|
+
|
1301
|
+
Lint/Void:
|
1302
|
+
Description: Possible use of operator/literal/variable in void context.
|
1303
|
+
Enabled: true
|
1304
|
+
|
1305
|
+
Rails/Delegate:
|
1306
|
+
Description: Prefer delegate method for delegations.
|
1307
|
+
Enabled: true
|