From 32233f5359567f7846045ab244978ddc9d36d1cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Aug 2026 00:14:59 +0000 Subject: [PATCH 1/2] Bump rubocop from 1.89.0 to 1.90.0 in the minor-and-patch group Bumps the minor-and-patch group with 1 update: [rubocop](https://github.com/rubocop/rubocop). Updates `rubocop` from 1.89.0 to 1.90.0 - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.89.0...v1.90.0) --- updated-dependencies: - dependency-name: rubocop dependency-version: 1.90.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 05d39dd..939edb5 100644 --- a/Gemfile +++ b/Gemfile @@ -8,6 +8,6 @@ gem 'kramdown', '~> 2.5.2' gem 'minitest', '~> 5.25' gem 'rake', '~> 13.2' gem 'rspec', '~> 3.13' -gem 'rubocop', '~> 1.80' +gem 'rubocop', '~> 1.90' gem 'simplecov', '~> 0.22', require: false gem 'yard', '~> 0.9.45' diff --git a/Gemfile.lock b/Gemfile.lock index 5df65cd..67c8c4c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,8 +42,8 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.7) - rubocop (1.89.0) - json (~> 2.3) + rubocop (1.90.0) + json (>= 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) parallel (>= 1.10) @@ -78,7 +78,7 @@ DEPENDENCIES minitest (~> 5.25) rake (~> 13.2) rspec (~> 3.13) - rubocop (~> 1.80) + rubocop (~> 1.90) simplecov (~> 0.22) yard (~> 0.9.45) @@ -106,7 +106,7 @@ CHECKSUMS rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836 rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47 rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c - rubocop (1.89.0) sha256=4dee8e3ee9c45e474834efd9e8d6fd031e8331c8dacdff0de4ad65ae0a6faae7 + rubocop (1.90.0) sha256=9eb4c065b5c5154e4ef554c547972f3905a9eb6b53e657e580b6796b54bf8242 rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33 simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5 From bdd47f335b83cf56de1a6f87806820ca98452177 Mon Sep 17 00:00:00 2001 From: TristanKruse Date: Fri, 16 Oct 2026 10:31:29 +0200 Subject: [PATCH 2/2] Adapt suppression directives to RuboCop 1.90 --- lib/archunit/files/extraction/file_info.rb | 3 +-- lib/archunit/graph/projection/graph_query_options.rb | 3 +-- lib/archunit/metrics/extraction/extract_distance_info.rb | 3 +-- lib/archunit/metrics/extraction/extract_project_info.rb | 3 +-- lib/archunit/metrics/extraction/metric_info.rb | 6 ++---- lib/archunit/metrics/extraction/source_metrics_visitor.rb | 6 ++---- lib/archunit/testing/rspec_adapter.rb | 3 +-- spec/metrics/calculation/distance_spec.rb | 3 +-- spec/metrics/fluentapi/metrics_spec.rb | 6 ++---- 9 files changed, 12 insertions(+), 24 deletions(-) diff --git a/lib/archunit/files/extraction/file_info.rb b/lib/archunit/files/extraction/file_info.rb index 21021c8..12e0bab 100644 --- a/lib/archunit/files/extraction/file_info.rb +++ b/lib/archunit/files/extraction/file_info.rb @@ -8,7 +8,7 @@ module Extraction FileInfo = Data.define( :path, :name, :extension, :directory, :content, :lines_of_code ) do - # rubocop:disable Metrics/ParameterLists -- FileInfo has six required public fields. + # rubocop:disable-next Metrics/ParameterLists -- FileInfo has six required public fields. def initialize(path:, name:, extension:, directory:, content:, lines_of_code:) path = immutable_string(path, :path, allow_empty: false, normalize_path: true) name = immutable_string(name, :name, allow_empty: false) @@ -20,7 +20,6 @@ def initialize(path:, name:, extension:, directory:, content:, lines_of_code:) lines_of_code = non_negative_integer(lines_of_code) super end - # rubocop:enable Metrics/ParameterLists private diff --git a/lib/archunit/graph/projection/graph_query_options.rb b/lib/archunit/graph/projection/graph_query_options.rb index ec453be..9e4d6a0 100644 --- a/lib/archunit/graph/projection/graph_query_options.rb +++ b/lib/archunit/graph/projection/graph_query_options.rb @@ -21,7 +21,7 @@ def self.resolve(value) end # The options bag deliberately mirrors the eight independent fluent modifiers. - # rubocop:disable Metrics/ParameterLists + # rubocop:disable-next Metrics/ParameterLists def initialize( include_external_dependencies: false, include_self_dependencies: false, focus: nil, focus_depth: 1, reachable_from: nil, dependents_of: nil, @@ -37,7 +37,6 @@ def initialize( title = immutable_title(title) super end - # rubocop:enable Metrics/ParameterLists def with(**overrides) self.class.new(**to_h, **overrides) diff --git a/lib/archunit/metrics/extraction/extract_distance_info.rb b/lib/archunit/metrics/extraction/extract_distance_info.rb index 993e82e..41cb647 100644 --- a/lib/archunit/metrics/extraction/extract_distance_info.rb +++ b/lib/archunit/metrics/extraction/extract_distance_info.rb @@ -30,7 +30,7 @@ def build_distance_infos(project, outgoing, incoming) end private_class_method :build_distance_infos - # rubocop:disable Metrics/AbcSize -- Both directional indexes are built in one graph pass. + # rubocop:disable-next Metrics/AbcSize -- Both directional indexes are built in one graph pass. def coupling_indexes(graph, file_paths) outgoing = Hash.new { |hash, key| hash[key] = [] } incoming = Hash.new { |hash, key| hash[key] = [] } @@ -43,7 +43,6 @@ def coupling_indexes(graph, file_paths) end [outgoing, incoming] end - # rubocop:enable Metrics/AbcSize private_class_method :coupling_indexes end end diff --git a/lib/archunit/metrics/extraction/extract_project_info.rb b/lib/archunit/metrics/extraction/extract_project_info.rb index a262f14..8f8d2e2 100644 --- a/lib/archunit/metrics/extraction/extract_project_info.rb +++ b/lib/archunit/metrics/extraction/extract_project_info.rb @@ -54,7 +54,7 @@ def visitor_counts(visitor) end private_class_method :visitor_counts - # rubocop:disable Metrics/MethodLength -- The state tracks Ruby's =begin/=end comments. + # rubocop:disable-next Metrics/MethodLength -- The state tracks Ruby's =begin/=end comments. def lines_of_code(source) in_block_comment = false source.each_line.count do |line| @@ -70,7 +70,6 @@ def lines_of_code(source) end end end - # rubocop:enable Metrics/MethodLength private_class_method :lines_of_code def source_path(value) diff --git a/lib/archunit/metrics/extraction/metric_info.rb b/lib/archunit/metrics/extraction/metric_info.rb index 5972910..3cc87b7 100644 --- a/lib/archunit/metrics/extraction/metric_info.rb +++ b/lib/archunit/metrics/extraction/metric_info.rb @@ -70,7 +70,7 @@ def initialize(name:, accessed_by: []) end # Static information about one Ruby class declaration. - # rubocop:disable Lint/DataDefineOverride -- `methods` is the established metric vocabulary. + # rubocop:disable-next Lint/DataDefineOverride -- `methods` is the established metric vocabulary. ClassInfo = Data.define(:name, :file_path, :methods, :fields) do include ValueValidation @@ -86,7 +86,6 @@ def identifier "#{file_path}:#{name}" end end - # rubocop:enable Lint/DataDefineOverride # Static counts and class declarations extracted from one Ruby source file. FileInfo = Data.define( @@ -102,7 +101,7 @@ def identifier ) do include ValueValidation - # rubocop:disable Metrics/MethodLength, Metrics/ParameterLists -- Independent count facts. + # rubocop:disable-next Metrics/MethodLength, Metrics/ParameterLists -- Independent count facts. def initialize( path:, lines_of_code:, @@ -131,7 +130,6 @@ def initialize( super end - # rubocop:enable Metrics/MethodLength, Metrics/ParameterLists def identifier path diff --git a/lib/archunit/metrics/extraction/source_metrics_visitor.rb b/lib/archunit/metrics/extraction/source_metrics_visitor.rb index 6cda9b2..66ad23d 100644 --- a/lib/archunit/metrics/extraction/source_metrics_visitor.rb +++ b/lib/archunit/metrics/extraction/source_metrics_visitor.rb @@ -7,7 +7,7 @@ module ArchUnit module Metrics module Extraction # Collects Ruby-specific count and class-cohesion facts from a Prism tree. - # rubocop:disable Metrics/ClassLength -- One visitor owns the state of a single AST walk. + # rubocop:disable-next Metrics/ClassLength -- One visitor owns the state of a single AST walk. class SourceMetricsVisitor < Prism::Visitor IMPORT_METHODS = %i[autoload load require require_relative].freeze ATTRIBUTE_METHODS = %i[attr_accessor attr_reader attr_writer].freeze @@ -82,7 +82,7 @@ def visit_singleton_class_node(node) @singleton_class_depth -= 1 end - # rubocop:disable Metrics/MethodLength -- The ensure keeps nested visitor state balanced. + # rubocop:disable-next Metrics/MethodLength -- The ensure keeps nested visitor state balanced. def visit_def_node(node) active_class = active_class_accumulator unless active_class @@ -97,7 +97,6 @@ def visit_def_node(node) ensure @method_stack.pop if active_class end - # rubocop:enable Metrics/MethodLength INSTANCE_VARIABLE_NODES.each do |visitor_method| define_method(visitor_method) do |node| @@ -271,7 +270,6 @@ def build_field_infos(methods) end end end - # rubocop:enable Metrics/ClassLength private_constant :SourceMetricsVisitor end end diff --git a/lib/archunit/testing/rspec_adapter.rb b/lib/archunit/testing/rspec_adapter.rb index bf9a093..64035d3 100644 --- a/lib/archunit/testing/rspec_adapter.rb +++ b/lib/archunit/testing/rspec_adapter.rb @@ -13,11 +13,10 @@ def matches?(rule) end # RSpec's matcher protocol fixes this method name. - # rubocop:disable Naming/PredicatePrefix + # rubocop:disable-next Naming/PredicatePrefix def does_not_match?(rule) matches_expectation?(rule, expected_to_pass: false) end - # rubocop:enable Naming/PredicatePrefix def failure_message result.message diff --git a/spec/metrics/calculation/distance_spec.rb b/spec/metrics/calculation/distance_spec.rb index 8841932..6437739 100644 --- a/spec/metrics/calculation/distance_spec.rb +++ b/spec/metrics/calculation/distance_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true RSpec.describe ArchUnit::DistanceMetrics do - # rubocop:disable Metrics/ParameterLists -- Named fixture dimensions keep formulas readable. + # rubocop:disable-next Metrics/ParameterLists -- Named fixture dimensions keep formulas readable. def distance_info( types: 1, abstract_types: 0, incoming: 0, outgoing: 0, files: 1, lines: 0 ) @@ -15,7 +15,6 @@ def distance_info( efferent_coupling: outgoing, project_file_count: files ) end - # rubocop:enable Metrics/ParameterLists def values_for(info) described_class::CALCULATIONS.to_h do |name, _calculation| diff --git a/spec/metrics/fluentapi/metrics_spec.rb b/spec/metrics/fluentapi/metrics_spec.rb index a50b80c..3e8b133 100644 --- a/spec/metrics/fluentapi/metrics_spec.rb +++ b/spec/metrics/fluentapi/metrics_spec.rb @@ -9,7 +9,7 @@ def write_source(root, relative_path, source) File.write(path, source) end - # rubocop:disable Metrics/MethodLength -- Both small files form one reusable fixture project. + # rubocop:disable-next Metrics/MethodLength -- Both small files form one reusable fixture project. def build_project(root) write_source(root, 'lib/models/order.rb', <<~RUBY) class Sales::Order @@ -26,9 +26,8 @@ def call end RUBY end - # rubocop:enable Metrics/MethodLength - # rubocop:disable Metrics/MethodLength -- Four files create both distance zones. + # rubocop:disable-next Metrics/MethodLength -- Four files create both distance zones. def build_distance_project(root) write_source(root, 'lib/stable.rb', <<~RUBY) class Stable @@ -50,7 +49,6 @@ def perform end RUBY end - # rubocop:enable Metrics/MethodLength it 'builds immutable selectors without touching the filesystem' do allow(ArchUnit::MetricExtraction).to receive(:extract_project_info).and_call_original