rubocop 1.5.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/config/default.yml +52 -7
  4. data/config/obsoletion.yml +196 -0
  5. data/lib/rubocop.rb +14 -0
  6. data/lib/rubocop/cli/command/suggest_extensions.rb +21 -8
  7. data/lib/rubocop/config.rb +8 -5
  8. data/lib/rubocop/config_loader.rb +10 -6
  9. data/lib/rubocop/config_loader_resolver.rb +21 -4
  10. data/lib/rubocop/config_obsoletion.rb +64 -262
  11. data/lib/rubocop/config_obsoletion/changed_enforced_styles.rb +33 -0
  12. data/lib/rubocop/config_obsoletion/changed_parameter.rb +21 -0
  13. data/lib/rubocop/config_obsoletion/cop_rule.rb +34 -0
  14. data/lib/rubocop/config_obsoletion/extracted_cop.rb +44 -0
  15. data/lib/rubocop/config_obsoletion/parameter_rule.rb +44 -0
  16. data/lib/rubocop/config_obsoletion/removed_cop.rb +41 -0
  17. data/lib/rubocop/config_obsoletion/renamed_cop.rb +34 -0
  18. data/lib/rubocop/config_obsoletion/rule.rb +41 -0
  19. data/lib/rubocop/config_obsoletion/split_cop.rb +27 -0
  20. data/lib/rubocop/config_validator.rb +11 -4
  21. data/lib/rubocop/cop/base.rb +17 -15
  22. data/lib/rubocop/cop/cop.rb +2 -2
  23. data/lib/rubocop/cop/correctors/string_literal_corrector.rb +6 -8
  24. data/lib/rubocop/cop/gemspec/required_ruby_version.rb +3 -2
  25. data/lib/rubocop/cop/internal_affairs.rb +1 -0
  26. data/lib/rubocop/cop/internal_affairs/style_detected_api_use.rb +145 -0
  27. data/lib/rubocop/cop/layout/empty_line_between_defs.rb +19 -3
  28. data/lib/rubocop/cop/layout/empty_lines_around_arguments.rb +1 -1
  29. data/lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb +1 -1
  30. data/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +26 -0
  31. data/lib/rubocop/cop/layout/line_length.rb +6 -16
  32. data/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +7 -3
  33. data/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +3 -10
  34. data/lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb +1 -0
  35. data/lib/rubocop/cop/layout/space_before_block_braces.rb +2 -0
  36. data/lib/rubocop/cop/layout/space_before_brackets.rb +64 -0
  37. data/lib/rubocop/cop/layout/space_inside_block_braces.rb +13 -10
  38. data/lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb +2 -2
  39. data/lib/rubocop/cop/lint/ambiguous_assignment.rb +59 -0
  40. data/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb +7 -2
  41. data/lib/rubocop/cop/lint/duplicate_branch.rb +64 -2
  42. data/lib/rubocop/cop/lint/interpolation_check.rb +7 -2
  43. data/lib/rubocop/cop/lint/redundant_splat_expansion.rb +50 -17
  44. data/lib/rubocop/cop/lint/shadowed_exception.rb +1 -11
  45. data/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +13 -0
  46. data/lib/rubocop/cop/lint/unreachable_loop.rb +17 -0
  47. data/lib/rubocop/cop/metrics/utils/code_length_calculator.rb +1 -1
  48. data/lib/rubocop/cop/migration/department_name.rb +1 -1
  49. data/lib/rubocop/cop/mixin/string_help.rb +4 -1
  50. data/lib/rubocop/cop/naming/accessor_method_name.rb +15 -1
  51. data/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +59 -5
  52. data/lib/rubocop/cop/naming/variable_number.rb +3 -1
  53. data/lib/rubocop/cop/registry.rb +10 -0
  54. data/lib/rubocop/cop/style/access_modifier_declarations.rb +3 -1
  55. data/lib/rubocop/cop/style/character_literal.rb +10 -11
  56. data/lib/rubocop/cop/style/collection_methods.rb +14 -1
  57. data/lib/rubocop/cop/style/commented_keyword.rb +22 -5
  58. data/lib/rubocop/cop/style/float_division.rb +44 -1
  59. data/lib/rubocop/cop/style/for.rb +2 -0
  60. data/lib/rubocop/cop/style/hash_except.rb +95 -0
  61. data/lib/rubocop/cop/style/if_unless_modifier.rb +4 -0
  62. data/lib/rubocop/cop/style/ip_addresses.rb +1 -1
  63. data/lib/rubocop/cop/style/keyword_parameters_order.rb +12 -2
  64. data/lib/rubocop/cop/style/lambda_call.rb +2 -1
  65. data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +3 -0
  66. data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +16 -6
  67. data/lib/rubocop/cop/style/method_def_parentheses.rb +7 -0
  68. data/lib/rubocop/cop/style/multiline_method_signature.rb +26 -1
  69. data/lib/rubocop/cop/style/multiline_when_then.rb +3 -1
  70. data/lib/rubocop/cop/style/mutable_constant.rb +13 -3
  71. data/lib/rubocop/cop/style/perl_backrefs.rb +86 -9
  72. data/lib/rubocop/cop/style/raise_args.rb +2 -0
  73. data/lib/rubocop/cop/style/redundant_argument.rb +21 -2
  74. data/lib/rubocop/cop/style/redundant_freeze.rb +8 -4
  75. data/lib/rubocop/cop/style/redundant_regexp_escape.rb +24 -8
  76. data/lib/rubocop/cop/style/single_line_block_params.rb +30 -7
  77. data/lib/rubocop/cop/style/single_line_methods.rb +4 -0
  78. data/lib/rubocop/cop/style/sole_nested_conditional.rb +24 -8
  79. data/lib/rubocop/cop/style/special_global_vars.rb +1 -13
  80. data/lib/rubocop/cop/style/string_concatenation.rb +26 -1
  81. data/lib/rubocop/cop/style/string_literals.rb +14 -8
  82. data/lib/rubocop/cop/style/string_literals_in_interpolation.rb +4 -3
  83. data/lib/rubocop/cop/style/symbol_proc.rb +5 -4
  84. data/lib/rubocop/cop/util.rb +3 -1
  85. data/lib/rubocop/ext/regexp_node.rb +31 -9
  86. data/lib/rubocop/ext/regexp_parser.rb +21 -3
  87. data/lib/rubocop/formatter/emacs_style_formatter.rb +2 -0
  88. data/lib/rubocop/formatter/simple_text_formatter.rb +2 -0
  89. data/lib/rubocop/formatter/tap_formatter.rb +2 -0
  90. data/lib/rubocop/lockfile.rb +40 -0
  91. data/lib/rubocop/options.rb +9 -9
  92. data/lib/rubocop/rspec/cop_helper.rb +0 -4
  93. data/lib/rubocop/rspec/expect_offense.rb +34 -22
  94. data/lib/rubocop/runner.rb +16 -1
  95. data/lib/rubocop/target_finder.rb +4 -2
  96. data/lib/rubocop/util.rb +16 -0
  97. data/lib/rubocop/version.rb +8 -2
  98. metadata +33 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ce46e11fac05ae40731d9a49b0c4229aa719d395a3f946b294965c52513ad1b
4
- data.tar.gz: 56c6f908f370d96d011287d67172e41c9a8a3a21748fb04d5235d0f957ffd64f
3
+ metadata.gz: fe0d2cef28b14b92436ce28d483594398761fe11474f23e2577630e4c74d877d
4
+ data.tar.gz: 4c06f9d71ffc6b08ad14e9fbb574bcca19cfccc231c36aee75f23c7753643893
5
5
  SHA512:
6
- metadata.gz: f58d45c385e3fcccee94a8c258dd9536fb768c8ae069201411bb22f3c33dac0806b1d177f7f5562a27b71ae25ab3896917c06c29703c1f1c7d276506442069c6
7
- data.tar.gz: ca55f537a662481c1337f6301d162074138c76a36c3332715aa2304ef2b67363df4b026ec1aa4dabe6e9c6b7833c0ed48edca99ea249a152a6a563a6242beeac
6
+ metadata.gz: a395e4004802da434ac704d5aec675b16637d464edc7d9305ec03c739a8d85f57f59d19f31187e93c7f37e9bcd7df6ec0b92df951de8e4508b169637cc7fb190
7
+ data.tar.gz: bac84ae15f62dafabde785bb46bf9e67d4554979fc09a431ee949b61ae03edac8897a6a914f153667eb6abdf803e73efe0a117c691d36d3ff73599ca3b41a13c
data/README.md CHANGED
@@ -51,7 +51,7 @@ To prevent an unwanted RuboCop update you might want to use a conservative versi
51
51
  in your `Gemfile`:
52
52
 
53
53
  ```rb
54
- gem 'rubocop', '~> 1.5', require: false
54
+ gem 'rubocop', '~> 1.7', require: false
55
55
  ```
56
56
 
57
57
  See [versioning](https://docs.rubocop.org/rubocop/1.0/versioning.html) for further details.
@@ -473,7 +473,7 @@ Layout/EmptyLineBetweenDefs:
473
473
  StyleGuide: '#empty-lines-between-methods'
474
474
  Enabled: true
475
475
  VersionAdded: '0.49'
476
- VersionChanged: '1.4'
476
+ VersionChanged: '1.7'
477
477
  EmptyLineBetweenMethodDefs: true
478
478
  EmptyLineBetweenClassDefs: true
479
479
  EmptyLineBetweenModuleDefs: true
@@ -1192,6 +1192,13 @@ Layout/SpaceBeforeBlockBraces:
1192
1192
  - no_space
1193
1193
  VersionChanged: '0.52'
1194
1194
 
1195
+ Layout/SpaceBeforeBrackets:
1196
+ Description: 'Checks for receiver with a space before the opening brackets.'
1197
+ StyleGuide: '#space-in-brackets-access'
1198
+ Enabled: pending
1199
+ VersionAdded: '1.7'
1200
+ Safe: false
1201
+
1195
1202
  Layout/SpaceBeforeComma:
1196
1203
  Description: 'No spaces before commas.'
1197
1204
  Enabled: true
@@ -1354,6 +1361,11 @@ Layout/TrailingWhitespace:
1354
1361
  #################### Lint ##################################
1355
1362
  ### Warnings
1356
1363
 
1364
+ Lint/AmbiguousAssignment:
1365
+ Description: 'Checks for mistyped shorthand assignments.'
1366
+ Enabled: pending
1367
+ VersionAdded: '1.7'
1368
+
1357
1369
  Lint/AmbiguousBlockAssociation:
1358
1370
  Description: >-
1359
1371
  Checks for ambiguous block association with method when param passed without
@@ -1396,6 +1408,7 @@ Lint/BinaryOperatorWithIdenticalOperands:
1396
1408
  Enabled: true
1397
1409
  Safe: false
1398
1410
  VersionAdded: '0.89'
1411
+ VersionChanged: '1.7'
1399
1412
 
1400
1413
  Lint/BooleanSymbol:
1401
1414
  Description: 'Check for `:true` and `:false` symbols.'
@@ -1472,6 +1485,9 @@ Lint/DuplicateBranch:
1472
1485
  Description: Checks that there are no repeated bodies within `if/unless`, `case-when` and `rescue` constructs.
1473
1486
  Enabled: pending
1474
1487
  VersionAdded: '1.3'
1488
+ VersionChanged: '1.7'
1489
+ IgnoreLiteralBranches: false
1490
+ IgnoreConstantBranches: false
1475
1491
 
1476
1492
  Lint/DuplicateCaseCondition:
1477
1493
  Description: 'Do not repeat values in case conditionals.'
@@ -1842,6 +1858,8 @@ Lint/RedundantSplatExpansion:
1842
1858
  Description: 'Checks for splat unnecessarily being called on literals.'
1843
1859
  Enabled: true
1844
1860
  VersionAdded: '0.76'
1861
+ VersionChanged: '1.7'
1862
+ AllowPercentLiteralArrayArgument: true
1845
1863
 
1846
1864
  Lint/RedundantStringCoercion:
1847
1865
  Description: 'Checks for Object#to_s usage in string interpolation.'
@@ -2045,6 +2063,11 @@ Lint/UnreachableLoop:
2045
2063
  Description: 'This cop checks for loops that will have at most one iteration.'
2046
2064
  Enabled: true
2047
2065
  VersionAdded: '0.89'
2066
+ VersionChanged: '1.7'
2067
+ IgnoredPatterns:
2068
+ # RSpec uses `times` in its message expectations
2069
+ # eg. `exactly(2).times`
2070
+ - !ruby/regexp /(exactly|at_least|at_most)\(\d+\)\.times/
2048
2071
 
2049
2072
  Lint/UnusedBlockArgument:
2050
2073
  Description: 'Checks for unused block arguments.'
@@ -2895,7 +2918,7 @@ Style/CollectionMethods:
2895
2918
  StyleGuide: '#map-find-select-reduce-include-size'
2896
2919
  Enabled: false
2897
2920
  VersionAdded: '0.9'
2898
- VersionChanged: '0.27'
2921
+ VersionChanged: '1.7'
2899
2922
  Safe: false
2900
2923
  # Mapping from undesired method to desired method
2901
2924
  # e.g. to use `detect` over `find`:
@@ -2910,6 +2933,11 @@ Style/CollectionMethods:
2910
2933
  detect: 'find'
2911
2934
  find_all: 'select'
2912
2935
  member?: 'include?'
2936
+ # Methods in this array accept a final symbol as an implicit block
2937
+ # eg. `inject(:+)`
2938
+ MethodsAcceptingSymbol:
2939
+ - inject
2940
+ - reduce
2913
2941
 
2914
2942
  Style/ColonMethodCall:
2915
2943
  Description: 'Do not use :: for method call.'
@@ -2969,6 +2997,7 @@ Style/CommentedKeyword:
2969
2997
  Description: 'Do not place comments on the same line as certain keywords.'
2970
2998
  Enabled: true
2971
2999
  VersionAdded: '0.51'
3000
+ VersionChanged: '1.7'
2972
3001
 
2973
3002
  Style/ConditionalAssignment:
2974
3003
  Description: >-
@@ -3209,9 +3238,10 @@ Style/ExponentialNotation:
3209
3238
  Style/FloatDivision:
3210
3239
  Description: 'For performing float division, coerce one side only.'
3211
3240
  StyleGuide: '#float-division'
3212
- Reference: 'https://github.com/rubocop-hq/ruby-style-guide/issues/628'
3241
+ Reference: 'https://blog.rubystyle.guide/ruby/2019/06/21/float-division.html'
3213
3242
  Enabled: true
3214
3243
  VersionAdded: '0.72'
3244
+ VersionChanged: '1.6'
3215
3245
  EnforcedStyle: single_coerce
3216
3246
  SupportedStyles:
3217
3247
  - left_coerce
@@ -3327,6 +3357,13 @@ Style/HashEachMethods:
3327
3357
  VersionAdded: '0.80'
3328
3358
  Safe: false
3329
3359
 
3360
+ Style/HashExcept:
3361
+ Description: >-
3362
+ Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods
3363
+ that can be replaced with `Hash#except` method.
3364
+ Enabled: pending
3365
+ VersionAdded: '1.7'
3366
+
3330
3367
  Style/HashLikeCase:
3331
3368
  Description: >-
3332
3369
  Checks for places where `case-when` represents a simple 1:1
@@ -3481,6 +3518,7 @@ Style/KeywordParametersOrder:
3481
3518
  StyleGuide: '#keyword-parameters-order'
3482
3519
  Enabled: true
3483
3520
  VersionAdded: '0.90'
3521
+ VersionChanged: '1.7'
3484
3522
 
3485
3523
  Style/Lambda:
3486
3524
  Description: 'Use the new lambda literal syntax for single-line blocks.'
@@ -3519,7 +3557,7 @@ Style/MethodCallWithArgsParentheses:
3519
3557
  StyleGuide: '#method-invocation-parens'
3520
3558
  Enabled: false
3521
3559
  VersionAdded: '0.47'
3522
- VersionChanged: '0.61'
3560
+ VersionChanged: '1.7'
3523
3561
  IgnoreMacros: true
3524
3562
  IgnoredMethods: []
3525
3563
  IgnoredPatterns: []
@@ -3553,7 +3591,7 @@ Style/MethodDefParentheses:
3553
3591
  StyleGuide: '#method-parens'
3554
3592
  Enabled: true
3555
3593
  VersionAdded: '0.16'
3556
- VersionChanged: '0.35'
3594
+ VersionChanged: '1.7'
3557
3595
  EnforcedStyle: require_parentheses
3558
3596
  SupportedStyles:
3559
3597
  - require_parentheses
@@ -3659,6 +3697,7 @@ Style/MultilineMethodSignature:
3659
3697
  Description: 'Avoid multi-line method signatures.'
3660
3698
  Enabled: false
3661
3699
  VersionAdded: '0.59'
3700
+ VersionChanged: '1.7'
3662
3701
 
3663
3702
  Style/MultilineTernaryOperator:
3664
3703
  Description: >-
@@ -4025,11 +4064,16 @@ Style/RedundantArgument:
4025
4064
  Enabled: pending
4026
4065
  Safe: false
4027
4066
  VersionAdded: '1.4'
4067
+ VersionChanged: '1.7'
4028
4068
  Methods:
4029
4069
  # Array#join
4030
4070
  join: ''
4031
4071
  # String#split
4032
4072
  split: ' '
4073
+ # String#chomp
4074
+ chomp: "\n"
4075
+ # String#chomp!
4076
+ chomp!: "\n"
4033
4077
 
4034
4078
  Style/RedundantAssignment:
4035
4079
  Description: 'Checks for redundant assignment before returning.'
@@ -4272,7 +4316,7 @@ Style/SingleLineBlockParams:
4272
4316
  Description: 'Enforces the names of some block params.'
4273
4317
  Enabled: false
4274
4318
  VersionAdded: '0.16'
4275
- VersionChanged: '0.47'
4319
+ VersionChanged: '1.6'
4276
4320
  Methods:
4277
4321
  - reduce:
4278
4322
  - acc
@@ -4286,7 +4330,7 @@ Style/SingleLineMethods:
4286
4330
  StyleGuide: '#no-single-line-methods'
4287
4331
  Enabled: true
4288
4332
  VersionAdded: '0.9'
4289
- VersionChanged: '0.19'
4333
+ VersionChanged: '1.7'
4290
4334
  AllowIfMethodIsEmpty: true
4291
4335
 
4292
4336
  Style/SlicingWithRange:
@@ -4345,6 +4389,7 @@ Style/StringConcatenation:
4345
4389
  Enabled: true
4346
4390
  Safe: false
4347
4391
  VersionAdded: '0.89'
4392
+ VersionChanged: '1.6'
4348
4393
 
4349
4394
  Style/StringHashKeys:
4350
4395
  Description: 'Prefer symbols instead of strings as hash keys.'
@@ -0,0 +1,196 @@
1
+ # Configuration of obsolete/deprecated cops used by `ConfigObsoletion`
2
+
3
+ # Cops that were renamed
4
+ renamed:
5
+ Layout/AlignArguments: Layout/ArgumentAlignment
6
+ Layout/AlignArray: Layout/ArrayAlignment
7
+ Layout/AlignHash: Layout/HashAlignment
8
+ Layout/AlignParameters: Layout/ParameterAlignment
9
+ Layout/IndentArray: Layout/FirstArrayElementIndentation
10
+ Layout/IndentAssignment: Layout/AssignmentIndentation
11
+ Layout/IndentFirstArgument: Layout/FirstArgumentIndentation
12
+ Layout/IndentFirstArrayElement: Layout/FirstArrayElementIndentation
13
+ Layout/IndentFirstHashElement: Layout/FirstHashElementIndentation
14
+ Layout/IndentFirstParameter: Layout/FirstParameterIndentation
15
+ Layout/IndentHash: Layout/FirstHashElementIndentation
16
+ Layout/IndentHeredoc: Layout/HeredocIndentation
17
+ Layout/LeadingBlankLines: Layout/LeadingEmptyLines
18
+ Layout/Tab: Layout/IndentationStyle
19
+ Layout/TrailingBlankLines: Layout/TrailingEmptyLines
20
+ Lint/BlockAlignment: Layout/BlockAlignment
21
+ Lint/DefEndAlignment: Layout/DefEndAlignment
22
+ Lint/DuplicatedKey: Lint/DuplicateHashKey
23
+ Lint/EndAlignment: Layout/EndAlignment
24
+ Lint/EndInMethod: Style/EndBlock
25
+ Lint/Eval: Security/Eval
26
+ Lint/HandleExceptions: Lint/SuppressedException
27
+ Lint/MultipleCompare: Lint/MultipleComparison
28
+ Lint/StringConversionInInterpolation: Lint/RedundantStringCoercion
29
+ Lint/UnneededCopDisableDirective: Lint/RedundantCopDisableDirective
30
+ Lint/UnneededCopEnableDirective: Lint/RedundantCopEnableDirective
31
+ Lint/UnneededRequireStatement: Lint/RedundantRequireStatement
32
+ Lint/UnneededSplatExpansion: Lint/RedundantSplatExpansion
33
+ Metrics/LineLength: Layout/LineLength
34
+ Naming/UncommunicativeBlockParamName: Naming/BlockParameterName
35
+ Naming/UncommunicativeMethodParamName: Naming/MethodParameterName
36
+ Style/AccessorMethodName: Naming/AccessorMethodName
37
+ Style/AsciiIdentifiers: Naming/AsciiIdentifiers
38
+ Style/ClassAndModuleCamelCase: Naming/ClassAndModuleCamelCase
39
+ Style/ConstantName: Naming/ConstantName
40
+ Style/DeprecatedHashMethods: Style/PreferredHashMethods
41
+ Style/FileName: Naming/FileName
42
+ Style/FlipFlop: Lint/FlipFlop
43
+ Style/MethodCallParentheses: Style/MethodCallWithoutArgsParentheses
44
+ Style/MethodName: Naming/MethodName
45
+ Style/OpMethod: Naming/BinaryOperatorParameterName
46
+ Style/PredicateName: Naming/PredicateName
47
+ Style/SingleSpaceBeforeFirstArg: Layout/SpaceBeforeFirstArg
48
+ Style/UnneededCapitalW: Style/RedundantCapitalW
49
+ Style/UnneededCondition: Style/RedundantCondition
50
+ Style/UnneededInterpolation: Style/RedundantInterpolation
51
+ Style/UnneededPercentQ: Style/RedundantPercentQ
52
+ Style/UnneededSort: Style/RedundantSort
53
+ Style/VariableName: Naming/VariableName
54
+ Style/VariableNumber: Naming/VariableNumber
55
+
56
+ # Cops that were removed
57
+ removed:
58
+ Layout/SpaceAfterControlKeyword:
59
+ alternatives: Layout/SpaceAroundKeyword
60
+ Layout/SpaceBeforeModifierKeyword:
61
+ alternatives: Layout/SpaceAroundKeyword
62
+ Lint/InvalidCharacterLiteral:
63
+ reason: it was never being actually triggered
64
+ Lint/RescueWithoutErrorClass:
65
+ alternatives: Style/RescueStandardError
66
+ Lint/SpaceBeforeFirstArg:
67
+ reason: >
68
+ it was a duplicate of `Layout/SpaceBeforeFirstArg`. Please use
69
+ `Layout/SpaceBeforeFirstArg` instead
70
+ Lint/UselessComparison:
71
+ reason: >
72
+ it has been superseded by
73
+ `Lint/BinaryOperatorWithIdenticalOperands`. Please use
74
+ `Lint/BinaryOperatorWithIdenticalOperands` instead
75
+ Style/BracesAroundHashParameters: true
76
+ Style/MethodMissingSuper:
77
+ reason: >
78
+ it has been superseded by `Lint/MissingSuper`. Please use
79
+ `Lint/MissingSuper` instead
80
+ Style/SpaceAfterControlKeyword:
81
+ alternatives: Layout/SpaceAroundKeyword
82
+ Style/SpaceBeforeModifierKeyword:
83
+ alternatives: Layout/SpaceAroundKeyword
84
+ Style/TrailingComma:
85
+ alternatives:
86
+ - Style/TrailingCommaInArguments
87
+ - Style/TrailingCommaInArrayLiteral
88
+ - Style/TrailingCommaInHashLiteral
89
+ Style/TrailingCommaInLiteral:
90
+ alternatives:
91
+ - Style/TrailingCommaInArrayLiteral
92
+ - Style/TrailingCommaInHashLiteral
93
+
94
+ # Cops split into multiple other cops
95
+ split:
96
+ Style/MethodMissing:
97
+ alternatives:
98
+ - Style/MethodMissingSuper
99
+ - Style/MissingRespondToMissing
100
+
101
+ # Cops that were extracted into a different gem
102
+ extracted:
103
+ Performance/*: rubocop-performance
104
+ Rails/*: rubocop-rails
105
+
106
+ # Cop parameters that have been changed
107
+ # Can be treated as a warning instead of a failure with `severity: warning`
108
+ changed_parameters:
109
+ - cops:
110
+ - Layout/SpaceAroundOperators
111
+ - Style/SpaceAroundOperators
112
+ parameters: MultiSpaceAllowedForOperators
113
+ reason: >
114
+ If your intention was to allow extra spaces for alignment, please
115
+ use `AllowForAlignment: true` instead.
116
+ - cops: Style/Encoding
117
+ parameters:
118
+ - EnforcedStyle
119
+ - SupportedStyles
120
+ - AutoCorrectEncodingComment
121
+ reason: '`Style/Encoding` no longer supports styles. The "never" behavior is always assumed.'
122
+ - cops: Style/IfUnlessModifier
123
+ parameters: MaxLineLength
124
+ reason: >
125
+ `Style/IfUnlessModifier: MaxLineLength` has been removed.
126
+ Use `Layout/LineLength: Max` instead
127
+ - cops: Style/WhileUntilModifier
128
+ parameters: MaxLineLength
129
+ reason: >
130
+ `Style/WhileUntilModifier: MaxLineLength` has been removed.
131
+ Use `Layout/LineLength: Max` instead
132
+ - cops: AllCops
133
+ parameters: RunRailsCops
134
+ reason: |-
135
+ Use the following configuration instead:
136
+ Rails:
137
+ Enabled: true
138
+ - cops: Layout/CaseIndentation
139
+ parameters: IndentWhenRelativeTo
140
+ alternative: EnforcedStyle
141
+ - cops:
142
+ - Lint/BlockAlignment
143
+ - Layout/BlockAlignment
144
+ - Lint/EndAlignment
145
+ - Layout/EndAlignment
146
+ - Lint/DefEndAlignment
147
+ - Layout/DefEndAlignment
148
+ parameters: AlignWith
149
+ alternative: EnforcedStyleAlignWith
150
+ - cops: Rails/UniqBeforePluck
151
+ parameters: EnforcedMode
152
+ alternative: EnforcedStyle
153
+ - cops: Style/MethodCallWithArgsParentheses
154
+ parameters: IgnoredMethodPatterns
155
+ alternative: IgnoredPatterns
156
+ - cops:
157
+ - Performance/Count
158
+ - Performance/Detect
159
+ parameters: SafeMode
160
+ reason: "`SafeMode` has been removed. Use `SafeAutoCorrect` instead."
161
+ - cops: Bundler/GemComment
162
+ parameters: Whitelist
163
+ alternative: IgnoredGems
164
+ - cops:
165
+ - Lint/SafeNavigationChain
166
+ - Lint/SafeNavigationConsistency
167
+ - Style/NestedParenthesizedCalls
168
+ - Style/SafeNavigation
169
+ - Style/TrivialAccessors
170
+ parameters: Whitelist
171
+ alternative: AllowedMethods
172
+ - cops: Style/IpAddresses
173
+ parameters: Whitelist
174
+ alternative: AllowedAddresses
175
+ - cops: Naming/HeredocDelimiterNaming
176
+ parameters: Blacklist
177
+ alternative: ForbiddenDelimiters
178
+ - cops: Naming/PredicateName
179
+ parameters: NamePrefixBlacklist
180
+ alternative: ForbiddenPrefixes
181
+ - cops: Naming/PredicateName
182
+ parameters: NameWhitelist
183
+ alternative: AllowedMethods
184
+ - cops:
185
+ - Metrics/BlockLength
186
+ - Metrics/MethodLength
187
+ parameters: ExcludedMethods
188
+ alternative: IgnoredMethods
189
+ severity: warning
190
+
191
+ # Enforced styles that have been removed or replaced
192
+ changed_enforced_styles:
193
+ - cops: Layout/IndentationConsistency
194
+ parameters: EnforcedStyle
195
+ value: rails
196
+ alternative: indented_internal_methods
@@ -28,6 +28,7 @@ require_relative 'rubocop/name_similarity'
28
28
  require_relative 'rubocop/string_interpreter'
29
29
  require_relative 'rubocop/error'
30
30
  require_relative 'rubocop/warning'
31
+ require_relative 'rubocop/util'
31
32
 
32
33
  require_relative 'rubocop/cop/util'
33
34
  require_relative 'rubocop/cop/offense'
@@ -230,6 +231,7 @@ require_relative 'rubocop/cop/layout/space_around_keyword'
230
231
  require_relative 'rubocop/cop/layout/space_around_method_call_operator'
231
232
  require_relative 'rubocop/cop/layout/space_around_operators'
232
233
  require_relative 'rubocop/cop/layout/space_before_block_braces'
234
+ require_relative 'rubocop/cop/layout/space_before_brackets'
233
235
  require_relative 'rubocop/cop/layout/space_before_comma'
234
236
  require_relative 'rubocop/cop/layout/space_before_comment'
235
237
  require_relative 'rubocop/cop/layout/space_before_first_arg'
@@ -247,6 +249,7 @@ require_relative 'rubocop/cop/layout/space_inside_string_interpolation'
247
249
  require_relative 'rubocop/cop/layout/trailing_empty_lines'
248
250
  require_relative 'rubocop/cop/layout/trailing_whitespace'
249
251
 
252
+ require_relative 'rubocop/cop/lint/ambiguous_assignment'
250
253
  require_relative 'rubocop/cop/lint/ambiguous_block_association'
251
254
  require_relative 'rubocop/cop/lint/ambiguous_operator'
252
255
  require_relative 'rubocop/cop/lint/ambiguous_regexp_literal'
@@ -460,6 +463,7 @@ require_relative 'rubocop/cop/style/global_vars'
460
463
  require_relative 'rubocop/cop/style/guard_clause'
461
464
  require_relative 'rubocop/cop/style/hash_as_last_array_item'
462
465
  require_relative 'rubocop/cop/style/hash_each_methods'
466
+ require_relative 'rubocop/cop/style/hash_except'
463
467
  require_relative 'rubocop/cop/style/hash_like_case'
464
468
  require_relative 'rubocop/cop/style/hash_syntax'
465
469
  require_relative 'rubocop/cop/style/hash_transform_keys'
@@ -632,9 +636,19 @@ require_relative 'rubocop/cached_data'
632
636
  require_relative 'rubocop/config'
633
637
  require_relative 'rubocop/config_loader_resolver'
634
638
  require_relative 'rubocop/config_loader'
639
+ require_relative 'rubocop/config_obsoletion/rule'
640
+ require_relative 'rubocop/config_obsoletion/cop_rule'
641
+ require_relative 'rubocop/config_obsoletion/parameter_rule'
642
+ require_relative 'rubocop/config_obsoletion/changed_enforced_styles'
643
+ require_relative 'rubocop/config_obsoletion/changed_parameter'
644
+ require_relative 'rubocop/config_obsoletion/extracted_cop'
645
+ require_relative 'rubocop/config_obsoletion/removed_cop'
646
+ require_relative 'rubocop/config_obsoletion/renamed_cop'
647
+ require_relative 'rubocop/config_obsoletion/split_cop'
635
648
  require_relative 'rubocop/config_obsoletion'
636
649
  require_relative 'rubocop/config_store'
637
650
  require_relative 'rubocop/config_validator'
651
+ require_relative 'rubocop/lockfile'
638
652
  require_relative 'rubocop/target_finder'
639
653
  require_relative 'rubocop/directive_comment'
640
654
  require_relative 'rubocop/comment_config'