kt-paperclip 7.0.1 → 7.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.rubocop.yml CHANGED
@@ -1,3 +1,1061 @@
1
1
  require:
2
2
  - rubocop-rails
3
- inherit_from: .hound.yml
3
+
4
+ AllCops:
5
+ Include:
6
+ - "**/*.gemspec"
7
+ - "**/*.podspec"
8
+ - "**/*.jbuilder"
9
+ - "**/*.rake"
10
+ - "**/*.opal"
11
+ - "**/Gemfile"
12
+ - "**/Rakefile"
13
+ - "**/Capfile"
14
+ - "**/Guardfile"
15
+ - "**/Podfile"
16
+ - "**/Thorfile"
17
+ - "**/Vagrantfile"
18
+ - "**/Berksfile"
19
+ - "**/Cheffile"
20
+ - "**/Vagabondfile"
21
+ Exclude:
22
+ - "vendor/**/*"
23
+ - "db/schema.rb"
24
+ - 'vendor/**/*'
25
+ - 'gemfiles/vendor/**/*'
26
+ DisplayCopNames: false
27
+ StyleGuideCopsOnly: false
28
+ Naming/AccessorMethodName:
29
+ Description: Check the naming of accessor methods for get_/set_.
30
+ Enabled: false
31
+ Naming/AsciiIdentifiers:
32
+ Description: Use only ascii symbols in identifiers.
33
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-identifiers
34
+ Enabled: false
35
+ Naming/BinaryOperatorParameterName:
36
+ Description: When defining binary operators, name the argument other.
37
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#other-arg
38
+ Enabled: false
39
+ Naming/ClassAndModuleCamelCase:
40
+ Description: Use CamelCase for classes and modules.
41
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#camelcase-classes
42
+ Enabled: true
43
+ Naming/ConstantName:
44
+ Description: Constants should use SCREAMING_SNAKE_CASE.
45
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#screaming-snake-case
46
+ Enabled: true
47
+ Naming/FileName:
48
+ Description: Use snake_case for source file names.
49
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
50
+ Enabled: false
51
+ Exclude: []
52
+ Naming/MemoizedInstanceVariableName:
53
+ Enabled: false
54
+ Naming/MethodName:
55
+ Description: Use the configured style when naming methods.
56
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
57
+ Enabled: true
58
+ EnforcedStyle: snake_case
59
+ SupportedStyles:
60
+ - snake_case
61
+ - camelCase
62
+ Naming/PredicateName:
63
+ Description: Check the names of predicate methods.
64
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
65
+ Enabled: true
66
+ NamePrefix:
67
+ - is_
68
+ - has_
69
+ - have_
70
+ ForbiddenPrefixes:
71
+ - is_
72
+ Naming/VariableName:
73
+ Description: Use the configured style when naming variables.
74
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars
75
+ Enabled: true
76
+ EnforcedStyle: snake_case
77
+ SupportedStyles:
78
+ - snake_case
79
+ - camelCase
80
+ Rails:
81
+ Enabled: true
82
+ Style/AndOr:
83
+ Description: Use &&/|| instead of and/or.
84
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-and-or-or
85
+ Enabled: true
86
+ EnforcedStyle: always
87
+ SupportedStyles:
88
+ - always
89
+ - conditionals
90
+ Style/BarePercentLiterals:
91
+ Description: Checks if usage of %() or %Q() matches configuration.
92
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand
93
+ Enabled: true
94
+ EnforcedStyle: bare_percent
95
+ SupportedStyles:
96
+ - percent_q
97
+ - bare_percent
98
+ Style/ClassAndModuleChildren:
99
+ Description: Checks style of children classes and modules.
100
+ Enabled: false
101
+ EnforcedStyle: nested
102
+ SupportedStyles:
103
+ - nested
104
+ - compact
105
+ Style/ClassCheck:
106
+ Description: Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.
107
+ Enabled: true
108
+ EnforcedStyle: is_a?
109
+ SupportedStyles:
110
+ - is_a?
111
+ - kind_of?
112
+ Style/CollectionMethods:
113
+ Description: Preferred collection methods.
114
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
115
+ Enabled: true
116
+ PreferredMethods:
117
+ collect: map
118
+ collect!: map!
119
+ inject: reduce
120
+ detect: find
121
+ find_all: select
122
+ find: detect
123
+ Style/CommentAnnotation:
124
+ Description: Checks formatting of special comments (TODO, FIXME, OPTIMIZE, HACK,
125
+ REVIEW).
126
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#annotate-keywords
127
+ Enabled: false
128
+ Keywords:
129
+ - TODO
130
+ - FIXME
131
+ - OPTIMIZE
132
+ - HACK
133
+ - REVIEW
134
+ Style/Encoding:
135
+ Description: Use UTF-8 as the source file encoding.
136
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#utf-8
137
+ Enabled: false
138
+ Style/FrozenStringLiteralComment:
139
+ Description: >-
140
+ Add the frozen_string_literal comment to the top of files
141
+ to help transition from Ruby 2.3.0 to Ruby 3.0.
142
+ Enabled: false
143
+ Style/For:
144
+ Description: Checks use of for or each in multiline loops.
145
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-for-loops
146
+ Enabled: true
147
+ EnforcedStyle: each
148
+ SupportedStyles:
149
+ - for
150
+ - each
151
+ Style/FormatString:
152
+ Description: Enforce the use of Kernel#sprintf, Kernel#format or String#%.
153
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#sprintf
154
+ Enabled: false
155
+ EnforcedStyle: format
156
+ SupportedStyles:
157
+ - format
158
+ - sprintf
159
+ - percent
160
+ Style/GlobalVars:
161
+ Description: Do not introduce global variables.
162
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#instance-vars
163
+ Enabled: false
164
+ AllowedVariables: []
165
+ Style/GuardClause:
166
+ Description: Check for conditionals that can be replaced with guard clauses
167
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
168
+ Enabled: false
169
+ MinBodyLength: 1
170
+ Style/HashSyntax:
171
+ Description: 'Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a =>
172
+ 1, :b => 2 }.'
173
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-literals
174
+ Enabled: true
175
+ EnforcedStyle: ruby19
176
+ SupportedStyles:
177
+ - ruby19
178
+ - hash_rockets
179
+ Style/LambdaCall:
180
+ Description: Use lambda.call(...) instead of lambda.(...).
181
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc-call
182
+ Enabled: false
183
+ EnforcedStyle: call
184
+ SupportedStyles:
185
+ - call
186
+ - braces
187
+ Style/Next:
188
+ Description: Use `next` to skip iteration instead of a condition at the end.
189
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals
190
+ Enabled: false
191
+ EnforcedStyle: skip_modifier_ifs
192
+ MinBodyLength: 3
193
+ SupportedStyles:
194
+ - skip_modifier_ifs
195
+ - always
196
+ Style/NonNilCheck:
197
+ Description: Checks for redundant nil checks.
198
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks
199
+ Enabled: true
200
+ IncludeSemanticChanges: false
201
+ Style/MethodDefParentheses:
202
+ Description: Checks if the method definitions have or don't have parentheses.
203
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
204
+ Enabled: true
205
+ EnforcedStyle: require_parentheses
206
+ SupportedStyles:
207
+ - require_parentheses
208
+ - require_no_parentheses
209
+ Style/NumericLiterals:
210
+ Description: Add underscores to large numeric literals to improve their readability.
211
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
212
+ Enabled: false
213
+ MinDigits: 5
214
+ Style/NumericPredicate:
215
+ Enabled: false
216
+ Style/ParenthesesAroundCondition:
217
+ Description: Don't use parentheses around the condition of an if/unless/while.
218
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-parens-if
219
+ Enabled: true
220
+ AllowSafeAssignment: true
221
+ Style/PercentLiteralDelimiters:
222
+ Description: Use `%`-literal delimiters consistently
223
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-literal-braces
224
+ Enabled: false
225
+ PreferredDelimiters:
226
+ "%": "()"
227
+ "%i": "()"
228
+ "%q": "()"
229
+ "%Q": "()"
230
+ "%r": "{}"
231
+ "%s": "()"
232
+ "%w": "()"
233
+ "%W": "()"
234
+ "%x": "()"
235
+ Style/PercentQLiterals:
236
+ Description: Checks if uses of %Q/%q match the configured preference.
237
+ Enabled: true
238
+ EnforcedStyle: lower_case_q
239
+ SupportedStyles:
240
+ - lower_case_q
241
+ - upper_case_q
242
+ Style/RaiseArgs:
243
+ Description: Checks the arguments passed to raise/fail.
244
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#exception-class-messages
245
+ Enabled: false
246
+ EnforcedStyle: exploded
247
+ SupportedStyles:
248
+ - compact
249
+ - exploded
250
+ Style/RedundantReturn:
251
+ Description: Don't use return where it's not required.
252
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-return
253
+ Enabled: true
254
+ AllowMultipleReturnValues: false
255
+ Style/RegexpLiteral:
256
+ Description: Use %r for regular expressions matching more than `MaxSlashes` '/'
257
+ characters. Use %r only for regular expressions matching more than `MaxSlashes`
258
+ '/' character.
259
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-r
260
+ Enabled: false
261
+ Style/Semicolon:
262
+ Description: Don't use semicolons to terminate expressions.
263
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon
264
+ Enabled: true
265
+ AllowAsExpressionSeparator: false
266
+ Style/SignalException:
267
+ Description: Checks for proper usage of fail and raise.
268
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#fail-method
269
+ Enabled: false
270
+ EnforcedStyle: semantic
271
+ SupportedStyles:
272
+ - only_raise
273
+ - only_fail
274
+ - semantic
275
+ Style/SingleLineBlockParams:
276
+ Description: Enforces the names of some block params.
277
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#reduce-blocks
278
+ Enabled: false
279
+ Methods:
280
+ - reduce:
281
+ - a
282
+ - e
283
+ - inject:
284
+ - a
285
+ - e
286
+ Style/SingleLineMethods:
287
+ Description: Avoid single-line methods.
288
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-single-line-methods
289
+ Enabled: false
290
+ AllowIfMethodIsEmpty: true
291
+ Style/StringLiterals:
292
+ Description: Checks if uses of quotes match the configured preference.
293
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
294
+ Enabled: true
295
+ EnforcedStyle: double_quotes
296
+ SupportedStyles:
297
+ - single_quotes
298
+ - double_quotes
299
+ Style/StringLiteralsInInterpolation:
300
+ Description: Checks if uses of quotes inside expressions in interpolated strings
301
+ match the configured preference.
302
+ Enabled: true
303
+ EnforcedStyle: single_quotes
304
+ SupportedStyles:
305
+ - single_quotes
306
+ - double_quotes
307
+ Style/SymbolProc:
308
+ Description: Use symbols as procs instead of blocks when possible.
309
+ Enabled: true
310
+ IgnoredMethods:
311
+ - respond_to
312
+ Style/TrailingCommaInArrayLiteral:
313
+ EnforcedStyleForMultiline: comma
314
+ Enabled: true
315
+ Style/TrailingCommaInHashLiteral:
316
+ EnforcedStyleForMultiline: comma
317
+ Enabled: true
318
+ Style/TrailingCommaInArguments:
319
+ Description: Checks for trailing comma in parameter lists and literals.
320
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas
321
+ Enabled: true
322
+ EnforcedStyleForMultiline: comma
323
+ SupportedStylesForMultiline:
324
+ - comma
325
+ - no_comma
326
+ Style/TrivialAccessors:
327
+ Description: Prefer attr_* methods to trivial readers/writers.
328
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr_family
329
+ Enabled: false
330
+ ExactNameMatch: false
331
+ AllowPredicates: false
332
+ AllowDSLWriters: false
333
+ AllowedMethods:
334
+ - to_ary
335
+ - to_a
336
+ - to_c
337
+ - to_enum
338
+ - to_h
339
+ - to_hash
340
+ - to_i
341
+ - to_int
342
+ - to_io
343
+ - to_open
344
+ - to_path
345
+ - to_proc
346
+ - to_r
347
+ - to_regexp
348
+ - to_str
349
+ - to_s
350
+ - to_sym
351
+ Style/WordArray:
352
+ Description: Use %w or %W for arrays of words.
353
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-w
354
+ Enabled: false
355
+ MinSize: 0
356
+ WordRegex: !ruby/regexp /\A[\p{Word}]+\z/
357
+ Metrics/AbcSize:
358
+ Description: A calculated magnitude based on number of assignments, branches, and
359
+ conditions.
360
+ Enabled: true
361
+ Max: 15
362
+ Metrics/BlockLength:
363
+ Exclude:
364
+ - "spec/**/*"
365
+ Metrics/BlockNesting:
366
+ Description: Avoid excessive block nesting
367
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count
368
+ Enabled: true
369
+ Max: 3
370
+ Metrics/ClassLength:
371
+ Description: Avoid classes longer than 100 lines of code.
372
+ Enabled: false
373
+ CountComments: false
374
+ Max: 100
375
+ Metrics/CyclomaticComplexity:
376
+ Description: A complexity metric that is strongly correlated to the number of test
377
+ cases needed to validate a method.
378
+ Enabled: true
379
+ Max: 6
380
+ Layout/LineLength:
381
+ Description: Limit lines to 120 characters.
382
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#120-character-limits
383
+ Enabled: true
384
+ Max: 120
385
+ AllowURI: true
386
+ URISchemes:
387
+ - http
388
+ - https
389
+ Exclude:
390
+ - config/initializers/new_framework_defaults_6_0.rb
391
+ Metrics/MethodLength:
392
+ Description: Avoid methods longer than 15 lines of code.
393
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
394
+ Enabled: true
395
+ CountComments: true
396
+ Max: 15
397
+ Exclude:
398
+ - "spec/**/*"
399
+ Metrics/ParameterLists:
400
+ Description: Avoid long parameter lists.
401
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#too-many-params
402
+ Enabled: true
403
+ Max: 5
404
+ CountKeywordArgs: true
405
+ Metrics/PerceivedComplexity:
406
+ Description: A complexity metric geared towards measuring complexity for a human
407
+ reader.
408
+ Enabled: true
409
+ Max: 7
410
+ Lint/AssignmentInCondition:
411
+ Description: Don't use assignment in conditions.
412
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition
413
+ Enabled: false
414
+ AllowSafeAssignment: true
415
+ Layout/EndAlignment:
416
+ Description: Align ends correctly.
417
+ Enabled: true
418
+ EnforcedStyleAlignWith: keyword
419
+ SupportedStylesAlignWith:
420
+ - keyword
421
+ - variable
422
+ Layout/DefEndAlignment:
423
+ Description: Align ends corresponding to defs correctly.
424
+ Enabled: true
425
+ EnforcedStyleAlignWith: start_of_line
426
+ SupportedStylesAlignWith:
427
+ - start_of_line
428
+ - def
429
+ Rails/ActionFilter:
430
+ Description: Enforces consistent use of action filter methods.
431
+ Enabled: true
432
+ EnforcedStyle: action
433
+ SupportedStyles:
434
+ - action
435
+ - filter
436
+ Include:
437
+ - app/controllers/**/*.rb
438
+ Rails/HasAndBelongsToMany:
439
+ Description: Prefer has_many :through to has_and_belongs_to_many.
440
+ Enabled: true
441
+ Include:
442
+ - app/models/**/*.rb
443
+ Rails/HttpPositionalArguments:
444
+ Enabled: false
445
+ Rails/Output:
446
+ Description: Checks for calls to puts, print, etc.
447
+ Enabled: true
448
+ Include:
449
+ - app/**/*.rb
450
+ - config/**/*.rb
451
+ - db/**/*.rb
452
+ - lib/**/*.rb
453
+ Rails/ReadWriteAttribute:
454
+ Description: Checks for read_attribute(:attr) and write_attribute(:attr, val).
455
+ Enabled: true
456
+ Include:
457
+ - app/models/**/*.rb
458
+ Rails/ScopeArgs:
459
+ Description: Checks the arguments of ActiveRecord scopes.
460
+ Enabled: true
461
+ Include:
462
+ - app/models/**/*.rb
463
+ Rails/Validation:
464
+ Description: Use validates :attribute, hash of validations.
465
+ Enabled: true
466
+ Include:
467
+ - app/models/**/*.rb
468
+ Style/InlineComment:
469
+ Description: Avoid inline comments.
470
+ Enabled: false
471
+ Style/MethodCalledOnDoEndBlock:
472
+ Description: Avoid chaining a method call on a do...end block.
473
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
474
+ Enabled: false
475
+ Style/SymbolArray:
476
+ Description: Use %i or %I for arrays of symbols.
477
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-i
478
+ Enabled: false
479
+ Style/Alias:
480
+ Description: Use alias_method instead of alias.
481
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#alias-method
482
+ Enabled: false
483
+ Style/ArrayJoin:
484
+ Description: Use Array#join instead of Array#*.
485
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#array-join
486
+ Enabled: false
487
+ Style/AsciiComments:
488
+ Description: Use only ascii symbols in comments.
489
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#english-comments
490
+ Enabled: false
491
+ Style/Attr:
492
+ Description: Checks for uses of Module#attr.
493
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#attr
494
+ Enabled: false
495
+ Style/BeginBlock:
496
+ Description: Avoid the use of BEGIN blocks.
497
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks
498
+ Enabled: true
499
+ Style/BlockComments:
500
+ Description: Do not use block comments.
501
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-block-comments
502
+ Enabled: true
503
+ Style/BlockDelimiters:
504
+ Description: Avoid using {...} for multi-line blocks (multiline chaining is always
505
+ ugly). Prefer {...} over do...end for single-line blocks.
506
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#single-line-blocks
507
+ Enabled: true
508
+ Style/CaseEquality:
509
+ Description: Avoid explicit use of the case equality operator(===).
510
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-case-equality
511
+ Enabled: false
512
+ Style/CharacterLiteral:
513
+ Description: Checks for uses of character literals.
514
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-character-literals
515
+ Enabled: false
516
+ Style/ClassMethods:
517
+ Description: Use self when defining module/class methods.
518
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#def-self-singletons
519
+ Enabled: true
520
+ Style/ClassVars:
521
+ Description: Avoid the use of class variables.
522
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-class-vars
523
+ Enabled: false
524
+ Style/ColonMethodCall:
525
+ Description: 'Do not use :: for method call.'
526
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#double-colons
527
+ Enabled: false
528
+ Style/DefWithParentheses:
529
+ Description: Use def with parentheses when there are arguments.
530
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#method-parens
531
+ Enabled: true
532
+ Style/Documentation:
533
+ Description: Document classes and non-namespace modules.
534
+ Enabled: false
535
+ Style/DoubleNegation:
536
+ Description: Checks for uses of double negation (!!).
537
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-bang-bang
538
+ Enabled: false
539
+ Style/EachWithObject:
540
+ Description: Prefer `each_with_object` over `inject` or `reduce`.
541
+ Enabled: false
542
+ Style/EmptyElse:
543
+ Description: Avoid empty else-clauses.
544
+ Enabled: true
545
+ Style/EmptyLiteral:
546
+ Description: Prefer literals to Array.new/Hash.new/String.new.
547
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#literal-array-hash
548
+ Enabled: false
549
+ Style/EndBlock:
550
+ Description: Avoid the use of END blocks.
551
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-END-blocks
552
+ Enabled: true
553
+ Style/EvenOdd:
554
+ Description: Favor the use of Fixnum#even? && Fixnum#odd?
555
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
556
+ Enabled: false
557
+ Style/IfWithSemicolon:
558
+ Description: Do not use if x; .... Use the ternary operator instead.
559
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs
560
+ Enabled: false
561
+ Style/IfUnlessModifier:
562
+ Description: Favor modifier if/unless usage when you have a single-line body.
563
+ Enabled: false
564
+ Style/InfiniteLoop:
565
+ Description: Use Kernel#loop for infinite loops.
566
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#infinite-loop
567
+ Enabled: true
568
+ Style/Lambda:
569
+ Description: Use the new lambda literal syntax for single-line blocks.
570
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#lambda-multi-line
571
+ Enabled: false
572
+ Style/LineEndConcatenation:
573
+ Description: Use \ instead of + or << to concatenate two string literals at line
574
+ end.
575
+ Enabled: false
576
+ Style/MethodCallWithoutArgsParentheses:
577
+ Description: Do not use parentheses for method calls with no arguments.
578
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-args-no-parens
579
+ Enabled: true
580
+ Style/ModuleFunction:
581
+ Description: Checks for usage of `extend self` in modules.
582
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#module-function
583
+ Enabled: false
584
+ Style/MultilineIfThen:
585
+ Description: Do not use then for multi-line if/unless.
586
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-then
587
+ Enabled: true
588
+ Style/MultilineTernaryOperator:
589
+ Description: 'Avoid multi-line ?: (the ternary operator); use if/unless instead.'
590
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary
591
+ Enabled: true
592
+ Style/NegatedIf:
593
+ Description: Favor unless over if for negative conditions (or control flow or).
594
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#unless-for-negatives
595
+ Enabled: false
596
+ Style/NegatedWhile:
597
+ Description: Favor until over while for negative conditions.
598
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#until-for-negatives
599
+ Enabled: false
600
+ Style/NestedTernaryOperator:
601
+ Description: Use one expression per branch in a ternary operator.
602
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-nested-ternary
603
+ Enabled: true
604
+ Style/NilComparison:
605
+ Description: Prefer x.nil? to x == nil.
606
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#predicate-methods
607
+ Enabled: false
608
+ Style/Not:
609
+ Description: Use ! instead of not.
610
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#bang-not-not
611
+ Enabled: false
612
+ Style/OneLineConditional:
613
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
614
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#ternary-operator
615
+ Enabled: false
616
+ Style/PerlBackrefs:
617
+ Description: Avoid Perl-style regex back references.
618
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers
619
+ Enabled: false
620
+ Style/PreferredHashMethods:
621
+ Description: Checks for use of deprecated Hash methods.
622
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-key
623
+ Enabled: false
624
+ Style/Proc:
625
+ Description: Use proc instead of Proc.new.
626
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#proc
627
+ Enabled: false
628
+ Style/RedundantBegin:
629
+ Description: Don't use begin blocks when they are not needed.
630
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#begin-implicit
631
+ Enabled: true
632
+ Style/RedundantException:
633
+ Description: Checks for an obsolete RuntimeException argument in raise/fail.
634
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror
635
+ Enabled: true
636
+ Style/RedundantSelf:
637
+ Description: Don't use self where it's not needed.
638
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
639
+ Enabled: true
640
+ Style/RescueModifier:
641
+ Description: Avoid using rescue in its modifier form.
642
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers
643
+ Enabled: true
644
+ Style/SelfAssignment:
645
+ Description: Checks for places where self-assignment shorthand should have been
646
+ used.
647
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#self-assignment
648
+ Enabled: false
649
+ Style/SpecialGlobalVars:
650
+ Description: Avoid Perl-style global variables.
651
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms
652
+ Enabled: false
653
+ Style/StructInheritance:
654
+ Description: Checks for inheritance from Struct.new.
655
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new
656
+ Enabled: true
657
+ Style/UnlessElse:
658
+ Description: Do not use unless with else. Rewrite these with the positive case first.
659
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-else-with-unless
660
+ Enabled: true
661
+ Style/RedundantCapitalW:
662
+ Description: Checks for %W when interpolation is not needed.
663
+ Enabled: true
664
+ Style/RedundantPercentQ:
665
+ Description: Checks for %q/%Q when single quotes or double quotes would do.
666
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-q
667
+ Enabled: true
668
+ Style/CommandLiteral:
669
+ Description: Checks for %x when `` would do.
670
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#percent-x
671
+ Enabled: true
672
+ Style/VariableInterpolation:
673
+ Description: Don't interpolate global, instance and class variables directly in
674
+ strings.
675
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#curlies-interpolate
676
+ Enabled: false
677
+ Style/WhenThen:
678
+ Description: Use when x then ... for one-line cases.
679
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#one-line-cases
680
+ Enabled: false
681
+ Style/WhileUntilDo:
682
+ Description: Checks for redundant do after while or until.
683
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do
684
+ Enabled: true
685
+ Layout/AccessModifierIndentation:
686
+ Description: Check indentation of private/protected visibility modifiers.
687
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected
688
+ Enabled: true
689
+ EnforcedStyle: indent
690
+ SupportedStyles:
691
+ - outdent
692
+ - indent
693
+ Layout/HashAlignment:
694
+ Description: Align the elements of a hash literal if they span more than one line.
695
+ Enabled: true
696
+ EnforcedHashRocketStyle: key
697
+ EnforcedColonStyle: key
698
+ EnforcedLastArgumentHashStyle: always_inspect
699
+ SupportedLastArgumentHashStyles:
700
+ - always_inspect
701
+ - always_ignore
702
+ - ignore_implicit
703
+ - ignore_explicit
704
+ Layout/ParameterAlignment:
705
+ Description: Align the parameters of a method call if they span more than one line.
706
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-double-indent
707
+ Enabled: true
708
+ EnforcedStyle: with_first_parameter
709
+ SupportedStyles:
710
+ - with_first_parameter
711
+ - with_fixed_indentation
712
+ Layout/CaseIndentation:
713
+ Description: Indentation of when in a case/when/[else/]end.
714
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#indent-when-to-case
715
+ Enabled: true
716
+ EnforcedStyle: case
717
+ SupportedStyles:
718
+ - case
719
+ - end
720
+ IndentOneStep: false
721
+ Layout/CommentIndentation:
722
+ Description: Indentation of comments.
723
+ Enabled: true
724
+ Layout/DotPosition:
725
+ Description: Checks the position of the dot in multi-line method calls.
726
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
727
+ Enabled: true
728
+ EnforcedStyle: trailing
729
+ SupportedStyles:
730
+ - leading
731
+ - trailing
732
+ Layout/EmptyLineBetweenDefs:
733
+ Description: Use empty lines between defs.
734
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods
735
+ Enabled: true
736
+ AllowAdjacentOneLineDefs: false
737
+ Layout/EmptyLinesAroundBlockBody:
738
+ Description: Keeps track of empty lines around block bodies.
739
+ Enabled: true
740
+ EnforcedStyle: no_empty_lines
741
+ SupportedStyles:
742
+ - empty_lines
743
+ - no_empty_lines
744
+ Layout/EmptyLinesAroundClassBody:
745
+ Description: Keeps track of empty lines around class bodies.
746
+ Enabled: true
747
+ EnforcedStyle: no_empty_lines
748
+ SupportedStyles:
749
+ - empty_lines
750
+ - no_empty_lines
751
+ Layout/EmptyLinesAroundModuleBody:
752
+ Description: Keeps track of empty lines around module bodies.
753
+ Enabled: true
754
+ EnforcedStyle: no_empty_lines
755
+ SupportedStyles:
756
+ - empty_lines
757
+ - no_empty_lines
758
+ Layout/FirstArgumentIndentation:
759
+ Description: Checks the indentation of the first parameter in a method call.
760
+ Enabled: true
761
+ EnforcedStyle: special_for_inner_method_call_in_parentheses
762
+ SupportedStyles:
763
+ - consistent
764
+ - special_for_inner_method_call
765
+ - special_for_inner_method_call_in_parentheses
766
+ Layout/IndentationWidth:
767
+ Description: Use 2 spaces for indentation.
768
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
769
+ Enabled: true
770
+ Width: 2
771
+ Layout/FirstHashElementIndentation:
772
+ Description: Checks the indentation of the first key in a hash literal.
773
+ Enabled: true
774
+ EnforcedStyle: special_inside_parentheses
775
+ SupportedStyles:
776
+ - special_inside_parentheses
777
+ - consistent
778
+ Layout/MultilineMethodCallIndentation:
779
+ Description: Checks indentation of method calls with the dot operator
780
+ that span more than one line.
781
+ Enabled: true
782
+ EnforcedStyle: indented
783
+ SupportedStyles:
784
+ - aligned
785
+ - indented
786
+ Layout/MultilineOperationIndentation:
787
+ Description: Checks indentation of binary operations that span more than one line.
788
+ Enabled: true
789
+ EnforcedStyle: indented
790
+ SupportedStyles:
791
+ - aligned
792
+ - indented
793
+ Layout/SpaceAroundBlockParameters:
794
+ Description: Checks the spacing inside and after block parameters pipes.
795
+ Enabled: true
796
+ EnforcedStyleInsidePipes: no_space
797
+ SupportedStylesInsidePipes:
798
+ - space
799
+ - no_space
800
+ Layout/SpaceAroundEqualsInParameterDefault:
801
+ Description: Checks that the equals signs in parameter default assignments have
802
+ or don't have surrounding space depending on configuration.
803
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-around-equals
804
+ Enabled: true
805
+ EnforcedStyle: space
806
+ SupportedStyles:
807
+ - space
808
+ - no_space
809
+ Layout/SpaceBeforeBlockBraces:
810
+ Description: Checks that the left block brace has or doesn't have space before it.
811
+ Enabled: true
812
+ EnforcedStyle: space
813
+ SupportedStyles:
814
+ - space
815
+ - no_space
816
+ Layout/SpaceInsideBlockBraces:
817
+ Description: Checks that block braces have or don't have surrounding space. For
818
+ blocks taking parameters, checks that the left brace has or doesn't have trailing
819
+ space.
820
+ Enabled: true
821
+ EnforcedStyle: space
822
+ SupportedStyles:
823
+ - space
824
+ - no_space
825
+ EnforcedStyleForEmptyBraces: no_space
826
+ SpaceBeforeBlockParameters: true
827
+ Layout/SpaceInsideArrayLiteralBrackets:
828
+ Description: No spaces after [ or before ].
829
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
830
+ Enabled: true
831
+ Layout/SpaceInsideReferenceBrackets:
832
+ Enabled: true
833
+ Layout/SpaceInsideHashLiteralBraces:
834
+ Description: Use spaces inside hash literal braces - or don't.
835
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
836
+ Enabled: true
837
+ EnforcedStyle: space
838
+ EnforcedStyleForEmptyBraces: no_space
839
+ SupportedStyles:
840
+ - space
841
+ - no_space
842
+ Layout/TrailingEmptyLines:
843
+ Description: Checks trailing blank lines and final newline.
844
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#newline-eof
845
+ Enabled: true
846
+ EnforcedStyle: final_newline
847
+ SupportedStyles:
848
+ - final_newline
849
+ - final_blank_line
850
+ Layout/ExtraSpacing:
851
+ Description: Do not use unnecessary spacing.
852
+ Enabled: true
853
+ Layout/ArrayAlignment:
854
+ Description: Align the elements of an array literal if they span more than one line.
855
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays
856
+ Enabled: true
857
+ Layout/BlockEndNewline:
858
+ Description: Put end statement of multiline block on its own line.
859
+ Enabled: true
860
+ Layout/ElseAlignment:
861
+ Description: Align elses and elsifs correctly.
862
+ Enabled: true
863
+ Layout/EmptyLines:
864
+ Description: Don't use several empty lines in a row.
865
+ Enabled: true
866
+ Layout/EmptyLinesAroundAccessModifier:
867
+ Description: Keep blank lines around access modifiers.
868
+ Enabled: true
869
+ Exclude:
870
+ - "spec/factories.rb"
871
+ Layout/EmptyLinesAroundMethodBody:
872
+ Description: Keeps track of empty lines around method bodies.
873
+ Enabled: true
874
+ Layout/EndOfLine:
875
+ Description: Use Unix-style line endings.
876
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#crlf
877
+ Enabled: true
878
+ Layout/IndentationConsistency:
879
+ Description: Keep indentation straight.
880
+ Enabled: true
881
+ Layout/FirstArrayElementIndentation:
882
+ Description: Checks the indentation of the first element in an array literal.
883
+ Enabled: true
884
+ Layout/LeadingCommentSpace:
885
+ Description: Comments should start with a space.
886
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#hash-space
887
+ Enabled: true
888
+ Layout/MultilineBlockLayout:
889
+ Description: Ensures newlines after multiline block do statements.
890
+ Enabled: true
891
+ Layout/SpaceBeforeFirstArg:
892
+ Description: Checks that exactly one space is used between a method name and the
893
+ first argument for method calls without parentheses.
894
+ Enabled: true
895
+ Layout/SpaceAfterColon:
896
+ Description: Use spaces after colons.
897
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
898
+ Enabled: true
899
+ Layout/SpaceAfterComma:
900
+ Description: Use spaces after commas.
901
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
902
+ Enabled: true
903
+ Layout/SpaceAfterMethodName:
904
+ Description: Do not put a space between a method name and the opening parenthesis
905
+ in a method definition.
906
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
907
+ Enabled: true
908
+ Layout/SpaceAfterNot:
909
+ Description: Tracks redundant space after the ! operator.
910
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-bang
911
+ Enabled: true
912
+ Layout/SpaceAfterSemicolon:
913
+ Description: Use spaces after semicolons.
914
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
915
+ Enabled: true
916
+ Layout/SpaceBeforeComma:
917
+ Description: No spaces before commas.
918
+ Enabled: true
919
+ Layout/SpaceBeforeComment:
920
+ Description: Checks for missing space between code and a comment on the same line.
921
+ Enabled: true
922
+ Layout/SpaceBeforeSemicolon:
923
+ Description: No spaces before semicolons.
924
+ Enabled: true
925
+ Layout/SpaceAroundOperators:
926
+ Description: Use spaces around operators.
927
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-operators
928
+ Enabled: true
929
+ Layout/SpaceAroundKeyword:
930
+ Description: Put a space before the modifier keyword.
931
+ Enabled: true
932
+ Layout/SpaceInsideParens:
933
+ Description: No spaces after ( or before ).
934
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-spaces-braces
935
+ Enabled: true
936
+ Layout/SpaceInsideRangeLiteral:
937
+ Description: No spaces inside range literals.
938
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals
939
+ Enabled: true
940
+ Layout/IndentationStyle:
941
+ Description: No hard tabs.
942
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#spaces-indentation
943
+ Enabled: true
944
+ Layout/TrailingWhitespace:
945
+ Description: Avoid trailing whitespace.
946
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace
947
+ Enabled: true
948
+ Lint/AmbiguousOperator:
949
+ Description: Checks for ambiguous operators in the first argument of a method invocation
950
+ without parentheses.
951
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args
952
+ Enabled: false
953
+ Lint/AmbiguousRegexpLiteral:
954
+ Description: Checks for ambiguous regexp literals in the first argument of a method
955
+ invocation without parenthesis.
956
+ Enabled: false
957
+ Layout/BlockAlignment:
958
+ Description: Align block ends correctly.
959
+ Enabled: true
960
+ Layout/ConditionPosition:
961
+ Description: Checks for condition placed in a confusing position relative to the
962
+ keyword.
963
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#same-line-condition
964
+ Enabled: false
965
+ Lint/Debugger:
966
+ Description: Check for debugger calls.
967
+ Enabled: true
968
+ Lint/DeprecatedClassMethods:
969
+ Description: Check for deprecated class method calls.
970
+ Enabled: false
971
+ Lint/DuplicateMethods:
972
+ Description: Check for duplicate methods calls.
973
+ Enabled: true
974
+ Lint/ElseLayout:
975
+ Description: Check for odd code arrangement in an else block.
976
+ Enabled: false
977
+ Lint/EmptyEnsure:
978
+ Description: Checks for empty ensure block.
979
+ Enabled: true
980
+ Lint/EmptyInterpolation:
981
+ Description: Checks for empty string interpolation.
982
+ Enabled: true
983
+ Lint/EnsureReturn:
984
+ Description: Do not use return in an ensure block.
985
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-return-ensure
986
+ Enabled: true
987
+ Lint/FlipFlop:
988
+ Description: Checks for flip flops
989
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-flip-flops
990
+ Enabled: false
991
+ Lint/SuppressedException:
992
+ Description: Don't suppress exception.
993
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
994
+ Enabled: false
995
+ Lint/LiteralAsCondition:
996
+ Description: Checks of literals used in conditions.
997
+ Enabled: false
998
+ Lint/LiteralInInterpolation:
999
+ Description: Checks for literals used in interpolation.
1000
+ Enabled: false
1001
+ Lint/Loop:
1002
+ Description: Use Kernel#loop with break rather than begin/end/until or begin/end/while
1003
+ for post-loop tests.
1004
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#loop-with-break
1005
+ Enabled: false
1006
+ Lint/ParenthesesAsGroupedExpression:
1007
+ Description: Checks for method calls with a space before the opening parenthesis.
1008
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-no-spaces
1009
+ Enabled: false
1010
+ Lint/RequireParentheses:
1011
+ Description: Use parentheses in the method call to avoid confusion about precedence.
1012
+ Enabled: false
1013
+ Lint/RescueException:
1014
+ Description: Avoid rescuing the Exception class.
1015
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-blind-rescues
1016
+ Enabled: true
1017
+ Lint/ShadowingOuterLocalVariable:
1018
+ Description: Do not use the same name as outer local variable for block arguments
1019
+ or block local variables.
1020
+ Enabled: true
1021
+ Lint/RedundantStringCoercion:
1022
+ Description: Checks for Object#to_s usage in string interpolation.
1023
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#no-to-s
1024
+ Enabled: true
1025
+ Lint/UnderscorePrefixedVariableName:
1026
+ Description: Do not use prefix `_` for a variable that is used.
1027
+ Enabled: false
1028
+ Lint/UnusedBlockArgument:
1029
+ Description: Checks for unused block arguments.
1030
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1031
+ Enabled: true
1032
+ Lint/UnusedMethodArgument:
1033
+ Description: Checks for unused method arguments.
1034
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1035
+ Enabled: true
1036
+ Lint/UnreachableCode:
1037
+ Description: Unreachable code.
1038
+ Enabled: true
1039
+ Lint/UselessAccessModifier:
1040
+ Description: Checks for useless access modifiers.
1041
+ Enabled: true
1042
+ Lint/UselessAssignment:
1043
+ Description: Checks for useless assignment to a local variable.
1044
+ StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars
1045
+ Enabled: true
1046
+ Lint/BinaryOperatorWithIdenticalOperands:
1047
+ Description: Checks for comparison of something with itself.
1048
+ Enabled: true
1049
+ Lint/UselessElseWithoutRescue:
1050
+ Description: Checks for useless `else` in `begin..end` without `rescue`.
1051
+ Enabled: true
1052
+ Lint/UselessSetterCall:
1053
+ Description: Checks for useless setter call to a local variable.
1054
+ Enabled: true
1055
+ Lint/Void:
1056
+ Description: Possible use of operator/literal/variable in void context.
1057
+ Enabled: false
1058
+ Rails/Delegate:
1059
+ Description: Prefer delegate method for delegations.
1060
+ Enabled: false
1061
+