rubocop 1.73.0 → 1.74.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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/config/default.yml +35 -4
  4. data/config/internal_affairs.yml +4 -0
  5. data/lib/rubocop/config_loader.rb +0 -1
  6. data/lib/rubocop/config_loader_resolver.rb +2 -1
  7. data/lib/rubocop/config_obsoletion/extracted_cop.rb +4 -3
  8. data/lib/rubocop/config_obsoletion.rb +1 -1
  9. data/lib/rubocop/cop/internal_affairs/example_description.rb +3 -1
  10. data/lib/rubocop/cop/internal_affairs/node_type_group.rb +91 -0
  11. data/lib/rubocop/cop/internal_affairs.rb +1 -0
  12. data/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb +4 -4
  13. data/lib/rubocop/cop/lint/empty_conditional_body.rb +14 -64
  14. data/lib/rubocop/cop/lint/erb_new_arguments.rb +0 -6
  15. data/lib/rubocop/cop/lint/literal_as_condition.rb +13 -16
  16. data/lib/rubocop/cop/lint/mixed_case_range.rb +1 -1
  17. data/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +2 -2
  18. data/lib/rubocop/cop/lint/redundant_type_conversion.rb +9 -3
  19. data/lib/rubocop/cop/lint/return_in_void_context.rb +4 -11
  20. data/lib/rubocop/cop/lint/shared_mutable_default.rb +12 -1
  21. data/lib/rubocop/cop/lint/useless_constant_scoping.rb +2 -11
  22. data/lib/rubocop/cop/mixin/check_single_line_suitability.rb +1 -1
  23. data/lib/rubocop/cop/mixin/range_help.rb +12 -0
  24. data/lib/rubocop/cop/mixin/target_ruby_version.rb +1 -1
  25. data/lib/rubocop/cop/style/class_and_module_children.rb +29 -7
  26. data/lib/rubocop/cop/style/commented_keyword.rb +10 -3
  27. data/lib/rubocop/cop/style/comparable_between.rb +75 -0
  28. data/lib/rubocop/cop/style/double_negation.rb +1 -1
  29. data/lib/rubocop/cop/style/expand_path_arguments.rb +2 -7
  30. data/lib/rubocop/cop/style/exponential_notation.rb +2 -2
  31. data/lib/rubocop/cop/style/format_string_token.rb +38 -11
  32. data/lib/rubocop/cop/style/if_unless_modifier.rb +2 -2
  33. data/lib/rubocop/cop/style/inverse_methods.rb +8 -5
  34. data/lib/rubocop/cop/style/keyword_parameters_order.rb +13 -7
  35. data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +3 -3
  36. data/lib/rubocop/cop/style/multiline_block_chain.rb +1 -1
  37. data/lib/rubocop/cop/style/multiline_method_signature.rb +1 -9
  38. data/lib/rubocop/cop/style/redundant_condition.rb +11 -0
  39. data/lib/rubocop/cop/style/redundant_current_directory_in_path.rb +14 -4
  40. data/lib/rubocop/cop/style/redundant_freeze.rb +1 -1
  41. data/lib/rubocop/cop/style/rescue_modifier.rb +3 -0
  42. data/lib/rubocop/cop/style/sole_nested_conditional.rb +0 -6
  43. data/lib/rubocop/cop/utils/format_string.rb +5 -2
  44. data/lib/rubocop/directive_comment.rb +1 -1
  45. data/lib/rubocop/ext/regexp_node.rb +0 -1
  46. data/lib/rubocop/version.rb +1 -1
  47. data/lib/rubocop.rb +1 -0
  48. metadata +6 -4
@@ -43,7 +43,6 @@ module RuboCop
43
43
  def named_capturing?(exp, event, named)
44
44
  event == :enter &&
45
45
  named == exp.respond_to?(:name) &&
46
- !exp.text.start_with?('(?<=') &&
47
46
  exp.respond_to?(:capturing?) &&
48
47
  exp.capturing?
49
48
  end
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  # This module holds the RuboCop version information.
5
5
  module Version
6
- STRING = '1.73.0'
6
+ STRING = '1.74.0'
7
7
 
8
8
  MSG = '%<version>s (using %<parser_version>s, ' \
9
9
  'rubocop-ast %<rubocop_ast_version>s, ' \
data/lib/rubocop.rb CHANGED
@@ -509,6 +509,7 @@ require_relative 'rubocop/cop/style/combinable_loops'
509
509
  require_relative 'rubocop/cop/style/command_literal'
510
510
  require_relative 'rubocop/cop/style/comment_annotation'
511
511
  require_relative 'rubocop/cop/style/commented_keyword'
512
+ require_relative 'rubocop/cop/style/comparable_between'
512
513
  require_relative 'rubocop/cop/style/comparable_clamp'
513
514
  require_relative 'rubocop/cop/style/concat_array_literals'
514
515
  require_relative 'rubocop/cop/style/conditional_assignment'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.73.0
4
+ version: 1.74.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
@@ -9,7 +9,7 @@ authors:
9
9
  - Yuji Nakayama
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2025-02-26 00:00:00.000000000 Z
12
+ date: 2025-03-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -297,6 +297,7 @@ files:
297
297
  - lib/rubocop/cop/internal_affairs/node_pattern_groups.rb
298
298
  - lib/rubocop/cop/internal_affairs/node_pattern_groups/ast_processor.rb
299
299
  - lib/rubocop/cop/internal_affairs/node_pattern_groups/ast_walker.rb
300
+ - lib/rubocop/cop/internal_affairs/node_type_group.rb
300
301
  - lib/rubocop/cop/internal_affairs/node_type_multiple_predicates.rb
301
302
  - lib/rubocop/cop/internal_affairs/node_type_predicate.rb
302
303
  - lib/rubocop/cop/internal_affairs/numblock_handler.rb
@@ -728,6 +729,7 @@ files:
728
729
  - lib/rubocop/cop/style/command_literal.rb
729
730
  - lib/rubocop/cop/style/comment_annotation.rb
730
731
  - lib/rubocop/cop/style/commented_keyword.rb
732
+ - lib/rubocop/cop/style/comparable_between.rb
731
733
  - lib/rubocop/cop/style/comparable_clamp.rb
732
734
  - lib/rubocop/cop/style/concat_array_literals.rb
733
735
  - lib/rubocop/cop/style/conditional_assignment.rb
@@ -1074,9 +1076,9 @@ licenses:
1074
1076
  - MIT
1075
1077
  metadata:
1076
1078
  homepage_uri: https://rubocop.org/
1077
- changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.73.0
1079
+ changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.74.0
1078
1080
  source_code_uri: https://github.com/rubocop/rubocop/
1079
- documentation_uri: https://docs.rubocop.org/rubocop/1.73/
1081
+ documentation_uri: https://docs.rubocop.org/rubocop/1.74/
1080
1082
  bug_tracker_uri: https://github.com/rubocop/rubocop/issues
1081
1083
  rubygems_mfa_required: 'true'
1082
1084
  rdoc_options: []