rubocop 1.15.0 → 1.18.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/config/default.yml +104 -31
  4. data/lib/rubocop.rb +7 -0
  5. data/lib/rubocop/cli/command/suggest_extensions.rb +3 -3
  6. data/lib/rubocop/config_loader.rb +1 -1
  7. data/lib/rubocop/config_validator.rb +5 -5
  8. data/lib/rubocop/cop/base.rb +2 -2
  9. data/lib/rubocop/cop/bundler/duplicated_gem.rb +1 -1
  10. data/lib/rubocop/cop/bundler/gem_version.rb +38 -4
  11. data/lib/rubocop/cop/corrector.rb +4 -4
  12. data/lib/rubocop/cop/generator.rb +1 -1
  13. data/lib/rubocop/cop/internal_affairs/node_matcher_directive.rb +1 -1
  14. data/lib/rubocop/cop/layout/argument_alignment.rb +4 -3
  15. data/lib/rubocop/cop/layout/array_alignment.rb +2 -2
  16. data/lib/rubocop/cop/layout/block_alignment.rb +1 -1
  17. data/lib/rubocop/cop/layout/case_indentation.rb +57 -9
  18. data/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb +7 -1
  19. data/lib/rubocop/cop/layout/comment_indentation.rb +1 -1
  20. data/lib/rubocop/cop/layout/dot_position.rb +7 -1
  21. data/lib/rubocop/cop/layout/empty_line_after_guard_clause.rb +13 -15
  22. data/lib/rubocop/cop/layout/first_array_element_indentation.rb +2 -2
  23. data/lib/rubocop/cop/layout/first_hash_element_indentation.rb +2 -2
  24. data/lib/rubocop/cop/layout/first_parameter_indentation.rb +1 -1
  25. data/lib/rubocop/cop/layout/hash_alignment.rb +26 -8
  26. data/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +1 -1
  27. data/lib/rubocop/cop/layout/indentation_width.rb +8 -0
  28. data/lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb +122 -0
  29. data/lib/rubocop/cop/layout/multiline_array_brace_layout.rb +6 -6
  30. data/lib/rubocop/cop/layout/multiline_assignment_layout.rb +2 -2
  31. data/lib/rubocop/cop/layout/multiline_hash_brace_layout.rb +6 -6
  32. data/lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb +6 -6
  33. data/lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb +6 -6
  34. data/lib/rubocop/cop/layout/multiline_operation_indentation.rb +3 -3
  35. data/lib/rubocop/cop/layout/parameter_alignment.rb +2 -2
  36. data/lib/rubocop/cop/layout/redundant_line_break.rb +11 -9
  37. data/lib/rubocop/cop/layout/space_around_keyword.rb +28 -0
  38. data/lib/rubocop/cop/layout/space_around_operators.rb +7 -1
  39. data/lib/rubocop/cop/lint/empty_in_pattern.rb +62 -0
  40. data/lib/rubocop/cop/lint/literal_as_condition.rb +13 -1
  41. data/lib/rubocop/cop/lint/missing_cop_enable_directive.rb +32 -17
  42. data/lib/rubocop/cop/lint/nested_percent_literal.rb +1 -1
  43. data/lib/rubocop/cop/lint/percent_string_array.rb +1 -1
  44. data/lib/rubocop/cop/lint/percent_symbol_array.rb +1 -1
  45. data/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb +105 -74
  46. data/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb +5 -0
  47. data/lib/rubocop/cop/lint/symbol_conversion.rb +3 -13
  48. data/lib/rubocop/cop/lint/unused_block_argument.rb +1 -1
  49. data/lib/rubocop/cop/lint/useless_assignment.rb +1 -1
  50. data/lib/rubocop/cop/metrics/utils/code_length_calculator.rb +1 -1
  51. data/lib/rubocop/cop/migration/department_name.rb +3 -1
  52. data/lib/rubocop/cop/mixin/check_line_breakable.rb +10 -1
  53. data/lib/rubocop/cop/mixin/hash_alignment_styles.rb +14 -3
  54. data/lib/rubocop/cop/mixin/string_literals_help.rb +2 -4
  55. data/lib/rubocop/cop/mixin/symbol_help.rb +13 -0
  56. data/lib/rubocop/cop/naming/inclusive_language.rb +249 -0
  57. data/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +2 -2
  58. data/lib/rubocop/cop/style/class_and_module_children.rb +14 -0
  59. data/lib/rubocop/cop/style/hash_each_methods.rb +18 -1
  60. data/lib/rubocop/cop/style/identical_conditional_branches.rb +58 -8
  61. data/lib/rubocop/cop/style/in_pattern_then.rb +56 -0
  62. data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +2 -1
  63. data/lib/rubocop/cop/style/multiline_in_pattern_then.rb +62 -0
  64. data/lib/rubocop/cop/style/multiline_when_then.rb +2 -11
  65. data/lib/rubocop/cop/style/multiple_comparison.rb +1 -1
  66. data/lib/rubocop/cop/style/percent_literal_delimiters.rb +1 -1
  67. data/lib/rubocop/cop/style/quoted_symbols.rb +110 -0
  68. data/lib/rubocop/cop/style/raise_args.rb +2 -0
  69. data/lib/rubocop/cop/style/redundant_regexp_character_class.rb +1 -1
  70. data/lib/rubocop/cop/style/redundant_self.rb +24 -2
  71. data/lib/rubocop/cop/style/regexp_literal.rb +10 -1
  72. data/lib/rubocop/cop/style/special_global_vars.rb +3 -3
  73. data/lib/rubocop/cop/style/string_concatenation.rb +32 -5
  74. data/lib/rubocop/cop/style/string_literals.rb +3 -2
  75. data/lib/rubocop/cop/style/string_literals_in_interpolation.rb +1 -0
  76. data/lib/rubocop/cop/style/swap_values.rb +1 -1
  77. data/lib/rubocop/cop/style/top_level_method_definition.rb +10 -2
  78. data/lib/rubocop/cop/style/unpack_first.rb +1 -1
  79. data/lib/rubocop/cop/style/when_then.rb +6 -2
  80. data/lib/rubocop/cop/variable_force/variable_table.rb +1 -1
  81. data/lib/rubocop/directive_comment.rb +58 -6
  82. data/lib/rubocop/options.rb +4 -4
  83. data/lib/rubocop/rake_task.rb +1 -1
  84. data/lib/rubocop/remote_config.rb +10 -2
  85. data/lib/rubocop/rspec/cop_helper.rb +1 -1
  86. data/lib/rubocop/rspec/expect_offense.rb +1 -1
  87. data/lib/rubocop/version.rb +1 -1
  88. metadata +12 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1009c9da04982d8684219d15bcaaf8a09f5aa3523d8fb668fb47b885281e11ef
4
- data.tar.gz: fac46c18283c960c698d18f5fd6206cef3d309b2d74bc5046c0c6ba30ca60431
3
+ metadata.gz: 885ddbf92c177482e1be63255a018fcda8be3a10e76f30628b2fc1a1e9405188
4
+ data.tar.gz: e67837d33ac5625327dff10d9317c4fd2fb6b9c7b543c73326ab32aea0e6066f
5
5
  SHA512:
6
- metadata.gz: 292b418ad2da13f7357a6b3189128ed35a84fa662506de26d4973797e430751b158e9cb0c7a0753c0cded518ba0299cf5bcf1394abb9793aa728b4dedf36863a
7
- data.tar.gz: cfca1c661ace6abafa34d5506c27ef48afe3ba2abc7187d3fabf41db0abce0c93d59d2f5411671d22fbadea6a09987cda71f2600cc85b5b88b18fca7f526f451
6
+ metadata.gz: 6e72582647c14682bae1d594feb36fa464ced9096e3146e95b6ea534b8483115bf2770a4c727fc3f2d4e3c1ae80f65c41a55b393858ac28cbb962c55fa5717f9
7
+ data.tar.gz: d92789df44f307cb341226be7e397936af7dbfd045fa7aa23f8ba34aeddc846d79439e464e3ce9ac197c3c4220384ebff5ba76982c6871957a1a4bbf44167967
data/README.md CHANGED
@@ -54,7 +54,7 @@ To prevent an unwanted RuboCop update you might want to use a conservative versi
54
54
  in your `Gemfile`:
55
55
 
56
56
  ```rb
57
- gem 'rubocop', '~> 1.15', require: false
57
+ gem 'rubocop', '~> 1.18', require: false
58
58
  ```
59
59
 
60
60
  See [our versioning policy](https://docs.rubocop.org/rubocop/versioning.html) for further details.
data/config/default.yml CHANGED
@@ -270,8 +270,8 @@ Layout/AccessModifierIndentation:
270
270
  SupportedStyles:
271
271
  - outdent
272
272
  - indent
273
- # By default, the indentation width from Layout/IndentationWidth is used
274
- # But it can be overridden by setting this parameter
273
+ # By default the indentation width from `Layout/IndentationWidth` is used,
274
+ # but it can be overridden by setting this parameter.
275
275
  IndentationWidth: ~
276
276
 
277
277
  Layout/ArgumentAlignment:
@@ -299,8 +299,8 @@ Layout/ArgumentAlignment:
299
299
  SupportedStyles:
300
300
  - with_first_argument
301
301
  - with_fixed_indentation
302
- # By default, the indentation width from Layout/IndentationWidth is used
303
- # But it can be overridden by setting this parameter
302
+ # By default the indentation width from `Layout/IndentationWidth` is used,
303
+ # but it can be overridden by setting this parameter.
304
304
  IndentationWidth: ~
305
305
 
306
306
  Layout/ArrayAlignment:
@@ -328,8 +328,8 @@ Layout/ArrayAlignment:
328
328
  SupportedStyles:
329
329
  - with_first_element
330
330
  - with_fixed_indentation
331
- # By default, the indentation width from Layout/IndentationWidth is used
332
- # But it can be overridden by setting this parameter
331
+ # By default the indentation width from `Layout/IndentationWidth` is used,
332
+ # but it can be overridden by setting this parameter.
333
333
  IndentationWidth: ~
334
334
 
335
335
  Layout/AssignmentIndentation:
@@ -339,8 +339,8 @@ Layout/AssignmentIndentation:
339
339
  Enabled: true
340
340
  VersionAdded: '0.49'
341
341
  VersionChanged: '0.77'
342
- # By default, the indentation width from `Layout/IndentationWidth` is used
343
- # But it can be overridden by setting this parameter
342
+ # By default the indentation width from `Layout/IndentationWidth` is used,
343
+ # but it can be overridden by setting this parameter.
344
344
  IndentationWidth: ~
345
345
 
346
346
  Layout/BeginEndAlignment:
@@ -377,18 +377,19 @@ Layout/BlockEndNewline:
377
377
  VersionAdded: '0.49'
378
378
 
379
379
  Layout/CaseIndentation:
380
- Description: 'Indentation of when in a case/when/[else/]end.'
380
+ Description: 'Indentation of when in a case/(when|in)/[else/]end.'
381
381
  StyleGuide: '#indent-when-to-case'
382
382
  Enabled: true
383
383
  VersionAdded: '0.49'
384
+ VersionChanged: '1.16'
384
385
  EnforcedStyle: case
385
386
  SupportedStyles:
386
387
  - case
387
388
  - end
388
389
  IndentOneStep: false
389
- # By default, the indentation width from `Layout/IndentationWidth` is used.
390
- # But it can be overridden by setting this parameter.
391
- # This only matters if `IndentOneStep` is `true`
390
+ # By default the indentation width from `Layout/IndentationWidth` is used,
391
+ # but it can be overridden by setting this parameter.
392
+ # This only matters if `IndentOneStep` is `true`.
392
393
  IndentationWidth: ~
393
394
 
394
395
  Layout/ClassStructure:
@@ -665,8 +666,8 @@ Layout/FirstArgumentIndentation:
665
666
  # Same as `special_for_inner_method_call` except that the special rule only
666
667
  # applies if the outer method call encloses its arguments in parentheses.
667
668
  - special_for_inner_method_call_in_parentheses
668
- # By default, the indentation width from `Layout/IndentationWidth` is used
669
- # But it can be overridden by setting this parameter
669
+ # By default the indentation width from `Layout/IndentationWidth` is used,
670
+ # but it can be overridden by setting this parameter.
670
671
  IndentationWidth: ~
671
672
 
672
673
  Layout/FirstArrayElementIndentation:
@@ -692,8 +693,8 @@ Layout/FirstArrayElementIndentation:
692
693
  - special_inside_parentheses
693
694
  - consistent
694
695
  - align_brackets
695
- # By default, the indentation width from `Layout/IndentationWidth` is used
696
- # But it can be overridden by setting this parameter
696
+ # By default the indentation width from `Layout/IndentationWidth` is used,
697
+ # but it can be overridden by setting this parameter.
697
698
  IndentationWidth: ~
698
699
 
699
700
  Layout/FirstArrayElementLineBreak:
@@ -724,8 +725,8 @@ Layout/FirstHashElementIndentation:
724
725
  - special_inside_parentheses
725
726
  - consistent
726
727
  - align_braces
727
- # By default, the indentation width from `Layout/IndentationWidth` is used
728
- # But it can be overridden by setting this parameter
728
+ # By default the indentation width from `Layout/IndentationWidth` is used,
729
+ # but it can be overridden by setting this parameter.
729
730
  IndentationWidth: ~
730
731
 
731
732
  Layout/FirstHashElementLineBreak:
@@ -760,8 +761,8 @@ Layout/FirstParameterIndentation:
760
761
  SupportedStyles:
761
762
  - consistent
762
763
  - align_parentheses
763
- # By default, the indentation width from `Layout/IndentationWidth` is used
764
- # But it can be overridden by setting this parameter
764
+ # By default the indentation width from `Layout/IndentationWidth` is used,
765
+ # but it can be overridden by setting this parameter.
765
766
  IndentationWidth: ~
766
767
 
767
768
  Layout/HashAlignment:
@@ -771,7 +772,7 @@ Layout/HashAlignment:
771
772
  Enabled: true
772
773
  AllowMultipleStyles: true
773
774
  VersionAdded: '0.49'
774
- VersionChanged: '0.77'
775
+ VersionChanged: '1.16'
775
776
  # Alignment of entries using hash rocket as separator. Valid values are:
776
777
  #
777
778
  # key - left alignment of keys
@@ -882,8 +883,8 @@ Layout/IndentationStyle:
882
883
  Enabled: true
883
884
  VersionAdded: '0.49'
884
885
  VersionChanged: '0.82'
885
- # By default, the indentation width from Layout/IndentationWidth is used
886
- # But it can be overridden by setting this parameter
886
+ # By default the indentation width from `Layout/IndentationWidth` is used,
887
+ # but it can be overridden by setting this parameter.
887
888
  # It is used during auto-correction to determine how many spaces should
888
889
  # replace each tab.
889
890
  IndentationWidth: ~
@@ -922,6 +923,20 @@ Layout/LeadingEmptyLines:
922
923
  VersionAdded: '0.57'
923
924
  VersionChanged: '0.77'
924
925
 
926
+ Layout/LineEndStringConcatenationIndentation:
927
+ Description: >-
928
+ Checks the indentation of the next line after a line that
929
+ ends with a string literal and a backslash.
930
+ Enabled: pending
931
+ VersionAdded: '1.18'
932
+ EnforcedStyle: aligned
933
+ SupportedStyles:
934
+ - aligned
935
+ - indented
936
+ # By default the indentation width from `Layout/IndentationWidth` is used,
937
+ # but it can be overridden by setting this parameter.
938
+ IndentationWidth: ~
939
+
925
940
  Layout/LineLength:
926
941
  Description: 'Checks that line length does not exceed the configured limit.'
927
942
  StyleGuide: '#max-line-length'
@@ -1052,8 +1067,8 @@ Layout/MultilineMethodCallIndentation:
1052
1067
  - aligned
1053
1068
  - indented
1054
1069
  - indented_relative_to_receiver
1055
- # By default, the indentation width from Layout/IndentationWidth is used
1056
- # But it can be overridden by setting this parameter
1070
+ # By default the indentation width from `Layout/IndentationWidth` is used,
1071
+ # but it can be overridden by setting this parameter.
1057
1072
  IndentationWidth: ~
1058
1073
 
1059
1074
  Layout/MultilineMethodDefinitionBraceLayout:
@@ -1082,8 +1097,8 @@ Layout/MultilineOperationIndentation:
1082
1097
  SupportedStyles:
1083
1098
  - aligned
1084
1099
  - indented
1085
- # By default, the indentation width from `Layout/IndentationWidth` is used
1086
- # But it can be overridden by setting this parameter
1100
+ # By default the indentation width from `Layout/IndentationWidth` is used,
1101
+ # but it can be overridden by setting this parameter.
1087
1102
  IndentationWidth: ~
1088
1103
 
1089
1104
  Layout/ParameterAlignment:
@@ -1111,8 +1126,8 @@ Layout/ParameterAlignment:
1111
1126
  SupportedStyles:
1112
1127
  - with_first_parameter
1113
1128
  - with_fixed_indentation
1114
- # By default, the indentation width from Layout/IndentationWidth is used
1115
- # But it can be overridden by setting this parameter
1129
+ # By default the indentation width from `Layout/IndentationWidth` is used,
1130
+ # but it can be overridden by setting this parameter.
1116
1131
  IndentationWidth: ~
1117
1132
 
1118
1133
  Layout/RedundantLineBreak:
@@ -1645,6 +1660,12 @@ Lint/EmptyFile:
1645
1660
  AllowComments: true
1646
1661
  VersionAdded: '0.90'
1647
1662
 
1663
+ Lint/EmptyInPattern:
1664
+ Description: 'Checks for the presence of `in` pattern branches without a body.'
1665
+ Enabled: pending
1666
+ AllowComments: true
1667
+ VersionAdded: '1.16'
1668
+
1648
1669
  Lint/EmptyInterpolation:
1649
1670
  Description: 'Checks for empty string interpolation.'
1650
1671
  Enabled: true
@@ -2092,6 +2113,7 @@ Lint/SymbolConversion:
2092
2113
  Description: 'Checks for unnecessary symbol conversions.'
2093
2114
  Enabled: pending
2094
2115
  VersionAdded: '1.9'
2116
+ VersionChanged: '1.16'
2095
2117
  EnforcedStyle: strict
2096
2118
  SupportedStyles:
2097
2119
  - strict
@@ -2512,6 +2534,31 @@ Naming/HeredocDelimiterNaming:
2512
2534
  ForbiddenDelimiters:
2513
2535
  - !ruby/regexp '/(^|\s)(EO[A-Z]{1}|END)(\s|$)/'
2514
2536
 
2537
+ Naming/InclusiveLanguage:
2538
+ Description: 'Recommend the use of inclusive language instead of problematic terms.'
2539
+ Enabled: pending
2540
+ VersionAdded: '1.18'
2541
+ CheckIdentifiers: true
2542
+ CheckConstants: true
2543
+ CheckVariables: true
2544
+ CheckStrings: false
2545
+ CheckSymbols: true
2546
+ CheckComments: true
2547
+ CheckFilepaths: true
2548
+ FlaggedTerms:
2549
+ whitelist:
2550
+ Regex: !ruby/regexp '/white[-_\s]?list/'
2551
+ Suggestions:
2552
+ - allowlist
2553
+ - permit
2554
+ blacklist:
2555
+ Regex: !ruby/regexp '/black[-_\s]?list/'
2556
+ Suggestions:
2557
+ - denylist
2558
+ - block
2559
+ slave:
2560
+ Suggestions: ['replica', 'secondary', 'follower']
2561
+
2515
2562
  Naming/MemoizedInstanceVariableName:
2516
2563
  Description: >-
2517
2564
  Memoized method name should match memo instance variable name.
@@ -3490,8 +3537,10 @@ Style/HashEachMethods:
3490
3537
  Description: 'Use Hash#each_key and Hash#each_value.'
3491
3538
  StyleGuide: '#hash-each'
3492
3539
  Enabled: true
3493
- VersionAdded: '0.80'
3494
3540
  Safe: false
3541
+ VersionAdded: '0.80'
3542
+ VersionChanged: '1.16'
3543
+ AllowedReceivers: []
3495
3544
 
3496
3545
  Style/HashExcept:
3497
3546
  Description: >-
@@ -3554,6 +3603,7 @@ Style/IdenticalConditionalBranches:
3554
3603
  out of the conditional.
3555
3604
  Enabled: true
3556
3605
  VersionAdded: '0.36'
3606
+ VersionChanged: '1.16'
3557
3607
 
3558
3608
  Style/IfInsideElse:
3559
3609
  Description: 'Finds if nodes inside else, which can be converted to elsif.'
@@ -3600,6 +3650,12 @@ Style/ImplicitRuntimeError:
3600
3650
  Enabled: false
3601
3651
  VersionAdded: '0.41'
3602
3652
 
3653
+ Style/InPatternThen:
3654
+ Description: 'Checks for `in;` uses in `case` expressions.'
3655
+ StyleGuide: '#no-in-pattern-semicolons'
3656
+ Enabled: pending
3657
+ VersionAdded: '1.16'
3658
+
3603
3659
  Style/InfiniteLoop:
3604
3660
  Description: >-
3605
3661
  Use Kernel#loop for infinite loops.
@@ -3828,6 +3884,12 @@ Style/MultilineIfThen:
3828
3884
  VersionAdded: '0.9'
3829
3885
  VersionChanged: '0.26'
3830
3886
 
3887
+ Style/MultilineInPatternThen:
3888
+ Description: 'Do not use `then` for multi-line `in` statement.'
3889
+ StyleGuide: '#no-then'
3890
+ Enabled: pending
3891
+ VersionAdded: '1.16'
3892
+
3831
3893
  Style/MultilineMemoization:
3832
3894
  Description: 'Wrap multiline memoizations in a `begin` and `end` block.'
3833
3895
  Enabled: true
@@ -4186,6 +4248,16 @@ Style/Proc:
4186
4248
  VersionAdded: '0.9'
4187
4249
  VersionChanged: '0.18'
4188
4250
 
4251
+ Style/QuotedSymbols:
4252
+ Description: 'Use a consistent style for quoted symbols.'
4253
+ Enabled: pending
4254
+ VersionAdded: '1.16'
4255
+ EnforcedStyle: same_as_string_literals
4256
+ SupportedStyles:
4257
+ - same_as_string_literals
4258
+ - single_quotes
4259
+ - double_quotes
4260
+
4189
4261
  Style/RaiseArgs:
4190
4262
  Description: 'Checks the arguments passed to raise/fail.'
4191
4263
  StyleGuide: '#exception-class-messages'
@@ -4543,7 +4615,8 @@ Style/StringConcatenation:
4543
4615
  Enabled: true
4544
4616
  Safe: false
4545
4617
  VersionAdded: '0.89'
4546
- VersionChanged: '1.6'
4618
+ VersionChanged: '1.18'
4619
+ Mode: aggressive
4547
4620
 
4548
4621
  Style/StringHashKeys:
4549
4622
  Description: 'Prefer symbols instead of strings as hash keys.'
data/lib/rubocop.rb CHANGED
@@ -119,6 +119,7 @@ require_relative 'rubocop/cop/mixin/surrounding_space'
119
119
  require_relative 'rubocop/cop/mixin/statement_modifier'
120
120
  require_relative 'rubocop/cop/mixin/string_help'
121
121
  require_relative 'rubocop/cop/mixin/string_literals_help'
122
+ require_relative 'rubocop/cop/mixin/symbol_help'
122
123
  require_relative 'rubocop/cop/mixin/target_ruby_version'
123
124
  require_relative 'rubocop/cop/mixin/trailing_body'
124
125
  require_relative 'rubocop/cop/mixin/trailing_comma'
@@ -210,6 +211,7 @@ require_relative 'rubocop/cop/layout/indentation_width'
210
211
  require_relative 'rubocop/cop/layout/initial_indentation'
211
212
  require_relative 'rubocop/cop/layout/leading_comment_space'
212
213
  require_relative 'rubocop/cop/layout/leading_empty_lines'
214
+ require_relative 'rubocop/cop/layout/line_end_string_concatenation_indentation'
213
215
  require_relative 'rubocop/cop/layout/line_length'
214
216
  require_relative 'rubocop/cop/layout/multiline_array_brace_layout'
215
217
  require_relative 'rubocop/cop/layout/multiline_array_line_breaks'
@@ -287,6 +289,7 @@ require_relative 'rubocop/cop/lint/empty_conditional_body'
287
289
  require_relative 'rubocop/cop/lint/empty_ensure'
288
290
  require_relative 'rubocop/cop/lint/empty_expression'
289
291
  require_relative 'rubocop/cop/lint/empty_file'
292
+ require_relative 'rubocop/cop/lint/empty_in_pattern'
290
293
  require_relative 'rubocop/cop/lint/empty_interpolation'
291
294
  require_relative 'rubocop/cop/lint/empty_when'
292
295
  require_relative 'rubocop/cop/lint/ensure_return'
@@ -398,6 +401,7 @@ require_relative 'rubocop/cop/naming/constant_name'
398
401
  require_relative 'rubocop/cop/naming/file_name'
399
402
  require_relative 'rubocop/cop/naming/heredoc_delimiter_case'
400
403
  require_relative 'rubocop/cop/naming/heredoc_delimiter_naming'
404
+ require_relative 'rubocop/cop/naming/inclusive_language'
401
405
  require_relative 'rubocop/cop/naming/memoized_instance_variable_name'
402
406
  require_relative 'rubocop/cop/naming/method_name'
403
407
  require_relative 'rubocop/cop/naming/method_parameter_name'
@@ -490,6 +494,7 @@ require_relative 'rubocop/cop/style/if_unless_modifier_of_if_unless'
490
494
  require_relative 'rubocop/cop/style/if_with_boolean_literal_branches'
491
495
  require_relative 'rubocop/cop/style/if_with_semicolon'
492
496
  require_relative 'rubocop/cop/style/implicit_runtime_error'
497
+ require_relative 'rubocop/cop/style/in_pattern_then'
493
498
  require_relative 'rubocop/cop/style/infinite_loop'
494
499
  require_relative 'rubocop/cop/style/inverse_methods'
495
500
  require_relative 'rubocop/cop/style/inline_comment'
@@ -500,6 +505,7 @@ require_relative 'rubocop/cop/style/lambda_call'
500
505
  require_relative 'rubocop/cop/style/line_end_concatenation'
501
506
  require_relative 'rubocop/cop/style/method_call_without_args_parentheses'
502
507
  require_relative 'rubocop/cop/style/method_call_with_args_parentheses'
508
+ require_relative 'rubocop/cop/style/multiline_in_pattern_then'
503
509
  require_relative 'rubocop/cop/style/redundant_assignment'
504
510
  require_relative 'rubocop/cop/style/redundant_fetch_block'
505
511
  require_relative 'rubocop/cop/style/redundant_file_extension_in_require'
@@ -550,6 +556,7 @@ require_relative 'rubocop/cop/style/percent_q_literals'
550
556
  require_relative 'rubocop/cop/style/perl_backrefs'
551
557
  require_relative 'rubocop/cop/style/preferred_hash_methods'
552
558
  require_relative 'rubocop/cop/style/proc'
559
+ require_relative 'rubocop/cop/style/quoted_symbols'
553
560
  require_relative 'rubocop/cop/style/raise_args'
554
561
  require_relative 'rubocop/cop/style/random_with_offset'
555
562
  require_relative 'rubocop/cop/style/redundant_argument'
@@ -19,7 +19,7 @@ module RuboCop
19
19
 
20
20
  puts
21
21
  puts 'Tip: Based on detected gems, the following '\
22
- 'RuboCop extension libraries might be helpful:'
22
+ 'RuboCop extension libraries might be helpful:'
23
23
 
24
24
  extensions.sort.each do |extension|
25
25
  puts " * #{extension} (https://github.com/rubocop/#{extension})"
@@ -27,8 +27,8 @@ module RuboCop
27
27
 
28
28
  puts
29
29
  puts 'You can opt out of this message by adding the following to your config '\
30
- '(see https://docs.rubocop.org/rubocop/extensions.html#extension-suggestions '\
31
- 'for more options):'
30
+ '(see https://docs.rubocop.org/rubocop/extensions.html#extension-suggestions '\
31
+ 'for more options):'
32
32
  puts ' AllCops:'
33
33
  puts ' SuggestExtensions: false'
34
34
 
@@ -229,7 +229,7 @@ module RuboCop
229
229
  line1 = key1.start_line + 1
230
230
  line2 = key2.start_line + 1
231
231
  "#{smart_path}:#{line1}: " \
232
- "`#{value}` is concealed by line #{line2}"
232
+ "`#{value}` is concealed by line #{line2}"
233
233
  else
234
234
  "#{smart_path}: `#{value}` is concealed by duplicate"
235
235
  end
@@ -81,11 +81,11 @@ module RuboCop
81
81
 
82
82
  msg = if last_version
83
83
  "RuboCop found unsupported Ruby version #{target_ruby_version} " \
84
- "in #{source}. #{target_ruby_version}-compatible " \
85
- "analysis was dropped after version #{last_version}."
84
+ "in #{source}. #{target_ruby_version}-compatible " \
85
+ "analysis was dropped after version #{last_version}."
86
86
  else
87
87
  'RuboCop found unknown Ruby version ' \
88
- "#{target_ruby_version.inspect} in #{source}."
88
+ "#{target_ruby_version.inspect} in #{source}."
89
89
  end
90
90
 
91
91
  msg += "\nSupported versions: #{TargetRuby.supported_versions.join(', ')}"
@@ -179,8 +179,8 @@ module RuboCop
179
179
  next if validate_support_and_has_list(name, style, valid)
180
180
 
181
181
  msg = "invalid #{style_name} '#{style}' for #{name} found in " \
182
- "#{smart_loaded_path}\n" \
183
- "Valid choices are: #{valid.join(', ')}"
182
+ "#{smart_loaded_path}\n" \
183
+ "Valid choices are: #{valid.join(', ')}"
184
184
  raise ValidationError, msg
185
185
  end
186
186
  end
@@ -261,7 +261,7 @@ module RuboCop
261
261
  # @deprecated Make potential errors with previous API more obvious
262
262
  def offenses
263
263
  raise 'The offenses are not directly available; ' \
264
- 'they are returned as the result of the investigation'
264
+ 'they are returned as the result of the investigation'
265
265
  end
266
266
 
267
267
  ### Reserved for Commissioner
@@ -441,7 +441,7 @@ module RuboCop
441
441
  severity.to_sym
442
442
  else
443
443
  message = "Warning: Invalid severity '#{severity}'. " \
444
- "Valid severities are #{Severity::NAMES.join(', ')}."
444
+ "Valid severities are #{Severity::NAMES.join(', ')}."
445
445
  warn(Rainbow(message).red)
446
446
  end
447
447
  end