-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
1071 lines (1006 loc) · 20.1 KB
/
.rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#
# PackManager Policy: enforce all of these cops...
#
# Notes:
# - cops are ordered alphabetically.
#
#
# Gems should be alphabetically sorted within groups.
#
Bundler/OrderedGems:
Exclude:
- 'Gemfile'
#
# Avoid feature and scenario in specs.
#
Capybara/FeatureMethods:
Exclude:
- 'spec/factories.rb'
#
# Here we check if the parameters on a multi-line method definition are aligned.
#
Layout/AlignArguments:
EnforcedStyle: with_fixed_indentation
#
# Check that the keys, separators, and values of a multi-line hash literal are aligned according
# to configuration. With 'key' everything is left aligned.
#
Layout/AlignHash:
EnforcedHashRocketStyle: key
EnforcedColonStyle: key
EnforcedLastArgumentHashStyle: always_ignore
#
# Here we check if the parameters on a multi-line method call or definition are aligned.
#
Layout/AlignParameters:
EnforcedStyle: with_fixed_indentation
#
# This cop checks how the 'whens' of a case expression are indented in relation to its 'case' or 'end' keyword.
#
Layout/CaseIndentation:
EnforcedStyle: end
#
# This cop checks whether the end keywords are aligned properly.
#
# # good
# variable = if true
# end
#
Layout/EndAlignment:
EnforcedStyleAlignWith: variable
#
# This cop checks for a line break before the first element in a multi-line hash.
#
# # bad
# { a: 1,
# b: 2}
#
# # good
# {
# a: 1,
# b: 2 }
#
Layout/FirstHashElementLineBreak:
Enabled: true
#
# This cop checks for a line break before the first argument in a multi-line method call.
#
# # bad
# method(foo, bar,
# baz)
#
# # good
# method(
# foo, bar,
# baz)
#
# # ignored
# method foo, bar,
# baz
#
Layout/FirstMethodArgumentLineBreak:
Enabled: true
# This cop checks the indentation of the first parameter in a method call. Parameters after the first one are checked by Style/AlignParameters, not by this cop.
#
# # bad
# some_method(
# first_param,
# second_param)
#
# # good
# some_method(
# first_param,
# second_param)
#
Layout/IndentFirstArgument:
EnforcedStyle: consistent
#
# This cop checks the indentation of the first element in an array literal where the opening bracket and the
# first element are on separate lines.
#
# # consistent
# array = [
# :value
# ]
# and_in_a_method_call([
# :no_difference
# ])
#
Layout/IndentFirstArrayElement:
EnforcedStyle: consistent
#
# This cops checks the indentation of the first key in a hash literal where the opening brace and the first key
# are on separate lines.
#
# # consistent
# hash = {
# key: :value
# }
# and_in_a_method_call({
# no: :difference
# })
#
Layout/IndentFirstHashElement:
EnforcedStyle: consistent
#
# This cop checks that the closing brace in an array literal is either on the same line as the last
# array element, or a new line.
#
# # symmetrical: bad
# # new_line: good
# # same_line: bad
# [ :a,
# :b
# ]
#
# # symmetrical: bad
# # new_line: bad
# # same_line: good
# [
# :a,
# :b ]
#
# # symmetrical: good
# # new_line: bad
# # same_line: good
# [ :a,
# :b ]
#
# # symmetrical: good
# # new_line: good
# # same_line: bad
# [
# :a,
# :b
# ]
#
Layout/MultilineArrayBraceLayout:
EnforcedStyle: symmetrical
#
# This cop checks that closing brace of a multi-line method call must be on the line after the last
# argument of the call.
#
# # symmetrical: bad
# # new_line: good
# # same_line: bad
# foo(a,
# b
# )
#
# # symmetrical: bad
# # new_line: bad
# # same_line: good
# foo(
# a,
# b)
#
# # symmetrical: good
# # new_line: bad
# # same_line: good
# foo(a,
# b)
#
# # symmetrical: good
# # new_line: good
# # same_line: bad
# foo(
# a,
# b
# )
#
Layout/MultilineMethodCallBraceLayout:
EnforcedStyle: symmetrical
#
# This cop checks the indentation of the method name part in method calls that span more than one line.
#
# # good
# while a
# .b
# something
# end
#
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
IndentationWidth: 2
#
# This cop checks the indentation of the right hand side operand in binary operations that span more than one line.
#
Layout/MultilineOperationIndentation:
EnforcedStyle: indented
IndentationWidth: 2
#
# This cop checks that braces used for hash literals have or don't have surrounding space.
#
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: space
EnforcedStyleForEmptyBraces: no_space
#
# This cop looks for error classes inheriting from Exception and its standard library subclasses,
# excluding subclasses of StandardError.
#
Lint/InheritException:
EnforcedStyle: runtime_error
#
# This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
#
Metrics/BlockLength:
Exclude:
- db/schema.rb
Max: 25
ExcludedMethods:
- context
- describe
- example
- it
#
# This cop checks the length of lines in the source code.
#
Metrics/LineLength:
Max: 140
#
# This cop checks if the length of a method exceeds some maximum value.
#
Metrics/MethodLength:
Max: 15
#
# This cop checks for long parameter lists in production code.
#
Metrics/ParameterLists:
Max: 5
CountKeywordArgs: false
Exclude:
- '**/*_spec.rb'
#
# Gemfile is an unusual file name.
#
Naming/FileName:
Exclude:
- 'Gemfile'
- '**/Gemfile'
#
# This cop checks method parameter names for how descriptive they are.
#
Naming/UncommunicativeMethodParamName:
MinNameLength: 4
AllowedNames:
- '_'
- 'a'
- 'app'
- 'arg'
- 'arr'
- 'at'
- 'b'
- 'bom'
- 'brk'
- 'cop'
- 'css'
- 'ctx'
- 'csv'
- 'day'
- 'e'
- 'env'
- 'f'
- 'fg'
- 'fmt'
- 'h'
- 'hit'
- 'i'
- 'io'
- 'ist'
- 'id'
- 'ids'
- 'job'
- 'key'
- 'log'
- 'lot'
- 'map'
- 'max'
- 'min'
- 'mod'
- 'msg'
- 'n'
- 'now'
- 'obj'
- 'op'
- 'ost'
- 'pdf'
- 'qty'
- 'row'
- 'run'
- 'sql'
- 'sku'
- 'psv'
- 'src'
- 'str'
- 'tab'
- 'tag'
- 'to'
- 'ttl'
- 'uom'
- 'uri'
- 'url'
- 'x'
- 'xml'
- 'y'
ForbiddenNames:
- 'sub'
#
# This cop makes sure that all numbered variables use snake_case for their numbering.
#
# # bad
# variable1 = 1
#
# # good
# variable_1 = 1
#
Naming/VariableNumber:
EnforcedStyle: snake_case
#
# Don't declare methods that would override FactoryBot/FactoryGirl's
# creation methods.
#
Nucop/ShadowingFactoryBotCreationMethods:
Exclude:
- 'components/mrp/**/*'
- 'components/scheduling/**/*'
- '**/spec/support/**/*'
#
# Don't explicitly reference FactoryGirl constant when using creation methods
#
Nucop/ExplicitFactoryBotUsage:
Exclude:
- 'components/mrp/**/*'
- 'components/scheduling/**/*'
- '**/spec/support/**/*'
#
# Use symbols to represent Release Toggle names
#
Nucop/ReleaseTogglesUseSymbols:
Enabled: true
#
# This cop is used to identify usages of select.first, select.last, find_all.first, and find_all.last and
# change them to use detect instead.
#
# ActiveRecord compatibility: ActiveRecord does not implement a detect method and find has its own meaning.
# Correcting ActiveRecord methods with this cop should be considered unsafe.
#
# # bad
# [].select { |item| true }.first
# [].select { |item| true }.last
# [].find_all { |item| true }.first
# [].find_all { |item| true }.last
#
# # good
# [].detect { |item| true }
# [].reverse.detect { |item| true }
#
Performance/Detect:
AutoCorrect: false
#
# Do not compute the size of statically sized objects.
#
Performance/FixedSize:
Exclude:
- '**/*_spec.rb'
#
# This cops checks for code that can be changed to blank? or present?.
#
# NilOrEmpty: true
# # bad
# foo.nil? || foo.empty?
# foo == nil || foo.empty?
#
# # good
# foo.blank?
#
# NotPresent: true
# # bad
# !foo.present?
#
# # good
# foo.blank?
#
# UnlessPresent: true
# # bad
# something unless foo.present?
# unless foo.present?
# something
# end
#
# # good
# something if foo.blank?
# if foo.blank?
# something
# end
#
Rails/Blank:
Exclude:
- 'lib/reports/framework/report_parameters/filter.rb'
- 'lib/reports/framework/report_parameters/selected_column.rb'
#
# This cop checks dynamic find_by_* methods. Use find_by instead of dynamic method.
# See https://github.com/bbatsov/rails-style-guide#find_by
#
# Note: Do not autocorrect since we have non-dynamic finders that follow the dynamic
# finder naming convention.
#
Rails/DynamicFindBy:
AutoCorrect: false
Whitelist:
- find_by_sql
# This cop is used to identify usages of file path joining process
# to use `Rails.root.join` clause. It is used to add uniformity when
# joining paths.
#
# # bad
# Rails.root.join('app', 'models', 'goober')
# File.join(Rails.root, 'app/models/goober')
# "#{Rails.root}/app/models/goober"
#
# # good
# Rails.root.join('app/models/goober')
#
Rails/FilePath:
Enabled: true
EnforcedStyle: slashes
#
# Do not write to stdout. Use Rails's logger if you want to log.
#
Rails/Output:
Exclude:
- 'app/services/custom_outputs/custom_output_migrator.rb'
- 'lib/memory.rb'
- 'lib/partition.rb'
- 'modules/generic/db_utils/lib/pg_tools.rb'
- 'lib/response_profiler.rb'
- 'lib/scripts/**/*.rb'
- 'lib/tasks/support/translation_package/**/*.rb'
#
# This cop converts usages of try! and try to &.
#
Rails/SafeNavigation:
ConvertTry: true
#
# This cop checks for the use of methods which skip validations which are listed
# in guides.rubyonrails.org/active_record_validations.html#skipping-validations.
#
# Used in specs to create invalid models.
#
Rails/SkipsModelValidations:
Exclude:
- '**/*_spec.rb'
Whitelist:
- touch
#
# This cop checks for the use of old-style attribute validation macros.
#
# # bad
# validates_acceptance_of :foo
# validates_confirmation_of :foo
# validates_exclusion_of :foo
# validates_format_of :foo
# validates_inclusion_of :foo
# validates_length_of :foo
# validates_numericality_of :foo
# validates_presence_of :foo
# validates_size_of :foo
# validates_uniqueness_of :foo
#
# # good
# validates :foo, acceptance: true
# validates :foo, confirmation: true
# validates :foo, exclusion: true
# validates :foo, format: true
# validates :foo, inclusion: true
# validates :foo, length: true
# validates :foo, numericality: true
# validates :foo, presence: true
# validates :foo, size: true
# validates :foo, uniqueness: true
#
Rails/Validation:
Enabled: true
#
# This cop checks that environments called with Rails.env predicates exist.
#
Rails/UnknownEnv:
Environments:
- production
- development
- test
#
# Checks for long examples.
#
RSpec/ExampleLength:
Max: 35
#
# This cop looks for example descriptions that start with "should" which lacks confidence.
# There are many tests that originate from minitest, e.g. it "should_do_something" do...
#
# Note: Do not autocorrect since this cop mistakenly blanks out the description
#
RSpec/ExampleWording:
AutoCorrect: false
#
# This cop checks for RSpec examples declared with `example`
# In particular, the enforced style requires a description
# and prevents single-line expectations
#
# # bad
# example do
# expect(it).to work
# end
#
# it { is_expected.to work }
#
# # good
# example "of it working" do
# expect(it).to work
# end
RSpec/ExampleWithoutDescription:
Enabled: true
EnforcedStyle: disallow
#
# Checks for consistent style of change matcher.
#
RSpec/ExpectChange:
EnforcedStyle: method_call
#
# This cop checks for consistent style when specifying RSpec hooks which run for each example.
#
# # bad
# before(:each) do
# ...
# end
#
# # bad
# before(:example) do
# ...
# end
#
# # good
# before do
# ...
# end
#
RSpec/HookArgument:
EnforcedStyle: implicit
#
# Checks if examples contain too many 'expect' calls.
#
RSpec/MultipleExpectations:
Max: 6
# Checks for nested example groups.
#
# This cop is configurable using the `Max` option
#
RSpec/NestedGroups:
Max: 4
#
# Checks for consistent method usage for negating expectations.
#
RSpec/NotToNot:
EnforcedStyle: to_not
#
# This cop enforces the use of #alias_method
# # good
# alias_method :bar, :foo
#
# # bad
# alias bar foo
#
Style/Alias:
EnforcedStyle: prefer_alias_method
#
# Check for uses of braces or do/end around single line or multi-line blocks
#
Style/BlockDelimiters:
Exclude:
- 'app/serializers/api/xml/**/*_serializer.rb'
- 'modules/**/api/xml/**/*_serializer.rb'
IgnoredMethods:
- 'expect'
- 'let'
- 'let!'
- 'subject'
- 'with_optimistic_lock_error_handling'
#
# This cop checks that the last parameter
# doesn't have braces around it, but requires braces if the
# second to last parameter is also a hash literal.
#
# # good
# foo(one: 1)
#
# # good
# foo(
# { one: 1 },
# { two: 2 }
# )
#
# # bad
# foo({ one: 1 })
#
Style/BracesAroundHashParameters:
EnforcedStyle: context_dependent
#
# This cop enforces the use of consistent method names from the Enumerable module.
#
# Unfortunately we cannot actually know if a method is from Enumerable or not
# (static analysis limitation), so this cop can yield some false positives.
#
Style/CollectionMethods:
Enabled: true
PreferredMethods:
collect: 'map'
collect!: 'map!'
inject: 'reduce'
detect: 'detect'
find_all: 'select'
#
# Checks for empty else-clauses
#
# bad
# if condition
# statement
# else
# end
#
# good
# if condition
# statement
# else
# nil
# end
#
Style/EmptyElse:
EnforcedStyle: empty
#
# This cop checks for the formatting of empty method definitions. By default it enforces empty method definitions
# to go on a single line (compact style).
#
Style/EmptyMethod:
Exclude:
- 'db/migrate/*'
#
# This cop checks hash literal syntax.
#
# good
# {a: 2, b: 1}
# {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol
# {d: 1, 'e' => 2} # technically not forbidden
#
# # bad
# {:a => 2}
# {b: 1, :c => 2}
#
Style/HashSyntax:
EnforcedStyle: ruby19
Exclude:
- '**/*.rake'
#
# This cop checks for uses of the lambda literal syntax.
#
# # literal
# f = ->(x) { x }
# f = ->(x) do
# x
# end
#
Style/Lambda:
EnforcedStyle: literal
#
# This cop checks presence of parentheses in method calls containing parameters.
#
# # bad
# array.delete e
#
# # good
# array.delete(e)
#
# # good if `puts` is listed in IgnoredMethods
# puts 'test'
#
Style/MethodCallWithArgsParentheses:
Enabled: true
Exclude:
- '**/migrate/*'
- 'app/controllers/api/xml/qcloud_controller.rb'
- 'db/schema.rb'
- 'db/schema_next.rb'
IgnoreMacros: true
IgnoredMethods:
- 'abort'
- 'add_column'
- 'add_dependency'
- 'add_development_dependency'
- 'add_index'
- 'add_table'
- 'alias_method'
- 'allow_if'
- 'allow_net_connect!'
- 'and'
- 'assert'
- 'assert_422'
- 'assert_difference'
- 'assert_dom_equal'
- 'assert_empty'
- 'assert_equal'
- 'assert_equal_html_node'
- 'assert_error'
- 'assert_error_line_number'
- 'assert_error_on_page'
- 'assert_errored'
- 'assert_exists_but_is_empty'
- 'assert_float_array_equal'
- 'assert_fragment_match'
- 'assert_has_error'
- 'assert_held'
- 'assert_held_for'
- 'assert_in_delta'
- 'assert_in_epsilon'
- 'assert_includes'
- 'assert_inclusion_of'
- 'assert_links_work'
- 'assert_match'
- 'assert_nil'
- 'assert_no_access_respose'
- 'assert_no_difference'
- 'assert_no_selector'
- 'assert_no_xml_link'
- 'assert_normalized'
- 'assert_not_held'
- 'assert_not_normalized'
- 'assert_not_valid'
- 'assert_not_visible'
- 'assert_nothing_created'
- 'assert_numericality_greater_than_zero'
- 'assert_numericality_of'
- 'assert_position'
- 'assert_presence_of'
- 'assert_quantity'
- 'assert_queued'
- 'assert_raise_message'
- 'assert_raises'
- 'assert_redirected_to'
- 'assert_respond_to'
- 'assert_response'
- 'assert_roles'
- 'assert_row'
- 'assert_saved'
- 'assert_select'
- 'assert_should_be'
- 'assert_should_have_unique_attribute'
- 'assert_should_have_unique_attribute_within_scope'
- 'assert_should_not_be'
- 'assert_should_strip_whitespace'
- 'assert_template'
- 'assert_time_within'
- 'assert_visible'
- 'assert_xml_children_links'
- 'assert_xml_element'
- 'assert_xml_elements'
- 'assert_xml_equal'
- 'assert_xml_link'
- 'assert_xml_links'
- 'attr_accessor'
- 'attr_reader'
- 'attr_writer'
- 'attribute'
- 'be_failed_and'
- 'be_successful_and'
- 'before_action'
- 'belongs_to'
- 'check'
- 'citext'
- 'class_attribute'
- 'class_eval'
- 'click'
- 'click_button'
- 'click_link'
- 'click_on'
- 'computed_field'
- 'content_tag'
- 'context'
- 'datetime'
- 'define'
- 'delegate'
- 'delete'
- 'describe'
- 'diff!'
- 'disable_net_connect!'
- 'embedded_child'
- 'embedded_children'
- 'eval_gemfile'
- 'example'
- 'exist?'
- 'exit'
- 'expect_filter'
- 'extend'
- 'factory'
- 'fcontext'
- 'fdescribe'
- 'field'
- 'fill_in'
- 'fit'
- 'gem'
- 'get'
- 'goto'
- 'h'
- 'has_many'
- 'head'
- 'in?'
- 'include'
- 'init_belongs_to'
- 'instance_eval'
- 'integer'
- 'invoke'
- 'is_a?'
- 'it'
- 'it_behaves_like'
- 'j'
- 'javascript_tag'
- 'link'
- 'load'
- 'load_defaults'
- 'match'
- 'mount'
- 'option'
- 'p'
- 'patch'
- 'post'
- 'protect_from_forgery'
- 'put'
- 'puts'
- 'raise'
- 'redefine_const'
- 'redirect_back'
- 'redirect_to'
- 'references'
- 'remove_column'
- 'remove_index'
- 'render'
- 'require'
- 'require_all'
- 'require_dependency'
- 'require_relative'
- 'rescue_from'
- 'resource'
- 'resources'
- 'respond_to?'
- 'root'
- 'ruby'
- 'run'
- 'scenario'
- 'science'
- 'select'
- 'select'
- 'send_data'
- 'set'
- 'set_belongs_to'
- 'set_field'
- 'set_quantity'
- 'set_value'
- 'sign_in_as'
- 'sign_out'
- 'sleep'
- 'source'
- 'submit_tag'
- 'super'
- 'task'
- 'text'
- 'to'
- 'to_not'
- 'validate'
- 'validates'
- 'validates_presence_of'
- 'verify'
- 'visit'
- 'wait_for'
- 'warn'
- 'within'
- 'xcontext'
- 'xdescribe'
- 'xhr'
- 'xit'
- 'yield'
#
# This cop checks for big numeric literals without _ between groups of digits in them.
#
# # bad
# 1000000
# 1_00_000
# 1_0000
#
# # good
# 1_000_000
# 1000
#
# # good unless Strict is set
# 10_000_00
#
Style/NumericLiterals:
Exclude:
- 'db/schema.rb'
Strict: true
#
# This cop enforces using // or %r around regular expressions.
#
Style/RegexpLiteral:
EnforcedStyle: slashes
AllowInnerSlashes: true
#
# Enforce using `rescue` instead of `rescue StandardError`.
#
# # bad
# begin
# foo
# rescue StandardError
# bar