rubocop 1.43.0 → 1.45.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/config/default.yml +64 -29
  4. data/lib/rubocop/cli.rb +54 -8
  5. data/lib/rubocop/config_loader.rb +12 -15
  6. data/lib/rubocop/config_loader_resolver.rb +3 -4
  7. data/lib/rubocop/cop/base.rb +27 -9
  8. data/lib/rubocop/cop/commissioner.rb +8 -2
  9. data/lib/rubocop/cop/cop.rb +23 -3
  10. data/lib/rubocop/cop/corrector.rb +10 -2
  11. data/lib/rubocop/cop/correctors/ordered_gem_corrector.rb +1 -6
  12. data/lib/rubocop/cop/gemspec/development_dependencies.rb +107 -0
  13. data/lib/rubocop/cop/internal_affairs/redundant_let_rubocop_config_new.rb +11 -3
  14. data/lib/rubocop/cop/layout/array_alignment.rb +1 -1
  15. data/lib/rubocop/cop/layout/block_end_newline.rb +7 -1
  16. data/lib/rubocop/cop/layout/class_structure.rb +2 -16
  17. data/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb +2 -6
  18. data/lib/rubocop/cop/layout/first_argument_indentation.rb +1 -1
  19. data/lib/rubocop/cop/layout/heredoc_indentation.rb +6 -9
  20. data/lib/rubocop/cop/layout/space_around_keyword.rb +1 -1
  21. data/lib/rubocop/cop/layout/space_around_operators.rb +1 -1
  22. data/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb +11 -13
  23. data/lib/rubocop/cop/layout/space_inside_reference_brackets.rb +4 -4
  24. data/lib/rubocop/cop/layout/space_inside_string_interpolation.rb +5 -4
  25. data/lib/rubocop/cop/lint/ambiguous_operator.rb +4 -0
  26. data/lib/rubocop/cop/lint/debugger.rb +8 -27
  27. data/lib/rubocop/cop/lint/deprecated_class_methods.rb +62 -112
  28. data/lib/rubocop/cop/lint/else_layout.rb +2 -6
  29. data/lib/rubocop/cop/lint/format_parameter_mismatch.rb +14 -7
  30. data/lib/rubocop/cop/lint/heredoc_method_call_position.rb +15 -17
  31. data/lib/rubocop/cop/lint/implicit_string_concatenation.rb +1 -1
  32. data/lib/rubocop/cop/lint/mixed_regexp_capture_types.rb +1 -0
  33. data/lib/rubocop/cop/lint/nested_method_definition.rb +8 -5
  34. data/lib/rubocop/cop/lint/redundant_require_statement.rb +11 -1
  35. data/lib/rubocop/cop/lint/useless_access_modifier.rb +7 -4
  36. data/lib/rubocop/cop/lint/useless_method_definition.rb +3 -3
  37. data/lib/rubocop/cop/lint/useless_rescue.rb +15 -1
  38. data/lib/rubocop/cop/lint/useless_ruby2_keywords.rb +9 -1
  39. data/lib/rubocop/cop/lint/void.rb +19 -10
  40. data/lib/rubocop/cop/metrics/block_length.rb +1 -1
  41. data/lib/rubocop/cop/metrics/block_nesting.rb +1 -1
  42. data/lib/rubocop/cop/metrics/cyclomatic_complexity.rb +1 -1
  43. data/lib/rubocop/cop/metrics/utils/abc_size_calculator.rb +2 -5
  44. data/lib/rubocop/cop/mixin/alignment.rb +1 -1
  45. data/lib/rubocop/cop/mixin/allowed_methods.rb +3 -1
  46. data/lib/rubocop/cop/mixin/comments_help.rb +5 -3
  47. data/lib/rubocop/cop/mixin/hash_shorthand_syntax.rb +51 -25
  48. data/lib/rubocop/cop/mixin/line_length_help.rb +3 -1
  49. data/lib/rubocop/cop/mixin/surrounding_space.rb +3 -3
  50. data/lib/rubocop/cop/mixin/trailing_comma.rb +1 -1
  51. data/lib/rubocop/cop/naming/block_forwarding.rb +4 -0
  52. data/lib/rubocop/cop/naming/class_and_module_camel_case.rb +1 -1
  53. data/lib/rubocop/cop/registry.rb +12 -7
  54. data/lib/rubocop/cop/style/access_modifier_declarations.rb +26 -11
  55. data/lib/rubocop/cop/style/arguments_forwarding.rb +1 -0
  56. data/lib/rubocop/cop/style/block_delimiters.rb +8 -2
  57. data/lib/rubocop/cop/style/class_and_module_children.rb +3 -10
  58. data/lib/rubocop/cop/style/command_literal.rb +1 -1
  59. data/lib/rubocop/cop/style/comparable_clamp.rb +125 -0
  60. data/lib/rubocop/cop/style/conditional_assignment.rb +0 -6
  61. data/lib/rubocop/cop/style/documentation.rb +1 -1
  62. data/lib/rubocop/cop/style/documentation_method.rb +6 -0
  63. data/lib/rubocop/cop/style/infinite_loop.rb +2 -5
  64. data/lib/rubocop/cop/style/invertible_unless_condition.rb +114 -0
  65. data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +11 -5
  66. data/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +2 -0
  67. data/lib/rubocop/cop/style/min_max_comparison.rb +11 -1
  68. data/lib/rubocop/cop/style/multiline_if_modifier.rb +0 -4
  69. data/lib/rubocop/cop/style/multiline_memoization.rb +2 -2
  70. data/lib/rubocop/cop/style/multiline_ternary_operator.rb +18 -3
  71. data/lib/rubocop/cop/style/negated_if_else_condition.rb +1 -5
  72. data/lib/rubocop/cop/style/numbered_parameters_limit.rb +11 -3
  73. data/lib/rubocop/cop/style/one_line_conditional.rb +3 -6
  74. data/lib/rubocop/cop/style/operator_method_call.rb +2 -2
  75. data/lib/rubocop/cop/style/parallel_assignment.rb +3 -1
  76. data/lib/rubocop/cop/style/redundant_condition.rb +16 -1
  77. data/lib/rubocop/cop/style/redundant_conditional.rb +0 -4
  78. data/lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb +16 -10
  79. data/lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb +58 -0
  80. data/lib/rubocop/cop/style/require_order.rb +2 -9
  81. data/lib/rubocop/cop/style/self_assignment.rb +2 -2
  82. data/lib/rubocop/cop/style/semicolon.rb +24 -2
  83. data/lib/rubocop/cop/style/symbol_array.rb +1 -1
  84. data/lib/rubocop/cop/style/word_array.rb +1 -1
  85. data/lib/rubocop/cop/style/yoda_condition.rb +12 -5
  86. data/lib/rubocop/cop/style/yoda_expression.rb +11 -2
  87. data/lib/rubocop/cop/team.rb +19 -14
  88. data/lib/rubocop/cop/variable_force/scope.rb +3 -3
  89. data/lib/rubocop/cop/variable_force/variable_table.rb +3 -1
  90. data/lib/rubocop/cop/variable_force.rb +1 -1
  91. data/lib/rubocop/formatter.rb +0 -1
  92. data/lib/rubocop/options.rb +22 -1
  93. data/lib/rubocop/rspec/expect_offense.rb +6 -4
  94. data/lib/rubocop/runner.rb +40 -4
  95. data/lib/rubocop/server/cache.rb +10 -3
  96. data/lib/rubocop/server/cli.rb +37 -18
  97. data/lib/rubocop/server/client_command/exec.rb +1 -1
  98. data/lib/rubocop/server/client_command/start.rb +6 -1
  99. data/lib/rubocop/server/core.rb +23 -8
  100. data/lib/rubocop/version.rb +1 -1
  101. data/lib/rubocop.rb +4 -0
  102. metadata +11 -27
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.43.0
4
+ version: 1.45.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
8
8
  - Jonas Arvidsson
9
9
  - Yuji Nakayama
10
- autorequire:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2023-01-10 00:00:00.000000000 Z
13
+ date: 2023-02-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
@@ -168,26 +168,6 @@ dependencies:
168
168
  - - "<"
169
169
  - !ruby/object:Gem::Version
170
170
  version: '3.0'
171
- - !ruby/object:Gem::Dependency
172
- name: bundler
173
- requirement: !ruby/object:Gem::Requirement
174
- requirements:
175
- - - ">="
176
- - !ruby/object:Gem::Version
177
- version: 1.15.0
178
- - - "<"
179
- - !ruby/object:Gem::Version
180
- version: '3.0'
181
- type: :development
182
- prerelease: false
183
- version_requirements: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: 1.15.0
188
- - - "<"
189
- - !ruby/object:Gem::Version
190
- version: '3.0'
191
171
  description: |2
192
172
  RuboCop is a Ruby code style checking and code formatting tool.
193
173
  It aims to enforce the community-driven Ruby Style Guide.
@@ -275,6 +255,7 @@ files:
275
255
  - lib/rubocop/cop/force.rb
276
256
  - lib/rubocop/cop/gemspec/dependency_version.rb
277
257
  - lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb
258
+ - lib/rubocop/cop/gemspec/development_dependencies.rb
278
259
  - lib/rubocop/cop/gemspec/duplicated_assignment.rb
279
260
  - lib/rubocop/cop/gemspec/ordered_dependencies.rb
280
261
  - lib/rubocop/cop/gemspec/require_mfa.rb
@@ -692,6 +673,7 @@ files:
692
673
  - lib/rubocop/cop/style/command_literal.rb
693
674
  - lib/rubocop/cop/style/comment_annotation.rb
694
675
  - lib/rubocop/cop/style/commented_keyword.rb
676
+ - lib/rubocop/cop/style/comparable_clamp.rb
695
677
  - lib/rubocop/cop/style/concat_array_literals.rb
696
678
  - lib/rubocop/cop/style/conditional_assignment.rb
697
679
  - lib/rubocop/cop/style/constant_visibility.rb
@@ -753,6 +735,7 @@ files:
753
735
  - lib/rubocop/cop/style/infinite_loop.rb
754
736
  - lib/rubocop/cop/style/inline_comment.rb
755
737
  - lib/rubocop/cop/style/inverse_methods.rb
738
+ - lib/rubocop/cop/style/invertible_unless_condition.rb
756
739
  - lib/rubocop/cop/style/ip_addresses.rb
757
740
  - lib/rubocop/cop/style/keyword_parameters_order.rb
758
741
  - lib/rubocop/cop/style/lambda.rb
@@ -834,6 +817,7 @@ files:
834
817
  - lib/rubocop/cop/style/redundant_fetch_block.rb
835
818
  - lib/rubocop/cop/style/redundant_file_extension_in_require.rb
836
819
  - lib/rubocop/cop/style/redundant_freeze.rb
820
+ - lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb
837
821
  - lib/rubocop/cop/style/redundant_initialize.rb
838
822
  - lib/rubocop/cop/style/redundant_interpolation.rb
839
823
  - lib/rubocop/cop/style/redundant_parentheses.rb
@@ -996,10 +980,10 @@ metadata:
996
980
  homepage_uri: https://rubocop.org/
997
981
  changelog_uri: https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md
998
982
  source_code_uri: https://github.com/rubocop/rubocop/
999
- documentation_uri: https://docs.rubocop.org/rubocop/1.43/
983
+ documentation_uri: https://docs.rubocop.org/rubocop/1.45/
1000
984
  bug_tracker_uri: https://github.com/rubocop/rubocop/issues
1001
985
  rubygems_mfa_required: 'true'
1002
- post_install_message:
986
+ post_install_message:
1003
987
  rdoc_options: []
1004
988
  require_paths:
1005
989
  - lib
@@ -1014,8 +998,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1014
998
  - !ruby/object:Gem::Version
1015
999
  version: '0'
1016
1000
  requirements: []
1017
- rubygems_version: 3.1.2
1018
- signing_key:
1001
+ rubygems_version: 3.3.7
1002
+ signing_key:
1019
1003
  specification_version: 4
1020
1004
  summary: Automatic Ruby code style checking tool.
1021
1005
  test_files: []