diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 314ef7f..a94359b 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,12 +1,12 @@ # This configuration was generated by -# `rubocop --auto-gen-config` -# on 2026-03-05 21:23:51 UTC using RuboCop version 1.85.1. +# `rubocop --auto-gen-config --exclude-limit 10000` +# on 2026-06-25 22:45:42 UTC using RuboCop version 1.88.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 8 +# Offense count: 10 # Configuration parameters: EnforcedStyle, AllowedGems. # SupportedStyles: Gemfile, gems.rb, gemspec Gemspec/DevelopmentDependencies: @@ -31,8 +31,3 @@ RSpec/ContextWording: - 'spec/rubocop/cop/packs/typed_public_apis_spec.rb' - 'spec/rubocop/cop/packwerk_lite/dependency_checker_spec.rb' - 'spec/rubocop/cop/packwerk_lite/privacy_checker_spec.rb' - -# Offense count: 1 -Style/Send: - Exclude: - - 'lib/rubocop/packs/inject.rb' diff --git a/Gemfile.lock b/Gemfile.lock index cf7f4dc..521faef 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -28,12 +28,10 @@ GEM securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) uri (>= 0.13.1) - addressable (2.9.0) - public_suffix (>= 2.0.2, < 8.0) ast (2.4.3) base64 (0.3.0) benchmark (0.5.0) - bigdecimal (4.0.1) + bigdecimal (4.1.2) concurrent-ruby (1.3.6) connection_pool (3.0.2) diff-lcs (1.6.2) @@ -42,42 +40,36 @@ GEM erubi (1.13.1) i18n (1.14.8) concurrent-ruby (~> 1.0) - json (2.19.9) - json-schema (6.1.0) - addressable (~> 2.8) - bigdecimal (>= 3.1, < 5) + json (2.20.0) language_server-protocol (3.17.0.5) lint_roller (1.1.0) logger (1.7.0) - mcp (0.9.2) - json-schema (>= 4.1) minitest (6.0.2) drb (~> 2.0) prism (~> 1.5) netrc (0.11.0) packs-specification (0.0.11) sorbet-runtime - parallel (1.27.0) + parallel (2.1.0) parse_packwerk (0.27.0) bigdecimal sorbet-runtime - parser (3.3.10.2) + parser (3.3.11.1) ast (~> 2.4.1) racc prism (1.9.0) - public_suffix (7.0.5) racc (1.8.1) rainbow (3.1.1) - rake (13.3.1) - rbi (0.3.9) + rake (13.4.2) + rbi (0.3.14) prism (~> 1.0) - rbs (>= 3.4.4) - rbs (4.0.0.dev.5) + rbs (>= 4.0.1) + rbs (4.1.0.pre.2) logger - prism (>= 1.3.0) + prism (>= 1.6.0) tsort - regexp_parser (2.11.3) - require-hooks (0.2.3) + regexp_parser (2.12.0) + require-hooks (0.4.0) rexml (3.4.4) rspec (3.13.2) rspec-core (~> 3.13.0) @@ -92,26 +84,25 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.7) - rubocop (1.85.1) + rubocop (1.88.0) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) - mcp (~> 0.6) - parallel (~> 1.10) + parallel (>= 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.49.0) + rubocop-ast (1.49.1) parser (>= 3.3.7.2) prism (~> 1.7) rubocop-extension-generator (0.6.2) activesupport bundler rubocop (>= 1.72.2) - rubocop-gusto (10.6.0) + rubocop-gusto (11.1.1) lint_roller rubocop (>= 1.76) rubocop-performance @@ -126,13 +117,17 @@ GEM rubocop-rake (0.7.1) lint_roller (~> 1.1) rubocop (>= 1.72.1) - rubocop-rspec (3.9.0) + rubocop-rspec (3.10.2) lint_roller (~> 1.1) - rubocop (~> 1.81) + regexp_parser (>= 2.0) + rubocop (~> 1.86, >= 1.86.2) rubocop-sorbet (0.12.0) lint_roller rubocop (>= 1.75.2) ruby-progressbar (1.13.0) + rubydex (0.2.6-arm64-darwin) + rubydex (0.2.6-x86_64-darwin) + rubydex (0.2.6-x86_64-linux) securerandom (0.4.1) simplecov (0.22.0) docile (~> 1.1) @@ -140,33 +135,34 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.13.2) simplecov_json_formatter (0.1.4) - sorbet (0.6.12992) - sorbet-static (= 0.6.12992) - sorbet-runtime (0.6.12992) - sorbet-static (0.6.12992-universal-darwin) - sorbet-static (0.6.12992-x86_64-linux) - sorbet-static-and-runtime (0.6.12992) - sorbet (= 0.6.12992) - sorbet-runtime (= 0.6.12992) - spoom (1.7.11) + sorbet (0.6.13312) + sorbet-static (= 0.6.13312) + sorbet-runtime (0.6.13312) + sorbet-static (0.6.13312-universal-darwin) + sorbet-static (0.6.13312-x86_64-linux) + sorbet-static-and-runtime (0.6.13312) + sorbet (= 0.6.13312) + sorbet-runtime (= 0.6.13312) + spoom (1.8.2) erubi (>= 1.10.0) prism (>= 0.28.0) - rbi (>= 0.3.3) - rbs (>= 4.0.0.dev.4) + rbi (>= 0.3.14) + rbs (>= 4.0.0.dev.5) rexml (>= 3.2.6) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) - tapioca (0.17.10) + tapioca (0.19.2) benchmark bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) rbi (>= 0.3.7) require-hooks (>= 0.2.2) - sorbet-static-and-runtime (>= 0.5.11087) - spoom (>= 1.7.9) + rubydex (>= 0.1.0.beta10) + sorbet-static-and-runtime (>= 0.6.12698) + spoom (>= 1.7.16) thor (>= 1.2.0) - yard-sorbet + tsort thor (1.5.0) tsort (0.2.0) tzinfo (2.0.6) @@ -176,9 +172,6 @@ GEM unicode-emoji (4.2.0) uri (1.1.1) yard (0.9.44) - yard-sorbet (0.9.0) - sorbet-runtime - yard PLATFORMS universal-darwin @@ -195,6 +188,7 @@ DEPENDENCIES simplecov sorbet tapioca + yard BUNDLED WITH 4.0.15 diff --git a/lib/rubocop/cop/packs/root_namespace_is_pack_name.rb b/lib/rubocop/cop/packs/root_namespace_is_pack_name.rb index e02a3d3..a944282 100644 --- a/lib/rubocop/cop/packs/root_namespace_is_pack_name.rb +++ b/lib/rubocop/cop/packs/root_namespace_is_pack_name.rb @@ -68,10 +68,10 @@ def on_new_investigation source_range(processed_source.buffer, 1, 0), message: format( 'Based on the filepath, this file defines `%{current_fully_qualified_constant}`, but it should be namespaced as `%{expected_namespace}::%{current_fully_qualified_constant}` with path `%{expected_path}`.', - package_name: package_name, - expected_namespace: expected_namespace, + package_name:, + expected_namespace:, expected_path: relative_desired_path, - current_fully_qualified_constant: current_fully_qualified_constant + current_fully_qualified_constant: ) ) end diff --git a/lib/rubocop/cop/packwerk_lite/constant_resolver.rb b/lib/rubocop/cop/packwerk_lite/constant_resolver.rb index 6be5d24..f03ba35 100644 --- a/lib/rubocop/cop/packwerk_lite/constant_resolver.rb +++ b/lib/rubocop/cop/packwerk_lite/constant_resolver.rb @@ -71,8 +71,8 @@ def self.resolve(node, processed_source) found_file = found_files.first ConstantReference.new( - constant_name: constant_name, - global_namespace: global_namespace, + constant_name:, + global_namespace:, source_package: expected_containing_pack, constant_definition_location: T.must(found_file), referencing_file: Pathname.new(processed_source.path).relative_path_from(Pathname.pwd) diff --git a/rubocop-packs.gemspec b/rubocop-packs.gemspec index 89b3df7..1e28729 100644 --- a/rubocop-packs.gemspec +++ b/rubocop-packs.gemspec @@ -45,4 +45,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'simplecov' spec.add_development_dependency 'sorbet' spec.add_development_dependency 'tapioca' + spec.add_development_dependency 'yard' end