rubocop 1.50.2 → 1.52.1

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 (88) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/config/default.yml +38 -5
  4. data/lib/rubocop/config.rb +4 -0
  5. data/lib/rubocop/config_obsoletion.rb +2 -2
  6. data/lib/rubocop/cop/base.rb +5 -1
  7. data/lib/rubocop/cop/correctors/alignment_corrector.rb +1 -1
  8. data/lib/rubocop/cop/gemspec/development_dependencies.rb +1 -1
  9. data/lib/rubocop/cop/internal_affairs/cop_description.rb +32 -8
  10. data/lib/rubocop/cop/internal_affairs/node_matcher_directive.rb +2 -2
  11. data/lib/rubocop/cop/layout/closing_heredoc_indentation.rb +0 -1
  12. data/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +2 -2
  13. data/lib/rubocop/cop/layout/space_inside_block_braces.rb +2 -0
  14. data/lib/rubocop/cop/lint/ambiguous_block_association.rb +13 -1
  15. data/lib/rubocop/cop/lint/erb_new_arguments.rb +3 -4
  16. data/lib/rubocop/cop/lint/identity_comparison.rb +0 -1
  17. data/lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb +5 -3
  18. data/lib/rubocop/cop/lint/inherit_exception.rb +9 -0
  19. data/lib/rubocop/cop/lint/lambda_without_literal_block.rb +1 -1
  20. data/lib/rubocop/cop/lint/missing_super.rb +3 -0
  21. data/lib/rubocop/cop/lint/numbered_parameter_assignment.rb +2 -2
  22. data/lib/rubocop/cop/lint/ordered_magic_comments.rb +0 -1
  23. data/lib/rubocop/cop/lint/out_of_range_regexp_ref.rb +2 -2
  24. data/lib/rubocop/cop/lint/redundant_string_coercion.rb +1 -1
  25. data/lib/rubocop/cop/lint/send_with_mixin_argument.rb +1 -2
  26. data/lib/rubocop/cop/lint/shadowed_exception.rb +5 -11
  27. data/lib/rubocop/cop/lint/top_level_return_with_argument.rb +23 -9
  28. data/lib/rubocop/cop/lint/useless_assignment.rb +59 -1
  29. data/lib/rubocop/cop/lint/void.rb +62 -6
  30. data/lib/rubocop/cop/metrics/utils/abc_size_calculator.rb +1 -2
  31. data/lib/rubocop/cop/mixin/allowed_receivers.rb +34 -0
  32. data/lib/rubocop/cop/mixin/comments_help.rb +6 -2
  33. data/lib/rubocop/cop/mixin/space_after_punctuation.rb +1 -1
  34. data/lib/rubocop/cop/naming/constant_name.rb +1 -1
  35. data/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +22 -7
  36. data/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb +11 -3
  37. data/lib/rubocop/cop/naming/variable_name.rb +6 -1
  38. data/lib/rubocop/cop/style/accessor_grouping.rb +5 -1
  39. data/lib/rubocop/cop/style/attr.rb +11 -1
  40. data/lib/rubocop/cop/style/begin_block.rb +1 -2
  41. data/lib/rubocop/cop/style/class_and_module_children.rb +1 -1
  42. data/lib/rubocop/cop/style/class_equality_comparison.rb +17 -39
  43. data/lib/rubocop/cop/style/collection_compact.rb +16 -6
  44. data/lib/rubocop/cop/style/colon_method_call.rb +2 -2
  45. data/lib/rubocop/cop/style/combinable_loops.rb +26 -6
  46. data/lib/rubocop/cop/style/conditional_assignment.rb +2 -2
  47. data/lib/rubocop/cop/style/copyright.rb +5 -2
  48. data/lib/rubocop/cop/style/dir.rb +1 -1
  49. data/lib/rubocop/cop/style/dir_empty.rb +8 -14
  50. data/lib/rubocop/cop/style/documentation.rb +1 -1
  51. data/lib/rubocop/cop/style/eval_with_location.rb +5 -5
  52. data/lib/rubocop/cop/style/exact_regexp_match.rb +68 -0
  53. data/lib/rubocop/cop/style/file_read.rb +2 -2
  54. data/lib/rubocop/cop/style/guard_clause.rb +2 -0
  55. data/lib/rubocop/cop/style/hash_each_methods.rb +1 -22
  56. data/lib/rubocop/cop/style/hash_except.rb +19 -8
  57. data/lib/rubocop/cop/style/hash_transform_keys.rb +2 -2
  58. data/lib/rubocop/cop/style/hash_transform_values.rb +2 -2
  59. data/lib/rubocop/cop/style/if_inside_else.rb +6 -0
  60. data/lib/rubocop/cop/style/if_unless_modifier.rb +3 -0
  61. data/lib/rubocop/cop/style/invertible_unless_condition.rb +9 -5
  62. data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +1 -2
  63. data/lib/rubocop/cop/style/multiple_comparison.rb +14 -0
  64. data/lib/rubocop/cop/style/numeric_literals.rb +1 -1
  65. data/lib/rubocop/cop/style/percent_literal_delimiters.rb +1 -1
  66. data/lib/rubocop/cop/style/redundant_array_constructor.rb +77 -0
  67. data/lib/rubocop/cop/style/redundant_filter_chain.rb +101 -0
  68. data/lib/rubocop/cop/style/redundant_line_continuation.rb +5 -1
  69. data/lib/rubocop/cop/style/redundant_regexp_constructor.rb +46 -0
  70. data/lib/rubocop/cop/style/regexp_literal.rb +11 -2
  71. data/lib/rubocop/cop/style/require_order.rb +11 -5
  72. data/lib/rubocop/cop/style/rescue_modifier.rb +1 -3
  73. data/lib/rubocop/cop/style/select_by_regexp.rb +15 -5
  74. data/lib/rubocop/cop/style/semicolon.rb +12 -1
  75. data/lib/rubocop/cop/style/single_line_methods.rb +1 -1
  76. data/lib/rubocop/cop/style/sole_nested_conditional.rb +3 -1
  77. data/lib/rubocop/cop/style/special_global_vars.rb +3 -4
  78. data/lib/rubocop/cop/team.rb +1 -1
  79. data/lib/rubocop/cop/variable_force/assignment.rb +33 -1
  80. data/lib/rubocop/cop/variable_force/variable_table.rb +2 -2
  81. data/lib/rubocop/cop/variable_force.rb +1 -0
  82. data/lib/rubocop/result_cache.rb +1 -1
  83. data/lib/rubocop/rspec/cop_helper.rb +1 -1
  84. data/lib/rubocop/server/client_command/exec.rb +2 -1
  85. data/lib/rubocop/target_ruby.rb +3 -2
  86. data/lib/rubocop/version.rb +10 -6
  87. data/lib/rubocop.rb +5 -0
  88. metadata +15 -10
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.50.2
4
+ version: 1.52.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-04-17 00:00:00.000000000 Z
13
+ date: 2023-06-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
@@ -46,14 +46,14 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 3.2.0.0
49
+ version: 3.2.2.3
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: 3.2.0.0
56
+ version: 3.2.2.3
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: rainbow
59
59
  requirement: !ruby/object:Gem::Requirement
@@ -550,6 +550,7 @@ files:
550
550
  - lib/rubocop/cop/mixin/allowed_identifiers.rb
551
551
  - lib/rubocop/cop/mixin/allowed_methods.rb
552
552
  - lib/rubocop/cop/mixin/allowed_pattern.rb
553
+ - lib/rubocop/cop/mixin/allowed_receivers.rb
553
554
  - lib/rubocop/cop/mixin/annotation_comment.rb
554
555
  - lib/rubocop/cop/mixin/array_min_size.rb
555
556
  - lib/rubocop/cop/mixin/array_syntax.rb
@@ -710,6 +711,7 @@ files:
710
711
  - lib/rubocop/cop/style/env_home.rb
711
712
  - lib/rubocop/cop/style/eval_with_location.rb
712
713
  - lib/rubocop/cop/style/even_odd.rb
714
+ - lib/rubocop/cop/style/exact_regexp_match.rb
713
715
  - lib/rubocop/cop/style/expand_path_arguments.rb
714
716
  - lib/rubocop/cop/style/explicit_block_argument.rb
715
717
  - lib/rubocop/cop/style/exponential_notation.rb
@@ -814,6 +816,7 @@ files:
814
816
  - lib/rubocop/cop/style/raise_args.rb
815
817
  - lib/rubocop/cop/style/random_with_offset.rb
816
818
  - lib/rubocop/cop/style/redundant_argument.rb
819
+ - lib/rubocop/cop/style/redundant_array_constructor.rb
817
820
  - lib/rubocop/cop/style/redundant_assignment.rb
818
821
  - lib/rubocop/cop/style/redundant_begin.rb
819
822
  - lib/rubocop/cop/style/redundant_capital_w.rb
@@ -825,6 +828,7 @@ files:
825
828
  - lib/rubocop/cop/style/redundant_exception.rb
826
829
  - lib/rubocop/cop/style/redundant_fetch_block.rb
827
830
  - lib/rubocop/cop/style/redundant_file_extension_in_require.rb
831
+ - lib/rubocop/cop/style/redundant_filter_chain.rb
828
832
  - lib/rubocop/cop/style/redundant_freeze.rb
829
833
  - lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb
830
834
  - lib/rubocop/cop/style/redundant_initialize.rb
@@ -833,6 +837,7 @@ files:
833
837
  - lib/rubocop/cop/style/redundant_parentheses.rb
834
838
  - lib/rubocop/cop/style/redundant_percent_q.rb
835
839
  - lib/rubocop/cop/style/redundant_regexp_character_class.rb
840
+ - lib/rubocop/cop/style/redundant_regexp_constructor.rb
836
841
  - lib/rubocop/cop/style/redundant_regexp_escape.rb
837
842
  - lib/rubocop/cop/style/redundant_return.rb
838
843
  - lib/rubocop/cop/style/redundant_self.rb
@@ -991,10 +996,10 @@ metadata:
991
996
  homepage_uri: https://rubocop.org/
992
997
  changelog_uri: https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md
993
998
  source_code_uri: https://github.com/rubocop/rubocop/
994
- documentation_uri: https://docs.rubocop.org/rubocop/1.50/
999
+ documentation_uri: https://docs.rubocop.org/rubocop/1.52/
995
1000
  bug_tracker_uri: https://github.com/rubocop/rubocop/issues
996
1001
  rubygems_mfa_required: 'true'
997
- post_install_message:
1002
+ post_install_message:
998
1003
  rdoc_options: []
999
1004
  require_paths:
1000
1005
  - lib
@@ -1002,15 +1007,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
1002
1007
  requirements:
1003
1008
  - - ">="
1004
1009
  - !ruby/object:Gem::Version
1005
- version: 2.6.0
1010
+ version: 2.7.0
1006
1011
  required_rubygems_version: !ruby/object:Gem::Requirement
1007
1012
  requirements:
1008
1013
  - - ">="
1009
1014
  - !ruby/object:Gem::Version
1010
1015
  version: '0'
1011
1016
  requirements: []
1012
- rubygems_version: 3.4.6
1013
- signing_key:
1017
+ rubygems_version: 3.3.7
1018
+ signing_key:
1014
1019
  specification_version: 4
1015
1020
  summary: Automatic Ruby code style checking tool.
1016
1021
  test_files: []