rubocop 1.60.2 → 1.62.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 (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/output.css.erb +159 -0
  4. data/assets/output.html.erb +1 -160
  5. data/config/default.yml +41 -12
  6. data/lib/rubocop/cli/command/lsp.rb +2 -2
  7. data/lib/rubocop/cli.rb +6 -1
  8. data/lib/rubocop/config.rb +4 -0
  9. data/lib/rubocop/config_finder.rb +12 -2
  10. data/lib/rubocop/config_validator.rb +14 -5
  11. data/lib/rubocop/cop/autocorrect_logic.rb +6 -1
  12. data/lib/rubocop/cop/base.rb +17 -8
  13. data/lib/rubocop/cop/correctors/each_to_for_corrector.rb +4 -8
  14. data/lib/rubocop/cop/correctors/for_to_each_corrector.rb +5 -13
  15. data/lib/rubocop/cop/gemspec/required_ruby_version.rb +2 -0
  16. data/lib/rubocop/cop/internal_affairs/method_name_end_with.rb +8 -6
  17. data/lib/rubocop/cop/internal_affairs/redundant_expect_offense_arguments.rb +34 -0
  18. data/lib/rubocop/cop/internal_affairs.rb +1 -0
  19. data/lib/rubocop/cop/layout/end_alignment.rb +3 -1
  20. data/lib/rubocop/cop/layout/redundant_line_break.rb +3 -1
  21. data/lib/rubocop/cop/layout/space_before_block_braces.rb +19 -10
  22. data/lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb +1 -1
  23. data/lib/rubocop/cop/lint/empty_conditional_body.rb +1 -1
  24. data/lib/rubocop/cop/lint/redundant_safe_navigation.rb +14 -9
  25. data/lib/rubocop/cop/lint/rescue_type.rb +1 -3
  26. data/lib/rubocop/cop/lint/script_permission.rb +3 -3
  27. data/lib/rubocop/cop/lint/syntax.rb +1 -1
  28. data/lib/rubocop/cop/lint/to_enum_arguments.rb +7 -2
  29. data/lib/rubocop/cop/lint/void.rb +6 -1
  30. data/lib/rubocop/cop/naming/predicate_name.rb +2 -2
  31. data/lib/rubocop/cop/registry.rb +1 -1
  32. data/lib/rubocop/cop/style/arguments_forwarding.rb +29 -8
  33. data/lib/rubocop/cop/style/case_like_if.rb +1 -1
  34. data/lib/rubocop/cop/style/commented_keyword.rb +5 -2
  35. data/lib/rubocop/cop/style/conditional_assignment.rb +4 -5
  36. data/lib/rubocop/cop/style/hash_syntax.rb +6 -2
  37. data/lib/rubocop/cop/style/inverse_methods.rb +8 -8
  38. data/lib/rubocop/cop/style/invertible_unless_condition.rb +10 -5
  39. data/lib/rubocop/cop/style/map_compact_with_conditional_block.rb +5 -8
  40. data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +1 -1
  41. data/lib/rubocop/cop/style/multiline_ternary_operator.rb +4 -0
  42. data/lib/rubocop/cop/style/object_then.rb +5 -3
  43. data/lib/rubocop/cop/style/parallel_assignment.rb +1 -3
  44. data/lib/rubocop/cop/style/raise_args.rb +3 -0
  45. data/lib/rubocop/cop/style/redundant_argument.rb +2 -2
  46. data/lib/rubocop/cop/style/redundant_assignment.rb +10 -2
  47. data/lib/rubocop/cop/style/redundant_line_continuation.rb +17 -6
  48. data/lib/rubocop/cop/style/redundant_return.rb +6 -0
  49. data/lib/rubocop/cop/style/sample.rb +1 -3
  50. data/lib/rubocop/cops_documentation_generator.rb +4 -2
  51. data/lib/rubocop/formatter/html_formatter.rb +30 -10
  52. data/lib/rubocop/formatter/offense_count_formatter.rb +12 -2
  53. data/lib/rubocop/lsp/logger.rb +1 -1
  54. data/lib/rubocop/lsp/routes.rb +1 -1
  55. data/lib/rubocop/lsp/runtime.rb +1 -1
  56. data/lib/rubocop/lsp/server.rb +5 -2
  57. data/lib/rubocop/lsp/severity.rb +1 -1
  58. data/lib/rubocop/lsp.rb +29 -0
  59. data/lib/rubocop/magic_comment.rb +1 -1
  60. data/lib/rubocop/options.rb +11 -0
  61. data/lib/rubocop/path_util.rb +6 -2
  62. data/lib/rubocop/rspec/cop_helper.rb +8 -2
  63. data/lib/rubocop/rspec/expect_offense.rb +1 -1
  64. data/lib/rubocop/rspec/shared_contexts.rb +36 -17
  65. data/lib/rubocop/rspec/support.rb +2 -1
  66. data/lib/rubocop/runner.rb +9 -2
  67. data/lib/rubocop/target_finder.rb +84 -78
  68. data/lib/rubocop/target_ruby.rb +82 -80
  69. data/lib/rubocop/version.rb +18 -3
  70. metadata +9 -6
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.60.2
4
+ version: 1.62.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2024-01-24 00:00:00.000000000 Z
13
+ date: 2024-03-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
@@ -134,7 +134,7 @@ dependencies:
134
134
  requirements:
135
135
  - - ">="
136
136
  - !ruby/object:Gem::Version
137
- version: 1.30.0
137
+ version: 1.31.1
138
138
  - - "<"
139
139
  - !ruby/object:Gem::Version
140
140
  version: '2.0'
@@ -144,7 +144,7 @@ dependencies:
144
144
  requirements:
145
145
  - - ">="
146
146
  - !ruby/object:Gem::Version
147
- version: 1.30.0
147
+ version: 1.31.1
148
148
  - - "<"
149
149
  - !ruby/object:Gem::Version
150
150
  version: '2.0'
@@ -196,6 +196,7 @@ files:
196
196
  - LICENSE.txt
197
197
  - README.md
198
198
  - assets/logo.png
199
+ - assets/output.css.erb
199
200
  - assets/output.html.erb
200
201
  - config/default.yml
201
202
  - config/obsoletion.yml
@@ -302,6 +303,7 @@ files:
302
303
  - lib/rubocop/cop/internal_affairs/processed_source_buffer_name.rb
303
304
  - lib/rubocop/cop/internal_affairs/redundant_context_config_parameter.rb
304
305
  - lib/rubocop/cop/internal_affairs/redundant_described_class_as_subject.rb
306
+ - lib/rubocop/cop/internal_affairs/redundant_expect_offense_arguments.rb
305
307
  - lib/rubocop/cop/internal_affairs/redundant_let_rubocop_config_new.rb
306
308
  - lib/rubocop/cop/internal_affairs/redundant_location_argument.rb
307
309
  - lib/rubocop/cop/internal_affairs/redundant_message_argument.rb
@@ -978,6 +980,7 @@ files:
978
980
  - lib/rubocop/formatter/text_util.rb
979
981
  - lib/rubocop/formatter/worst_offenders_formatter.rb
980
982
  - lib/rubocop/lockfile.rb
983
+ - lib/rubocop/lsp.rb
981
984
  - lib/rubocop/lsp/logger.rb
982
985
  - lib/rubocop/lsp/routes.rb
983
986
  - lib/rubocop/lsp/runtime.rb
@@ -1028,9 +1031,9 @@ licenses:
1028
1031
  - MIT
1029
1032
  metadata:
1030
1033
  homepage_uri: https://rubocop.org/
1031
- changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.60.2
1034
+ changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.62.0
1032
1035
  source_code_uri: https://github.com/rubocop/rubocop/
1033
- documentation_uri: https://docs.rubocop.org/rubocop/1.60/
1036
+ documentation_uri: https://docs.rubocop.org/rubocop/1.62/
1034
1037
  bug_tracker_uri: https://github.com/rubocop/rubocop/issues
1035
1038
  rubygems_mfa_required: 'true'
1036
1039
  post_install_message: