diff --git a/Gemfile.lock b/Gemfile.lock index be79a5dba..ef1c0ef45 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -156,7 +156,7 @@ GEM google-protobuf (4.29.3-x86_64-linux) bigdecimal rake (>= 13) - graphql (2.4.9) + graphql (2.4.10) base64 fiber-storage logger @@ -186,7 +186,8 @@ GEM activesupport (>= 6.0.0) redis (>= 4.2, < 6) language_server-protocol (3.17.0.4) - logger (1.6.5) + lint_roller (1.1.0) + logger (1.6.6) loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -219,21 +220,21 @@ GEM net-protocol netrc (0.11.0) nio4r (2.7.4) - nokogiri (1.18.2-aarch64-linux-gnu) + nokogiri (1.18.3-aarch64-linux-gnu) racc (~> 1.4) - nokogiri (1.18.2-aarch64-linux-musl) + nokogiri (1.18.3-aarch64-linux-musl) racc (~> 1.4) - nokogiri (1.18.2-arm64-darwin) + nokogiri (1.18.3-arm64-darwin) racc (~> 1.4) - nokogiri (1.18.2-x86_64-darwin) + nokogiri (1.18.3-x86_64-darwin) racc (~> 1.4) - nokogiri (1.18.2-x86_64-linux-gnu) + nokogiri (1.18.3-x86_64-linux-gnu) racc (~> 1.4) - nokogiri (1.18.2-x86_64-linux-musl) + nokogiri (1.18.3-x86_64-linux-musl) racc (~> 1.4) ostruct (0.6.0) parallel (1.26.3) - parser (3.3.7.0) + parser (3.3.7.1) ast (~> 2.4.1) racc pp (0.6.2) @@ -298,25 +299,27 @@ GEM reline (0.6.0) io-console (~> 0.5) rexml (3.4.0) - rubocop (1.70.0) + rubocop (1.72.2) json (~> 2.3) - language_server-protocol (>= 3.17.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.36.2, < 2.0) + rubocop-ast (>= 1.38.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.37.0) + rubocop-ast (1.38.0) parser (>= 3.3.1.0) - rubocop-rspec (3.4.0) - rubocop (~> 1.61) + rubocop-rspec (3.5.0) + lint_roller (~> 1.1) + rubocop (~> 1.72, >= 1.72.1) rubocop-shopify (2.15.1) rubocop (~> 1.51) - rubocop-sorbet (0.8.7) + rubocop-sorbet (0.8.9) rubocop (>= 1) - ruby-lsp (0.23.10) + ruby-lsp (0.23.11) language_server-protocol (~> 3.17.0) prism (>= 1.2, < 2.0) rbs (>= 3, < 4) @@ -325,23 +328,23 @@ GEM ruby-lsp (>= 0.23.0, < 0.24.0) ruby-progressbar (1.13.0) securerandom (0.4.0) - shopify-money (3.0.0) - sidekiq (7.3.8) + shopify-money (3.0.1) + sidekiq (7.3.9) base64 connection_pool (>= 2.3.0) logger rack (>= 2.2.4) redis-client (>= 0.22.2) smart_properties (1.17.0) - sorbet (0.5.11842) - sorbet-static (= 0.5.11842) - sorbet-runtime (0.5.11842) - sorbet-static (0.5.11842-aarch64-linux) - sorbet-static (0.5.11842-universal-darwin) - sorbet-static (0.5.11842-x86_64-linux) - sorbet-static-and-runtime (0.5.11842) - sorbet (= 0.5.11842) - sorbet-runtime (= 0.5.11842) + sorbet (0.5.11856) + sorbet-static (= 0.5.11856) + sorbet-runtime (0.5.11856) + sorbet-static (0.5.11856-aarch64-linux) + sorbet-static (0.5.11856-universal-darwin) + sorbet-static (0.5.11856-x86_64-linux) + sorbet-static-and-runtime (0.5.11856) + sorbet (= 0.5.11856) + sorbet-runtime (= 0.5.11856) spoom (1.5.4) erubi (>= 1.10.0) prism (>= 0.28.0) diff --git a/sorbet/rbi/gems/graphql@2.4.9.rbi b/sorbet/rbi/gems/graphql@2.4.10.rbi similarity index 94% rename from sorbet/rbi/gems/graphql@2.4.9.rbi rename to sorbet/rbi/gems/graphql@2.4.10.rbi index 2220b270e..8c53aa935 100644 --- a/sorbet/rbi/gems/graphql@2.4.9.rbi +++ b/sorbet/rbi/gems/graphql@2.4.10.rbi @@ -812,6 +812,11 @@ class GraphQL::CoercionError < ::GraphQL::ExecutionError; end # source://graphql//lib/graphql/current.rb#24 module GraphQL::Current class << self + # @return [GraphQL::Dataloader::Source, nil] The currently-running source, if there is one + # + # source://graphql//lib/graphql/current.rb#53 + def dataloader_source; end + # @return [Class, nil] The currently-running {Dataloader::Source} class, if there is one. # # source://graphql//lib/graphql/current.rb#48 @@ -849,30 +854,30 @@ end class GraphQL::Dataloader # @return [Dataloader] a new instance of Dataloader # - # source://graphql//lib/graphql/dataloader.rb#58 + # source://graphql//lib/graphql/dataloader.rb#60 def initialize(nonblocking: T.unsafe(nil), fiber_limit: T.unsafe(nil)); end # @api private Nothing to see here # - # source://graphql//lib/graphql/dataloader.rb#138 + # source://graphql//lib/graphql/dataloader.rb#143 def append_job(&job); end # This method is called when Dataloader is finished using a fiber. # Use it to perform any cleanup, such as releasing database connections (if required manually) # - # source://graphql//lib/graphql/dataloader.rb#99 + # source://graphql//lib/graphql/dataloader.rb#101 def cleanup_fiber; end # Clear any already-loaded objects from {Source} caches # # @return [void] # - # source://graphql//lib/graphql/dataloader.rb#147 + # source://graphql//lib/graphql/dataloader.rb#152 def clear_cache; end # @return [Integer, nil] # - # source://graphql//lib/graphql/dataloader.rb#68 + # source://graphql//lib/graphql/dataloader.rb#70 def fiber_limit; end # This is called before the fiber is spawned, from the parent context (i.e. from @@ -880,23 +885,34 @@ class GraphQL::Dataloader # # @return [Hash] Current fiber-local variables # - # source://graphql//lib/graphql/dataloader.rb#78 + # source://graphql//lib/graphql/dataloader.rb#80 def get_fiber_variables; end + # Pre-warm the Dataloader cache with ActiveRecord objects which were loaded elsewhere. + # These will be used by {Dataloader::ActiveRecordSource}, {Dataloader::ActiveRecordAssociationSource} and their helper + # methods, `dataload_record` and `dataload_association`. + # + # @param records [Array] Already-loaded records to warm the cache with + # @param index_by [Symbol] The attribute to use as the cache key. (Should match `find_by:` when using {ActiveRecordSource}) + # @return [void] + # + # source://graphql//lib/graphql/dataloader.rb#266 + def merge_records(records, index_by: T.unsafe(nil)); end + # @return [Boolean] # - # source://graphql//lib/graphql/dataloader.rb#70 + # source://graphql//lib/graphql/dataloader.rb#72 def nonblocking?; end - # source://graphql//lib/graphql/dataloader.rb#186 + # source://graphql//lib/graphql/dataloader.rb#191 def run; end - # source://graphql//lib/graphql/dataloader.rb#237 + # source://graphql//lib/graphql/dataloader.rb#247 def run_fiber(f); end # Use a self-contained queue for the work in the block. # - # source://graphql//lib/graphql/dataloader.rb#155 + # source://graphql//lib/graphql/dataloader.rb#160 def run_isolated; end # Set up the fiber variables in a new fiber. @@ -906,15 +922,15 @@ class GraphQL::Dataloader # @param vars [Hash] Fiber-local variables from {get_fiber_variables} # @return [void] # - # source://graphql//lib/graphql/dataloader.rb#92 + # source://graphql//lib/graphql/dataloader.rb#94 def set_fiber_variables(vars); end - # source://graphql//lib/graphql/dataloader.rb#241 + # source://graphql//lib/graphql/dataloader.rb#251 def spawn_fiber; end # truffle-ruby wasn't doing well with the implementation below # - # source://graphql//lib/graphql/dataloader.rb#118 + # source://graphql//lib/graphql/dataloader.rb#120 def with(source_class, *batch_args, **batch_kwargs); end # Tell the dataloader that this fiber is waiting for data. @@ -923,71 +939,102 @@ class GraphQL::Dataloader # # @return [void] # - # source://graphql//lib/graphql/dataloader.rb#132 - def yield; end + # source://graphql//lib/graphql/dataloader.rb#134 + def yield(source = T.unsafe(nil)); end private - # source://graphql//lib/graphql/dataloader.rb#252 + # source://graphql//lib/graphql/dataloader.rb#278 def calculate_fiber_limit; end - # source://graphql//lib/graphql/dataloader.rb#263 + # source://graphql//lib/graphql/dataloader.rb#289 def join_queues(prev_queue, new_queue); end - # source://graphql//lib/graphql/dataloader.rb#269 - def spawn_job_fiber; end + # source://graphql//lib/graphql/dataloader.rb#295 + def spawn_job_fiber(trace); end - # source://graphql//lib/graphql/dataloader.rb#279 - def spawn_source_fiber; end + # source://graphql//lib/graphql/dataloader.rb#307 + def spawn_source_fiber(trace); end class << self # Returns the value of attribute default_fiber_limit. # - # source://graphql//lib/graphql/dataloader.rb#27 + # source://graphql//lib/graphql/dataloader.rb#29 def default_fiber_limit; end # Sets the attribute default_fiber_limit # # @param value the value to set the attribute default_fiber_limit to. # - # source://graphql//lib/graphql/dataloader.rb#27 + # source://graphql//lib/graphql/dataloader.rb#29 def default_fiber_limit=(_arg0); end # Returns the value of attribute default_nonblocking. # - # source://graphql//lib/graphql/dataloader.rb#27 + # source://graphql//lib/graphql/dataloader.rb#29 def default_nonblocking; end # Sets the attribute default_nonblocking # # @param value the value to set the attribute default_nonblocking to. # - # source://graphql//lib/graphql/dataloader.rb#27 + # source://graphql//lib/graphql/dataloader.rb#29 def default_nonblocking=(_arg0); end - # source://graphql//lib/graphql/dataloader.rb#30 + # source://graphql//lib/graphql/dataloader.rb#32 def use(schema, nonblocking: T.unsafe(nil), fiber_limit: T.unsafe(nil)); end # Call the block with a Dataloader instance, # then run all enqueued jobs and return the result of the block. # - # source://graphql//lib/graphql/dataloader.rb#48 + # source://graphql//lib/graphql/dataloader.rb#50 def with_dataloading(&block); end end end +# source://graphql//lib/graphql/dataloader/active_record_association_source.rb#7 +class GraphQL::Dataloader::ActiveRecordAssociationSource < ::GraphQL::Dataloader::Source + # @return [ActiveRecordAssociationSource] a new instance of ActiveRecordAssociationSource + # + # source://graphql//lib/graphql/dataloader/active_record_association_source.rb#10 + def initialize(association, scope = T.unsafe(nil)); end + + # source://graphql//lib/graphql/dataloader/active_record_association_source.rb#23 + def fetch(records); end + + # source://graphql//lib/graphql/dataloader/active_record_association_source.rb#15 + def load(record); end +end + +# source://graphql//lib/graphql/dataloader/active_record_association_source.rb#8 +GraphQL::Dataloader::ActiveRecordAssociationSource::RECORD_SOURCE_CLASS = GraphQL::Dataloader::ActiveRecordSource + +# source://graphql//lib/graphql/dataloader/active_record_source.rb#6 +class GraphQL::Dataloader::ActiveRecordSource < ::GraphQL::Dataloader::Source + # @return [ActiveRecordSource] a new instance of ActiveRecordSource + # + # source://graphql//lib/graphql/dataloader/active_record_source.rb#7 + def initialize(model_class, find_by: T.unsafe(nil)); end + + # source://graphql//lib/graphql/dataloader/active_record_source.rb#18 + def fetch(record_ids); end + + # source://graphql//lib/graphql/dataloader/active_record_source.rb#13 + def load(requested_key); end +end + # source://graphql//lib/graphql/dataloader/async_dataloader.rb#4 class GraphQL::Dataloader::AsyncDataloader < ::GraphQL::Dataloader - # source://graphql//lib/graphql/dataloader/async_dataloader.rb#14 + # source://graphql//lib/graphql/dataloader/async_dataloader.rb#17 def run; end # source://graphql//lib/graphql/dataloader/async_dataloader.rb#5 - def yield; end + def yield(source = T.unsafe(nil)); end private - # source://graphql//lib/graphql/dataloader/async_dataloader.rb#66 - def spawn_source_task(parent_task, condition); end + # source://graphql//lib/graphql/dataloader/async_dataloader.rb#72 + def spawn_source_task(parent_task, condition, trace); end end # The default implementation of dataloading -- all no-ops. @@ -1012,7 +1059,7 @@ class GraphQL::Dataloader::NullDataloader < ::GraphQL::Dataloader # @raise [GraphQL::Error] # # source://graphql//lib/graphql/dataloader/null_dataloader.rb#14 - def yield; end + def yield(_source); end end # @see Source#request which returns an instance of this @@ -1475,11 +1522,11 @@ class GraphQL::Execution::Interpreter::ExecutionErrors def add(err_or_msg); end end -# source://graphql//lib/graphql/execution/interpreter.rb#154 +# source://graphql//lib/graphql/execution/interpreter.rb#162 class GraphQL::Execution::Interpreter::ListResultFailedError < ::GraphQL::Error # @return [ListResultFailedError] a new instance of ListResultFailedError # - # source://graphql//lib/graphql/execution/interpreter.rb#155 + # source://graphql//lib/graphql/execution/interpreter.rb#163 def initialize(value:, path:, field:); end end @@ -1548,17 +1595,17 @@ class GraphQL::Execution::Interpreter::Runtime # @param trace [Boolean] If `false`, don't wrap this with field tracing # @return [GraphQL::Execution::Lazy, Object] If loading `object` will be deferred, it's a wrapper over it. # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#768 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#776 def after_lazy(lazy_obj, field:, owner_object:, arguments:, ast_node:, result:, result_name:, runtime_state:, eager: T.unsafe(nil), trace: T.unsafe(nil), &block); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#822 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#836 def arguments(graphql_object, arg_owner, ast_node); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#703 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#711 def call_method_on_directives(method_name, object, directives, &block); end # @api private @@ -1577,22 +1624,22 @@ class GraphQL::Execution::Interpreter::Runtime # @api private # @return [Lazy, Array, Hash, Object] Lazy, Array, and Hash are all traversed to resolve lazy values later # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#566 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#574 def continue_field(value, owner_type, field, current_type, ast_node, next_selections, is_non_null, owner_object, arguments, result_name, selection_result, was_scoped, runtime_state); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#460 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#468 def continue_value(value, field, is_non_null, ast_node, result_name, selection_result); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#448 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#456 def current_path; end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#831 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#845 def delete_all_interpreter_context; end # Check {Schema::Directive.include?} for each directive that's present @@ -1600,7 +1647,7 @@ class GraphQL::Execution::Interpreter::Runtime # @api private # @return [Boolean] # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#735 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#743 def directives_include?(node, graphql_object, parent_type); end # @api private @@ -1611,17 +1658,17 @@ class GraphQL::Execution::Interpreter::Runtime # @api private # @return [void] # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#243 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#247 def evaluate_selection(result_name, field_ast_nodes_or_ast_node, selections_result); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#287 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#291 def evaluate_selection_with_args(arguments, field_defn, ast_node, field_ast_nodes, object, result_name, selection_result, runtime_state); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#345 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#349 def evaluate_selection_with_resolved_keyword_args(kwarg_arguments, resolved_arguments, field_defn, ast_node, field_ast_nodes, object, result_name, selection_result, runtime_state); end # @api private @@ -1642,7 +1689,7 @@ class GraphQL::Execution::Interpreter::Runtime # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#746 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#754 def get_current_runtime_state; end # @api private @@ -1653,12 +1700,12 @@ class GraphQL::Execution::Interpreter::Runtime # @api private # @return [Boolean] # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#858 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#877 def lazy?(object); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#751 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#759 def minimal_after_lazy(value, &block); end # @api private @@ -1669,17 +1716,17 @@ class GraphQL::Execution::Interpreter::Runtime # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#689 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#697 def resolve_list_item(inner_value, inner_type, inner_type_non_null, ast_node, field, owner_object, arguments, this_idx, response_list, owner_type, was_scoped, runtime_state); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#842 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#856 def resolve_type(type, value); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#708 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#716 def run_directive(method_name, object, directives, idx, &block); end # This _begins_ the execution. Some deferred work @@ -1702,12 +1749,12 @@ class GraphQL::Execution::Interpreter::Runtime # # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#435 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#443 def set_graphql_dead(selection_result); end # @api private # - # source://graphql//lib/graphql/execution/interpreter/runtime.rb#405 + # source://graphql//lib/graphql/execution/interpreter/runtime.rb#413 def set_result(selection_result, result_name, value, is_child_result, is_non_null); end end @@ -1936,7 +1983,7 @@ end # @api private # -# source://graphql//lib/graphql/execution/interpreter/runtime.rb#459 +# source://graphql//lib/graphql/execution/interpreter/runtime.rb#467 GraphQL::Execution::Interpreter::Runtime::HALT = T.let(T.unsafe(nil), Object) # @api private @@ -2629,13 +2676,28 @@ end # source://graphql//lib/graphql/introspection/type_kind_enum.rb#4 class GraphQL::Introspection::TypeKindEnum < ::GraphQL::Schema::Enum class << self + # source://graphql//lib/graphql/schema/enum.rb#244 def enum; end + + # source://graphql//lib/graphql/schema/enum.rb#244 def input_object; end + + # source://graphql//lib/graphql/schema/enum.rb#244 def interface; end + + # source://graphql//lib/graphql/schema/enum.rb#244 def list; end + + # source://graphql//lib/graphql/schema/enum.rb#244 def non_null; end + + # source://graphql//lib/graphql/schema/enum.rb#244 def object; end + + # source://graphql//lib/graphql/schema/enum.rb#244 def scalar; end + + # source://graphql//lib/graphql/schema/enum.rb#244 def union; end end end @@ -6695,31 +6757,31 @@ class GraphQL::Query # @param root_value [Object] the object used to resolve fields on the root type # @param max_depth [Numeric] the maximum number of nested selections allowed for this query (falls back to schema-level value) # @param max_complexity [Numeric] the maximum field complexity for this query (falls back to schema-level value) - # @param visibility_profile [Symbol] + # @param visibility_profile [Symbol] Another way to assign `context[:visibility_profile]` # @return [Query] a new instance of Query # # source://graphql//lib/graphql/query.rb#101 def initialize(schema, query_string = T.unsafe(nil), query: T.unsafe(nil), document: T.unsafe(nil), context: T.unsafe(nil), variables: T.unsafe(nil), validate: T.unsafe(nil), static_validator: T.unsafe(nil), visibility_profile: T.unsafe(nil), subscription_topic: T.unsafe(nil), operation_name: T.unsafe(nil), root_value: T.unsafe(nil), max_depth: T.unsafe(nil), max_complexity: T.unsafe(nil), warden: T.unsafe(nil), use_visibility_profile: T.unsafe(nil)); end - # source://graphql//lib/graphql/query.rb#412 + # source://graphql//lib/graphql/query.rb#413 def after_lazy(value, &block); end # Returns the value of attribute analysis_errors. # - # source://graphql//lib/graphql/query.rb#341 + # source://graphql//lib/graphql/query.rb#342 def analysis_errors; end # Sets the attribute analysis_errors # # @param value the value to set the attribute analysis_errors to. # - # source://graphql//lib/graphql/query.rb#341 + # source://graphql//lib/graphql/query.rb#342 def analysis_errors=(_arg0); end # source://forwardable/1.3.3/forwardable.rb#231 def analyzers(*args, **_arg1, &block); end - # source://graphql//lib/graphql/query.rb#294 + # source://graphql//lib/graphql/query.rb#295 def arguments_cache; end # Node-level cache for calculating arguments. Used during execution and query analysis. @@ -6728,7 +6790,7 @@ class GraphQL::Query # @param definition [GraphQL::Schema::Field] # @param parent_object [GraphQL::Schema::Object] # - # source://graphql//lib/graphql/query.rb#290 + # source://graphql//lib/graphql/query.rb#291 def arguments_for(ast_node, definition, parent_object: T.unsafe(nil)); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -6741,7 +6803,7 @@ class GraphQL::Query # @return [GraphQL::Tracing::Trace] # - # source://graphql//lib/graphql/query.rb#193 + # source://graphql//lib/graphql/query.rb#194 def current_trace; end # @return [GraphQL::Language::Nodes::Document] @@ -6751,7 +6813,7 @@ class GraphQL::Query # @return [Boolean] # - # source://graphql//lib/graphql/query.rb#252 + # source://graphql//lib/graphql/query.rb#253 def executed?; end # This contains a few components: @@ -6767,21 +6829,21 @@ class GraphQL::Query # @see operation_fingerprint # @see variables_fingerprint # - # source://graphql//lib/graphql/query.rb#320 + # source://graphql//lib/graphql/query.rb#321 def fingerprint; end - # source://graphql//lib/graphql/query.rb#235 + # source://graphql//lib/graphql/query.rb#236 def fragments; end - # source://graphql//lib/graphql/query.rb#354 + # source://graphql//lib/graphql/query.rb#355 def get_field(owner, field_name); end - # source://graphql//lib/graphql/query.rb#350 + # source://graphql//lib/graphql/query.rb#351 def get_type(type_name); end # @api private # - # source://graphql//lib/graphql/query.rb#408 + # source://graphql//lib/graphql/query.rb#409 def handle_or_reraise(err); end # source://graphql//lib/graphql/query.rb#76 @@ -6789,14 +6851,14 @@ class GraphQL::Query # Returns the value of attribute logger. # - # source://graphql//lib/graphql/query.rb#424 + # source://graphql//lib/graphql/query.rb#425 def logger; end # A lookahead for the root selections of this query # # @return [GraphQL::Execution::Lookahead] # - # source://graphql//lib/graphql/query.rb#203 + # source://graphql//lib/graphql/query.rb#204 def lookahead; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -6807,24 +6869,24 @@ class GraphQL::Query # Returns the value of attribute multiplex. # - # source://graphql//lib/graphql/query.rb#190 + # source://graphql//lib/graphql/query.rb#191 def multiplex; end # Sets the attribute multiplex # # @param value the value to set the attribute multiplex to. # - # source://graphql//lib/graphql/query.rb#190 + # source://graphql//lib/graphql/query.rb#191 def multiplex=(_arg0); end # @return [Boolean] # - # source://graphql//lib/graphql/query.rb#395 + # source://graphql//lib/graphql/query.rb#396 def mutation?; end # @return [String] An opaque hash for identifying this query's given query string and selected operation # - # source://graphql//lib/graphql/query.rb#325 + # source://graphql//lib/graphql/query.rb#326 def operation_fingerprint; end # @return [nil, String] The operation name provided by client or the one inferred from the document. Used to determine which operation to run. @@ -6837,10 +6899,10 @@ class GraphQL::Query # source://graphql//lib/graphql/query.rb#36 def operation_name=(_arg0); end - # source://graphql//lib/graphql/query.rb#239 + # source://graphql//lib/graphql/query.rb#240 def operations; end - # source://graphql//lib/graphql/query.rb#358 + # source://graphql//lib/graphql/query.rb#359 def possible_types(type); end # Returns the value of attribute provided_variables. @@ -6850,12 +6912,12 @@ class GraphQL::Query # @return [Boolean] # - # source://graphql//lib/graphql/query.rb#399 + # source://graphql//lib/graphql/query.rb#400 def query?; end # If a document was provided to `GraphQL::Schema#execute` instead of the raw query string, we will need to get it from the document # - # source://graphql//lib/graphql/query.rb#183 + # source://graphql//lib/graphql/query.rb#184 def query_string; end # Sets the attribute query_string @@ -6870,27 +6932,27 @@ class GraphQL::Query # @return [GraphQL::ObjectType, nil] The runtime type of `value` from {Schema#resolve_type} # @see {#possible_types} to apply filtering from `only` / `except` # - # source://graphql//lib/graphql/query.rb#383 + # source://graphql//lib/graphql/query.rb#384 def resolve_type(abstract_type, value = T.unsafe(nil)); end # Get the result for this query, executing it once # # @return [GraphQL::Query::Result] A Hash-like GraphQL response, with `"data"` and/or `"errors"` keys # - # source://graphql//lib/graphql/query.rb#245 + # source://graphql//lib/graphql/query.rb#246 def result; end # @api private # - # source://graphql//lib/graphql/query.rb#233 + # source://graphql//lib/graphql/query.rb#234 def result_values; end # @api private # - # source://graphql//lib/graphql/query.rb#223 + # source://graphql//lib/graphql/query.rb#224 def result_values=(result_hash); end - # source://graphql//lib/graphql/query.rb#362 + # source://graphql//lib/graphql/query.rb#363 def root_type_for_operation(op_type); end # The value for root types @@ -6909,7 +6971,7 @@ class GraphQL::Query # # @return [String, nil] Returns nil if the query is invalid. # - # source://graphql//lib/graphql/query.rb#302 + # source://graphql//lib/graphql/query.rb#303 def sanitized_query_string(inline_variables: T.unsafe(nil)); end # Returns the value of attribute schema. @@ -6922,7 +6984,7 @@ class GraphQL::Query # # @return [GraphQL::Language::Nodes::OperationDefinition, nil] # - # source://graphql//lib/graphql/query.rb#263 + # source://graphql//lib/graphql/query.rb#264 def selected_operation; end # @return [String, nil] The name of the operation to run (may be inferred) @@ -6930,7 +6992,7 @@ class GraphQL::Query # source://graphql//lib/graphql/query.rb#81 def selected_operation_name; end - # source://graphql//lib/graphql/query.rb#256 + # source://graphql//lib/graphql/query.rb#257 def static_errors; end # @return [GraphQL::StaticValidation::Validator] if present, the query will validate with these rules. @@ -6945,7 +7007,7 @@ class GraphQL::Query # @return [Boolean] # - # source://graphql//lib/graphql/query.rb#403 + # source://graphql//lib/graphql/query.rb#404 def subscription?; end # @return [String, nil] the triggered event, if this query is a subscription update @@ -6955,7 +7017,7 @@ class GraphQL::Query # @return [Boolean] # - # source://graphql//lib/graphql/query.rb#197 + # source://graphql//lib/graphql/query.rb#198 def subscription_update?; end # Returns the value of attribute tracers. @@ -6963,12 +7025,12 @@ class GraphQL::Query # source://graphql//lib/graphql/query.rb#89 def tracers; end - # source://graphql//lib/graphql/query.rb#375 + # source://graphql//lib/graphql/query.rb#376 def types; end # @return [Boolean] # - # source://graphql//lib/graphql/query.rb#342 + # source://graphql//lib/graphql/query.rb#343 def valid?; end # @return [Boolean] if false, static validation is skipped (execution behavior for invalid queries is undefined) @@ -6987,7 +7049,7 @@ class GraphQL::Query # source://forwardable/1.3.3/forwardable.rb#231 def validation_errors(*args, **_arg1, &block); end - # source://graphql//lib/graphql/query.rb#334 + # source://graphql//lib/graphql/query.rb#335 def validation_pipeline; end # Determine the values for variables of this query, using default values @@ -6997,34 +7059,34 @@ class GraphQL::Query # # @return [GraphQL::Query::Variables] Variables to apply to this query # - # source://graphql//lib/graphql/query.rb#273 + # source://graphql//lib/graphql/query.rb#274 def variables; end # @return [String] An opaque hash for identifying this query's given a variable values (not including defaults) # - # source://graphql//lib/graphql/query.rb#330 + # source://graphql//lib/graphql/query.rb#331 def variables_fingerprint; end # @return [Symbol, nil] # - # source://graphql//lib/graphql/query.rb#188 + # source://graphql//lib/graphql/query.rb#189 def visibility_profile; end - # source://graphql//lib/graphql/query.rb#346 + # source://graphql//lib/graphql/query.rb#347 def warden; end private - # source://graphql//lib/graphql/query.rb#428 + # source://graphql//lib/graphql/query.rb#429 def find_operation(operations, operation_name); end - # source://graphql//lib/graphql/query.rb#438 + # source://graphql//lib/graphql/query.rb#439 def prepare_ast; end # Since the query string is processed at the last possible moment, # any internal values which depend on it should be accessed within this wrapper. # - # source://graphql//lib/graphql/query.rb#502 + # source://graphql//lib/graphql/query.rb#506 def with_prepared_ast; end end @@ -7342,6 +7404,7 @@ GraphQL::Query::InputValidationResult::VALID = T.let(T.unsafe(nil), GraphQL::Que # # source://graphql//lib/graphql/query/null_context.rb#6 class GraphQL::Query::NullContext < ::GraphQL::Query::Context + include ::Singleton::SingletonInstanceMethods include ::Singleton extend ::Singleton::SingletonClassMethods @@ -7778,14 +7841,14 @@ class GraphQL::Schema # source://graphql//lib/graphql/schema.rb#1565 def after_lazy(value, &block); end - # source://graphql//lib/graphql/schema.rb#894 + # source://graphql//lib/graphql/schema.rb#893 def analysis_engine; end # Sets the attribute analysis_engine # # @param value the value to set the attribute analysis_engine to. # - # source://graphql//lib/graphql/schema.rb#892 + # source://graphql//lib/graphql/schema.rb#891 def analysis_engine=(_arg0); end # Return the Hash response of {Introspection::INTROSPECTION_QUERY}. @@ -7800,77 +7863,77 @@ class GraphQL::Schema # @param include_is_one_of [Boolean] If true, `isOneOf: true|false` will be included with input objects # @return [Hash] GraphQL result # - # source://graphql//lib/graphql/schema.rb#267 + # source://graphql//lib/graphql/schema.rb#266 def as_json(context: T.unsafe(nil), include_deprecated_args: T.unsafe(nil), include_schema_description: T.unsafe(nil), include_is_repeatable: T.unsafe(nil), include_specified_by_url: T.unsafe(nil), include_is_one_of: T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#208 + # source://graphql//lib/graphql/schema.rb#207 def build_trace_mode(mode); end # @return [GraphQL::Pagination::Connections] if installed # - # source://graphql//lib/graphql/schema.rb#414 + # source://graphql//lib/graphql/schema.rb#413 def connections; end # @api private # - # source://graphql//lib/graphql/schema.rb#411 + # source://graphql//lib/graphql/schema.rb#410 def connections=(_arg0); end # @param new_context_class [Class] A subclass to use when executing queries # - # source://graphql//lib/graphql/schema.rb#1069 + # source://graphql//lib/graphql/schema.rb#1068 def context_class(new_context_class = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#922 + # source://graphql//lib/graphql/schema.rb#921 def count_introspection_fields; end - # source://graphql//lib/graphql/schema.rb#753 + # source://graphql//lib/graphql/schema.rb#752 def cursor_encoder(new_encoder = T.unsafe(nil)); end # @api private # @see GraphQL::Dataloader # - # source://graphql//lib/graphql/schema.rb#670 + # source://graphql//lib/graphql/schema.rb#669 def dataloader_class; end # Sets the attribute dataloader_class # # @param value the value to set the attribute dataloader_class to. # - # source://graphql//lib/graphql/schema.rb#674 + # source://graphql//lib/graphql/schema.rb#673 def dataloader_class=(_arg0); end - # source://graphql//lib/graphql/schema.rb#1038 + # source://graphql//lib/graphql/schema.rb#1037 def default_analysis_engine; end # source://graphql//lib/graphql/schema.rb#1359 def default_directives; end - # source://graphql//lib/graphql/schema.rb#1030 + # source://graphql//lib/graphql/schema.rb#1029 def default_execution_strategy; end # @param new_default_logger [#log] Something to use for logging messages # - # source://graphql//lib/graphql/schema.rb#1048 + # source://graphql//lib/graphql/schema.rb#1047 def default_logger(new_default_logger = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#760 + # source://graphql//lib/graphql/schema.rb#759 def default_max_page_size(new_default_max_page_size = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#779 + # source://graphql//lib/graphql/schema.rb#778 def default_page_size(new_default_page_size = T.unsafe(nil)); end # @param new_mode [Symbol] If configured, this will be used when `context: { trace_mode: ... }` isn't set. # - # source://graphql//lib/graphql/schema.rb#150 + # source://graphql//lib/graphql/schema.rb#149 def default_trace_mode(new_mode = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#136 + # source://graphql//lib/graphql/schema.rb#135 def deprecated_graphql_definition; end # @return [String, nil] # - # source://graphql//lib/graphql/schema.rb#293 + # source://graphql//lib/graphql/schema.rb#292 def description(new_description = T.unsafe(nil)); end # Returns `DidYouMean` if it's defined. @@ -7894,41 +7957,41 @@ class GraphQL::Schema # source://graphql//lib/graphql/schema.rb#1335 def directives(*new_directives); end - # source://graphql//lib/graphql/schema.rb#930 + # source://graphql//lib/graphql/schema.rb#929 def disable_introspection_entry_points; end # @return [Boolean] # - # source://graphql//lib/graphql/schema.rb#948 + # source://graphql//lib/graphql/schema.rb#947 def disable_introspection_entry_points?; end - # source://graphql//lib/graphql/schema.rb#936 + # source://graphql//lib/graphql/schema.rb#935 def disable_schema_introspection_entry_point; end # @return [Boolean] # - # source://graphql//lib/graphql/schema.rb#956 + # source://graphql//lib/graphql/schema.rb#955 def disable_schema_introspection_entry_point?; end - # source://graphql//lib/graphql/schema.rb#942 + # source://graphql//lib/graphql/schema.rb#941 def disable_type_introspection_entry_point; end # @return [Boolean] # - # source://graphql//lib/graphql/schema.rb#964 + # source://graphql//lib/graphql/schema.rb#963 def disable_type_introspection_entry_point?; end - # source://graphql//lib/graphql/schema.rb#898 + # source://graphql//lib/graphql/schema.rb#897 def error_bubbling(new_error_bubbling = T.unsafe(nil)); end # Sets the attribute error_bubbling # # @param value the value to set the attribute error_bubbling to. # - # source://graphql//lib/graphql/schema.rb#907 + # source://graphql//lib/graphql/schema.rb#906 def error_bubbling=(_arg0); end - # source://graphql//lib/graphql/schema.rb#1105 + # source://graphql//lib/graphql/schema.rb#1104 def error_handlers; end # Execute a query on itself. @@ -7942,10 +8005,10 @@ class GraphQL::Schema # @param new_extra_types [Module] Type definitions to include in printing and introspection, even though they aren't referenced in the schema # @return [Array] Type definitions added to this schema # - # source://graphql//lib/graphql/schema.rb#974 + # source://graphql//lib/graphql/schema.rb#973 def extra_types(*new_extra_types); end - # source://graphql//lib/graphql/schema.rb#303 + # source://graphql//lib/graphql/schema.rb#302 def find(path); end # Create schema from an IDL schema or file containing an IDL definition. @@ -7956,7 +8019,7 @@ class GraphQL::Schema # @param using [Hash] Plugins to attach to the created schema with `use(key, value)` # @return [Class] the schema described by `document` # - # source://graphql//lib/graphql/schema.rb#115 + # source://graphql//lib/graphql/schema.rb#114 def from_definition(definition_or_path, default_resolve: T.unsafe(nil), parser: T.unsafe(nil), using: T.unsafe(nil)); end # Create schema with the result of an introspection query. @@ -7964,13 +8027,13 @@ class GraphQL::Schema # @param introspection_result [Hash] A response from {GraphQL::Introspection::INTROSPECTION_QUERY} # @return [Class] the schema described by `input` # - # source://graphql//lib/graphql/schema.rb#105 + # source://graphql//lib/graphql/schema.rb#104 def from_introspection(introspection_result); end - # source://graphql//lib/graphql/schema.rb#701 + # source://graphql//lib/graphql/schema.rb#700 def get_field(type_or_name, field_name, context = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#724 + # source://graphql//lib/graphql/schema.rb#723 def get_fields(type, context = T.unsafe(nil)); end # @param type_name [String] @@ -7978,17 +8041,17 @@ class GraphQL::Schema # @param use_visibility_profile Private, for migration to {Schema::Visibility} # @return [Module, nil] A type, or nil if there's no type called `type_name` # - # source://graphql//lib/graphql/schema.rb#367 + # source://graphql//lib/graphql/schema.rb#366 def get_type(type_name, context = T.unsafe(nil), use_visibility_profile = T.unsafe(nil)); end # @api private # - # source://graphql//lib/graphql/schema.rb#1117 + # source://graphql//lib/graphql/schema.rb#1116 def handle_or_reraise(context, err); end # @return [Boolean] Does this schema have _any_ definition for a type named `type_name`, regardless of visibility? # - # source://graphql//lib/graphql/schema.rb#406 + # source://graphql//lib/graphql/schema.rb#405 def has_defined_type?(type_name); end # Return a stable ID string for `object` so that it can be refetched later, using {.object_from_id}. @@ -8022,12 +8085,12 @@ class GraphQL::Schema # @param new_introspection_namespace [Module] If given, use this module for custom introspection on the schema # @return [Module, nil] The configured namespace, if there is one # - # source://graphql//lib/graphql/schema.rb#731 + # source://graphql//lib/graphql/schema.rb#730 def introspection(new_introspection_namespace = T.unsafe(nil)); end # @return [Schema::IntrospectionSystem] Based on {introspection} # - # source://graphql//lib/graphql/schema.rb#744 + # source://graphql//lib/graphql/schema.rb#743 def introspection_system; end # @return [Boolean] True if this object should be lazily resolved @@ -8048,27 +8111,27 @@ class GraphQL::Schema # source://graphql//lib/graphql/schema.rb#1250 def load_type(type_name, ctx); end - # source://graphql//lib/graphql/schema.rb#873 + # source://graphql//lib/graphql/schema.rb#872 def max_complexity(max_complexity = T.unsafe(nil), count_introspection_fields: T.unsafe(nil)); end # Sets the attribute max_complexity # # @param value the value to set the attribute max_complexity to. # - # source://graphql//lib/graphql/schema.rb#871 + # source://graphql//lib/graphql/schema.rb#870 def max_complexity=(_arg0); end - # source://graphql//lib/graphql/schema.rb#884 + # source://graphql//lib/graphql/schema.rb#883 def max_complexity_count_introspection_fields; end - # source://graphql//lib/graphql/schema.rb#911 + # source://graphql//lib/graphql/schema.rb#910 def max_depth(new_max_depth = T.unsafe(nil), count_introspection_fields: T.unsafe(nil)); end # Sets the attribute max_depth # # @param value the value to set the attribute max_depth to. # - # source://graphql//lib/graphql/schema.rb#909 + # source://graphql//lib/graphql/schema.rb#908 def max_depth=(_arg0); end # A limit on the number of tokens to accept on incoming query strings. @@ -8076,7 +8139,7 @@ class GraphQL::Schema # # @return [nil, Integer] # - # source://graphql//lib/graphql/schema.rb#771 + # source://graphql//lib/graphql/schema.rb#770 def max_query_string_tokens(new_max_tokens = T.unsafe(nil)); end # Execute several queries on itself, concurrently. @@ -8118,10 +8181,10 @@ class GraphQL::Schema # @param lazy_load_block If a block is given, then it will be called when GraphQL-Ruby needs the root mutation type. # @return [Class, nil] The configured mutation root type, if there is one. # - # source://graphql//lib/graphql/schema.rb#476 + # source://graphql//lib/graphql/schema.rb#475 def mutation(new_mutation_object = T.unsafe(nil), &lazy_load_block); end - # source://graphql//lib/graphql/schema.rb#799 + # source://graphql//lib/graphql/schema.rb#798 def mutation_execution_strategy(new_mutation_execution_strategy = T.unsafe(nil), deprecation_warning: T.unsafe(nil)); end # Create a trace instance which will include the trace modules specified for the optional mode. @@ -8160,13 +8223,13 @@ class GraphQL::Schema # @param new_orphan_types [Array>] Object types to register as implementations of interfaces in the schema. # @return [Array>] All previously-registered orphan types for this schema # - # source://graphql//lib/graphql/schema.rb#999 + # source://graphql//lib/graphql/schema.rb#998 def orphan_types(*new_orphan_types); end - # source://graphql//lib/graphql/schema.rb#204 + # source://graphql//lib/graphql/schema.rb#203 def own_trace_modes; end - # source://graphql//lib/graphql/schema.rb#236 + # source://graphql//lib/graphql/schema.rb#235 def own_trace_modules; end # A function to call when {#execute} receives an invalid query string @@ -8180,7 +8243,7 @@ class GraphQL::Schema # source://graphql//lib/graphql/schema.rb#1315 def parse_error(parse_err, ctx); end - # source://graphql//lib/graphql/schema.rb#327 + # source://graphql//lib/graphql/schema.rb#326 def plugins; end # @param type [Module] The type definition whose possible types you want to see @@ -8189,7 +8252,7 @@ class GraphQL::Schema # @return [Hash] All possible types, if no `type` is given. # @return [Array] Possible types for `type`, if it's given. # - # source://graphql//lib/graphql/schema.rb#617 + # source://graphql//lib/graphql/schema.rb#616 def possible_types(type = T.unsafe(nil), context = T.unsafe(nil), use_visibility_profile = T.unsafe(nil)); end # Get or set the root `query { ... }` object for this schema. @@ -8200,7 +8263,7 @@ class GraphQL::Schema # @param lazy_load_block If a block is given, then it will be called when GraphQL-Ruby needs the root query type. # @return [Class, nil] The configured query root type, if there is one. # - # source://graphql//lib/graphql/schema.rb#437 + # source://graphql//lib/graphql/schema.rb#436 def query(new_query_object = T.unsafe(nil), &lazy_load_block); end # @param new_analyzer [Class] An analyzer to run on queries to this schema @@ -8214,10 +8277,10 @@ class GraphQL::Schema # @param new_query_class [Class] A subclass to use when executing queries # - # source://graphql//lib/graphql/schema.rb#853 + # source://graphql//lib/graphql/schema.rb#852 def query_class(new_query_class = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#787 + # source://graphql//lib/graphql/schema.rb#786 def query_execution_strategy(new_query_execution_strategy = T.unsafe(nil), deprecation_warning: T.unsafe(nil)); end # Called when execution encounters a `SystemStackError`. By default, it adds a client-facing error to the response. @@ -8230,7 +8293,7 @@ class GraphQL::Schema # source://graphql//lib/graphql/schema.rb#1557 def query_stack_error(query, err); end - # source://graphql//lib/graphql/schema.rb#676 + # source://graphql//lib/graphql/schema.rb#675 def references_to(to_type = T.unsafe(nil), from: T.unsafe(nil)); end # Register a handler for errors raised during execution. The handlers can return a new value or raise a new error. @@ -8247,7 +8310,7 @@ class GraphQL::Schema # @yieldparam context [GraphQL::Query::Context] The context for the currently-running operation # @yieldreturn [Object] Some object to use in the place where this error was raised # - # source://graphql//lib/graphql/schema.rb#1091 + # source://graphql//lib/graphql/schema.rb#1090 def rescue_from(*err_classes, &handler_block); end # GraphQL-Ruby calls this method during execution when it needs the application to determine the type to use for an object. @@ -8273,12 +8336,12 @@ class GraphQL::Schema # @api private # - # source://graphql//lib/graphql/schema.rb#550 + # source://graphql//lib/graphql/schema.rb#549 def root_type_for_operation(operation); end # @return [Array] The root types (query, mutation, subscription) defined for this schema # - # source://graphql//lib/graphql/schema.rb#564 + # source://graphql//lib/graphql/schema.rb#563 def root_types; end # source://graphql//lib/graphql/schema.rb#1477 @@ -8290,7 +8353,7 @@ class GraphQL::Schema # source://graphql//lib/graphql/schema.rb#1245 def schema_directives; end - # source://graphql//lib/graphql/schema.rb#311 + # source://graphql//lib/graphql/schema.rb#310 def static_validator; end # Get or set the root `subscription { ... }` object for this schema. @@ -8301,18 +8364,18 @@ class GraphQL::Schema # @param lazy_load_block If a block is given, then it will be called when GraphQL-Ruby needs the root subscription type. # @return [Class, nil] The configured subscription root type, if there is one. # - # source://graphql//lib/graphql/schema.rb#515 + # source://graphql//lib/graphql/schema.rb#514 def subscription(new_subscription_object = T.unsafe(nil), &lazy_load_block); end - # source://graphql//lib/graphql/schema.rb#811 + # source://graphql//lib/graphql/schema.rb#810 def subscription_execution_strategy(new_subscription_execution_strategy = T.unsafe(nil), deprecation_warning: T.unsafe(nil)); end # @return [GraphQL::Subscriptions] # - # source://graphql//lib/graphql/schema.rb#141 + # source://graphql//lib/graphql/schema.rb#140 def subscriptions(inherited: T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#145 + # source://graphql//lib/graphql/schema.rb#144 def subscriptions=(new_implementation); end # Override this method to handle lazy objects in a custom way. @@ -8329,14 +8392,14 @@ class GraphQL::Schema # @param context [Hash] # @return [String] # - # source://graphql//lib/graphql/schema.rb#282 + # source://graphql//lib/graphql/schema.rb#281 def to_definition(context: T.unsafe(nil)); end # Return the GraphQL::Language::Document IDL AST for the schema # # @return [GraphQL::Language::Document] # - # source://graphql//lib/graphql/schema.rb#288 + # source://graphql//lib/graphql/schema.rb#287 def to_document; end # Returns the JSON response of {Introspection::INTROSPECTION_QUERY}. @@ -8344,15 +8407,15 @@ class GraphQL::Schema # @return [String] # @see {#as_json} # - # source://graphql//lib/graphql/schema.rb#253 + # source://graphql//lib/graphql/schema.rb#252 def to_json(**args); end - # source://graphql//lib/graphql/schema.rb#162 + # source://graphql//lib/graphql/schema.rb#161 def trace_class(new_class = T.unsafe(nil)); end # @return [Class] Return the trace class to use for this mode, looking one up on the superclass if this Schema doesn't have one defined. # - # source://graphql//lib/graphql/schema.rb#175 + # source://graphql//lib/graphql/schema.rb#174 def trace_class_for(mode, build: T.unsafe(nil)); end # Configure `trace_class` to be used whenever `context: { trace_mode: mode_name }` is requested. @@ -8368,12 +8431,12 @@ class GraphQL::Schema # @param trace_class [Class] subclass of GraphQL::Tracing::Trace # @return void # - # source://graphql//lib/graphql/schema.rb#199 + # source://graphql//lib/graphql/schema.rb#198 def trace_mode(mode_name, trace_class); end # @return [Array] Modules added for tracing in `trace_mode`, including inherited ones # - # source://graphql//lib/graphql/schema.rb#241 + # source://graphql//lib/graphql/schema.rb#240 def trace_modules_for(trace_mode); end # The options hash for this trace mode @@ -8416,7 +8479,7 @@ class GraphQL::Schema # source://graphql//lib/graphql/schema.rb#1298 def type_error(type_error, ctx); end - # source://graphql//lib/graphql/schema.rb#697 + # source://graphql//lib/graphql/schema.rb#696 def type_from_ast(ast_node, context: T.unsafe(nil)); end # Build a map of `{ name => type }` and return it @@ -8424,7 +8487,7 @@ class GraphQL::Schema # @return [Hash Class>] A dictionary of type classes by their GraphQL name # @see get_type Which is more efficient for finding _one type_ by name, because it doesn't merge hashes. # - # source://graphql//lib/graphql/schema.rb#334 + # source://graphql//lib/graphql/schema.rb#333 def types(context = T.unsafe(nil)); end # This hook is called when a field fails an `authorized?` check. @@ -8462,7 +8525,7 @@ class GraphQL::Schema # source://graphql//lib/graphql/schema.rb#1268 def unauthorized_object(unauthorized_error); end - # source://graphql//lib/graphql/schema.rb#653 + # source://graphql//lib/graphql/schema.rb#652 def union_memberships(type = T.unsafe(nil)); end # Add `plugin` to this schema @@ -8470,28 +8533,28 @@ class GraphQL::Schema # @param plugin [#use] A Schema plugin # @return void # - # source://graphql//lib/graphql/schema.rb#318 + # source://graphql//lib/graphql/schema.rb#317 def use(plugin, **kwargs); end # @api private # - # source://graphql//lib/graphql/schema.rb#598 + # source://graphql//lib/graphql/schema.rb#597 def use_visibility_profile=(_arg0); end # @api private # @return [Boolean] # - # source://graphql//lib/graphql/schema.rb#602 + # source://graphql//lib/graphql/schema.rb#601 def use_visibility_profile?; end # @api private # - # source://graphql//lib/graphql/schema.rb#1114 + # source://graphql//lib/graphql/schema.rb#1113 def using_backtrace; end # @api private # - # source://graphql//lib/graphql/schema.rb#1114 + # source://graphql//lib/graphql/schema.rb#1113 def using_backtrace=(_arg0); end # Validate a query string according to this schema. @@ -8499,47 +8562,47 @@ class GraphQL::Schema # @param string_or_document [String, GraphQL::Language::Nodes::Document] # @return [Array] # - # source://graphql//lib/graphql/schema.rb#838 + # source://graphql//lib/graphql/schema.rb#837 def validate(string_or_document, rules: T.unsafe(nil), context: T.unsafe(nil)); end - # source://graphql//lib/graphql/schema.rb#863 + # source://graphql//lib/graphql/schema.rb#862 def validate_max_errors(new_validate_max_errors = T.unsafe(nil)); end # Sets the attribute validate_max_errors # # @param value the value to set the attribute validate_max_errors to. # - # source://graphql//lib/graphql/schema.rb#861 + # source://graphql//lib/graphql/schema.rb#860 def validate_max_errors=(_arg0); end - # source://graphql//lib/graphql/schema.rb#825 + # source://graphql//lib/graphql/schema.rb#824 def validate_timeout(new_validate_timeout = T.unsafe(nil)); end # Sets the attribute validate_timeout # # @param value the value to set the attribute validate_timeout to. # - # source://graphql//lib/graphql/schema.rb#823 + # source://graphql//lib/graphql/schema.rb#822 def validate_timeout=(_arg0); end # @api private # - # source://graphql//lib/graphql/schema.rb#600 + # source://graphql//lib/graphql/schema.rb#599 def visibility; end # @api private # - # source://graphql//lib/graphql/schema.rb#600 + # source://graphql//lib/graphql/schema.rb#599 def visibility=(_arg0); end # @api private # - # source://graphql//lib/graphql/schema.rb#587 + # source://graphql//lib/graphql/schema.rb#586 def visibility_profile_class; end # @api private # - # source://graphql//lib/graphql/schema.rb#598 + # source://graphql//lib/graphql/schema.rb#597 def visibility_profile_class=(_arg0); end # @return [Boolean] @@ -8549,12 +8612,12 @@ class GraphQL::Schema # @api private # - # source://graphql//lib/graphql/schema.rb#573 + # source://graphql//lib/graphql/schema.rb#572 def warden_class; end # @api private # - # source://graphql//lib/graphql/schema.rb#584 + # source://graphql//lib/graphql/schema.rb#583 def warden_class=(_arg0); end private @@ -9445,16 +9508,16 @@ GraphQL::Schema::Directive::UNION = T.let(T.unsafe(nil), Symbol) # source://graphql//lib/graphql/schema/directive.rb#148 GraphQL::Schema::Directive::VARIABLE_DEFINITION = T.let(T.unsafe(nil), Symbol) -# source://graphql//lib/graphql/schema.rb#80 +# source://graphql//lib/graphql/schema.rb#79 class GraphQL::Schema::DuplicateNamesError < ::GraphQL::Error # @return [DuplicateNamesError] a new instance of DuplicateNamesError # - # source://graphql//lib/graphql/schema.rb#82 + # source://graphql//lib/graphql/schema.rb#81 def initialize(duplicated_name:, duplicated_definition_1:, duplicated_definition_2:); end # Returns the value of attribute duplicated_name. # - # source://graphql//lib/graphql/schema.rb#81 + # source://graphql//lib/graphql/schema.rb#80 def duplicated_name; end end @@ -10539,11 +10602,12 @@ module GraphQL::Schema::Interface extend ::GraphQL::Schema::Member::Scoped extend ::GraphQL::Schema::Member::HasAstNode extend ::GraphQL::Schema::Member::HasUnresolvedTypeError + extend ::GraphQL::Schema::Member::HasDataloader extend ::GraphQL::Schema::Member::HasDirectives extend ::GraphQL::Schema::Member::HasInterfaces extend ::GraphQL::Schema::Interface::DefinitionMethods - # source://graphql//lib/graphql/schema/interface.rb#119 + # source://graphql//lib/graphql/schema/interface.rb#120 def unwrap; end end @@ -10560,6 +10624,7 @@ module GraphQL::Schema::Interface::DefinitionMethods include ::GraphQL::Schema::Member::Scoped include ::GraphQL::Schema::Member::HasAstNode include ::GraphQL::Schema::Member::HasUnresolvedTypeError + include ::GraphQL::Schema::Member::HasDataloader include ::GraphQL::Schema::Member::HasDirectives include ::GraphQL::Schema::Member::HasInterfaces @@ -10567,15 +10632,15 @@ module GraphQL::Schema::Interface::DefinitionMethods # - Added as class methods to this interface # - Added as class methods to all child interfaces # - # source://graphql//lib/graphql/schema/interface.rb#22 + # source://graphql//lib/graphql/schema/interface.rb#23 def definition_methods(&block); end # Here's the tricky part. Make sure behavior keeps making its way down the inheritance chain. # - # source://graphql//lib/graphql/schema/interface.rb#49 + # source://graphql//lib/graphql/schema/interface.rb#50 def included(child_class); end - # source://graphql//lib/graphql/schema/interface.rb#112 + # source://graphql//lib/graphql/schema/interface.rb#113 def kind; end # Register other Interface or Object types as implementers of this Interface. @@ -10586,16 +10651,16 @@ module GraphQL::Schema::Interface::DefinitionMethods # @param types [Class, Module] # @return [Array] Implementers of this interface, if they're registered # - # source://graphql//lib/graphql/schema/interface.rb#92 + # source://graphql//lib/graphql/schema/interface.rb#93 def orphan_types(*types); end - # source://graphql//lib/graphql/schema/interface.rb#40 + # source://graphql//lib/graphql/schema/interface.rb#41 def type_membership_class(membership_class = T.unsafe(nil)); end # @return [Boolean] # @see {Schema::Warden} hides interfaces without visible implementations # - # source://graphql//lib/graphql/schema/interface.rb#36 + # source://graphql//lib/graphql/schema/interface.rb#37 def visible?(context); end end @@ -10668,7 +10733,7 @@ end # Error that is raised when [#Schema#from_definition] is passed an invalid schema definition string. # -# source://graphql//lib/graphql/schema.rb#99 +# source://graphql//lib/graphql/schema.rb#98 class GraphQL::Schema::InvalidDocumentError < ::GraphQL::Error; end # A stand-in for a type which will be resolved in a given schema, by name. @@ -10801,15 +10866,15 @@ module GraphQL::Schema::Loader def load(introspection_result); end class << self - # source://graphql//lib/graphql/schema/loader.rb#197 + # source://graphql//lib/graphql/schema/loader.rb#198 def build_arguments(arg_owner, args, type_resolver); end - # source://graphql//lib/graphql/schema/loader.rb#173 + # source://graphql//lib/graphql/schema/loader.rb#174 def build_fields(type_defn, fields, type_resolver); end private - # source://graphql//lib/graphql/schema/loader.rb#160 + # source://graphql//lib/graphql/schema/loader.rb#161 def define_directive(directive, type_resolver); end # source://graphql//lib/graphql/schema/loader.rb#99 @@ -11259,6 +11324,48 @@ module GraphQL::Schema::Member::HasAstNode end end +# source://graphql//lib/graphql/schema/member/has_dataloader.rb#6 +module GraphQL::Schema::Member::HasDataloader + # A shortcut method for loading a key from a source. + # Identical to `dataloader.with(source_class, *source_args).load(load_key)` + # + # @param source_class [Class] + # @param source_args [Array] Any extra parameters defined in `source_class`'s `initialize` method + # @param load_key [Object] The key to look up using `def fetch` + # + # source://graphql//lib/graphql/schema/member/has_dataloader.rb#17 + def dataload(source_class, *source_args, load_key); end + + # Look up an associated record using a Rails association. + # + # @example Looking up a belongs_to on the current object + # dataload_association(:parent) # Equivalent to `object.parent`, but dataloaded + # @example Looking up an associated record on some other object + # dataload_association(:post, comment) # Equivalent to `comment.post`, but dataloaded + # @param association_name [Symbol] A `belongs_to` or `has_one` association. (If a `has_many` association is named here, it will be selected without pagination.) + # @param record [ActiveRecord::Base] The object that the association belongs to. + # @param scope [ActiveRecord::Relation] A scope to look up the associated record in + # @return [ActiveRecord::Base, nil] The associated record, if there is one + # + # source://graphql//lib/graphql/schema/member/has_dataloader.rb#45 + def dataload_association(record = T.unsafe(nil), association_name, scope: T.unsafe(nil)); end + + # Find an object with ActiveRecord via {Dataloader::ActiveRecordSource}. + # + # @param model [Class] + # @param find_by_value [Object] Usually an `id`, might be another value if `find_by:` is also provided + # @param find_by [Symbol, String] A column name to look the record up by. (Defaults to the model's primary key.) + # @return [ActiveRecord::Base, nil] + # + # source://graphql//lib/graphql/schema/member/has_dataloader.rb#26 + def dataload_record(model, find_by_value, find_by: T.unsafe(nil)); end + + # @return [GraphQL::Dataloader] The dataloader for the currently-running query + # + # source://graphql//lib/graphql/schema/member/has_dataloader.rb#8 + def dataloader; end +end + # source://graphql//lib/graphql/schema/member/has_deprecation_reason.rb#6 module GraphQL::Schema::Member::HasDeprecationReason # @return [String, nil] Explains why this member was deprecated (if present, this will be marked deprecated in introspection) @@ -11853,20 +11960,9 @@ class GraphQL::Schema::NonNull < ::GraphQL::Schema::Wrapper def validate_input(value, ctx, max_errors: T.unsafe(nil)); end end -# @api private -# -# source://graphql//lib/graphql/schema/null_mask.rb#5 -module GraphQL::Schema::NullMask - class << self - # @api private - # - # source://graphql//lib/graphql/schema/null_mask.rb#6 - def call(member, ctx); end - end -end - # source://graphql//lib/graphql/schema/object.rb#7 class GraphQL::Schema::Object < ::GraphQL::Schema::Member + include ::GraphQL::Schema::Member::HasDataloader extend ::GraphQL::Schema::Member::HasFields extend ::GraphQL::Schema::Member::HasFields::ObjectMethods extend ::GraphQL::Schema::Member::HasInterfaces @@ -11874,28 +11970,28 @@ class GraphQL::Schema::Object < ::GraphQL::Schema::Member # @return [Object] a new instance of Object # - # source://graphql//lib/graphql/schema/object.rb#112 + # source://graphql//lib/graphql/schema/object.rb#121 def initialize(object, context); end # @return [GraphQL::Query::Context] the context instance for this query # - # source://graphql//lib/graphql/schema/object.rb#23 + # source://graphql//lib/graphql/schema/object.rb#24 def context; end # @return [GraphQL::Dataloader] # - # source://graphql//lib/graphql/schema/object.rb#26 + # source://graphql//lib/graphql/schema/object.rb#27 def dataloader; end # @return [Object] the application object this type is wrapping # - # source://graphql//lib/graphql/schema/object.rb#20 + # source://graphql//lib/graphql/schema/object.rb#21 def object; end # Call this in a field method to return a value that should be returned to the client # without any further handling by GraphQL. # - # source://graphql//lib/graphql/schema/object.rb#32 + # source://graphql//lib/graphql/schema/object.rb#33 def raw_value(obj); end class << self @@ -11917,27 +12013,27 @@ class GraphQL::Schema::Object < ::GraphQL::Schema::Member # @raise [GraphQL::UnauthorizedError] if the user-provided hook returns `false` # @return [GraphQL::Schema::Object, GraphQL::Execution::Lazy] # - # source://graphql//lib/graphql/schema/object.rb#67 + # source://graphql//lib/graphql/schema/object.rb#68 def authorized_new(object, context); end # Set up a type-specific invalid null error to use when this object's non-null fields wrongly return `nil`. # It should help with debugging and bug tracker integrations. # - # source://graphql//lib/graphql/schema/object.rb#120 + # source://graphql//lib/graphql/schema/object.rb#129 def const_missing(name); end - # source://graphql//lib/graphql/schema/object.rb#130 + # source://graphql//lib/graphql/schema/object.rb#139 def kind; end - # source://graphql//lib/graphql/schema/object.rb#107 + # source://graphql//lib/graphql/schema/object.rb#116 def scoped_new(object, context); end # This is called by the runtime to return an object to call methods on. # - # source://graphql//lib/graphql/schema/object.rb#46 + # source://graphql//lib/graphql/schema/object.rb#47 def wrap(object, context); end - # source://graphql//lib/graphql/schema/object.rb#41 + # source://graphql//lib/graphql/schema/object.rb#42 def wrap_scoped(object, context); end protected @@ -11948,11 +12044,11 @@ end # Raised when an Object doesn't have any field defined and hasn't explicitly opted out of this requirement # -# source://graphql//lib/graphql/schema/object.rb#12 +# source://graphql//lib/graphql/schema/object.rb#13 class GraphQL::Schema::Object::FieldsAreRequiredError < ::GraphQL::Error # @return [FieldsAreRequiredError] a new instance of FieldsAreRequiredError # - # source://graphql//lib/graphql/schema/object.rb#13 + # source://graphql//lib/graphql/schema/object.rb#14 def initialize(object_type); end end @@ -12086,6 +12182,7 @@ class GraphQL::Schema::Resolver include ::GraphQL::Schema::Member::GraphQLTypeNames include ::GraphQL::Schema::Member::HasArguments::ArgumentObjectLoader include ::GraphQL::Schema::Member::HasPath + include ::GraphQL::Schema::Member::HasDataloader extend ::GraphQL::Schema::FindInheritedValue extend ::GraphQL::EmptyObjects extend ::GraphQL::Schema::Member::BaseDSLMethods @@ -12103,10 +12200,10 @@ class GraphQL::Schema::Resolver # @param field [GraphQL::Schema::Field] # @return [Resolver] a new instance of Resolver # - # source://graphql//lib/graphql/schema/resolver.rb#35 + # source://graphql//lib/graphql/schema/resolver.rb#36 def initialize(object:, context:, field:); end - # source://graphql//lib/graphql/schema/resolver.rb#61 + # source://graphql//lib/graphql/schema/resolver.rb#57 def arguments; end # Called after arguments are loaded, but before resolving. @@ -12118,32 +12215,27 @@ class GraphQL::Schema::Resolver # @raise [GraphQL::UnauthorizedError] To signal an authorization failure # @return [Boolean, early_return_data] If `false`, execution will stop (and `early_return_data` will be returned instead, if present.) # - # source://graphql//lib/graphql/schema/resolver.rb#155 + # source://graphql//lib/graphql/schema/resolver.rb#151 def authorized?(**inputs); end # @api private {GraphQL::Schema::Mutation} uses this to clear the dataloader cache # - # source://graphql//lib/graphql/schema/resolver.rb#120 + # source://graphql//lib/graphql/schema/resolver.rb#116 def call_resolve(args_hash); end # @return [GraphQL::Query::Context] # - # source://graphql//lib/graphql/schema/resolver.rb#51 + # source://graphql//lib/graphql/schema/resolver.rb#52 def context; end - # @return [GraphQL::Dataloader] - # - # source://graphql//lib/graphql/schema/resolver.rb#54 - def dataloader; end - # @return [GraphQL::Schema::Field] # - # source://graphql//lib/graphql/schema/resolver.rb#59 + # source://graphql//lib/graphql/schema/resolver.rb#55 def field; end # @return [Object] The application object this field is being resolved on # - # source://graphql//lib/graphql/schema/resolver.rb#48 + # source://graphql//lib/graphql/schema/resolver.rb#49 def object; end # Called before arguments are prepared. @@ -12157,7 +12249,7 @@ class GraphQL::Schema::Resolver # @raise [GraphQL::UnauthorizedError] To signal an authorization failure # @return [Boolean, early_return_data] If `false`, execution will stop (and `early_return_data` will be returned instead, if present.) # - # source://graphql//lib/graphql/schema/resolver.rb#144 + # source://graphql//lib/graphql/schema/resolver.rb#140 def ready?(**args); end # Do the work. Everything happens here. @@ -12165,7 +12257,7 @@ class GraphQL::Schema::Resolver # @raise [GraphQL::RequiredImplementationMissingError] # @return [Object] An object corresponding to the return type # - # source://graphql//lib/graphql/schema/resolver.rb#130 + # source://graphql//lib/graphql/schema/resolver.rb#126 def resolve(**args); end # This method is _actually_ called by the runtime, @@ -12174,7 +12266,7 @@ class GraphQL::Schema::Resolver # # @api private # - # source://graphql//lib/graphql/schema/resolver.rb#69 + # source://graphql//lib/graphql/schema/resolver.rb#65 def resolve_with_support(**args); end # Called when an object loaded by `loads:` fails the `.authorized?` check for its resolved GraphQL object type. @@ -12185,27 +12277,27 @@ class GraphQL::Schema::Resolver # # @param err [GraphQL::UnauthorizedError] # - # source://graphql//lib/graphql/schema/resolver.rb#167 + # source://graphql//lib/graphql/schema/resolver.rb#163 def unauthorized_object(err); end private - # source://graphql//lib/graphql/schema/resolver.rb#173 + # source://graphql//lib/graphql/schema/resolver.rb#169 def authorize_arguments(args, inputs); end - # source://graphql//lib/graphql/schema/resolver.rb#219 + # source://graphql//lib/graphql/schema/resolver.rb#215 def get_argument(name, context = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema/resolver.rb#192 + # source://graphql//lib/graphql/schema/resolver.rb#188 def load_arguments(args); end class << self - # source://graphql//lib/graphql/schema/resolver.rb#236 + # source://graphql//lib/graphql/schema/resolver.rb#232 def all_field_argument_definitions; end # @return [Boolean] # - # source://graphql//lib/graphql/schema/resolver.rb#228 + # source://graphql//lib/graphql/schema/resolver.rb#224 def any_field_arguments?; end # Add an argument to this field's signature, but @@ -12213,22 +12305,22 @@ class GraphQL::Schema::Resolver # # @see {GraphQL::Schema::Argument#initialize} for the signature # - # source://graphql//lib/graphql/schema/resolver.rb#377 + # source://graphql//lib/graphql/schema/resolver.rb#373 def argument(*args, **kwargs, &block); end - # source://graphql//lib/graphql/schema/resolver.rb#314 + # source://graphql//lib/graphql/schema/resolver.rb#310 def broadcastable(new_broadcastable); end # @return [Boolean, nil] # - # source://graphql//lib/graphql/schema/resolver.rb#319 + # source://graphql//lib/graphql/schema/resolver.rb#315 def broadcastable?; end # Specifies the complexity of the field. Defaults to `1` # # @return [Integer, Proc] # - # source://graphql//lib/graphql/schema/resolver.rb#307 + # source://graphql//lib/graphql/schema/resolver.rb#303 def complexity(new_complexity = T.unsafe(nil)); end # Get or set the `default_page_size:` which will be configured for fields using this resolver @@ -12237,7 +12329,7 @@ class GraphQL::Schema::Resolver # @param default_page_size [Integer, nil] Set a new value # @return [Integer, nil] The `default_page_size` assigned to fields that use this resolver # - # source://graphql//lib/graphql/schema/resolver.rb#352 + # source://graphql//lib/graphql/schema/resolver.rb#348 def default_page_size(new_default_page_size = T.unsafe(nil)); end # Registers new extension @@ -12245,35 +12337,35 @@ class GraphQL::Schema::Resolver # @param extension [Class] Extension class # @param options [Hash] Optional extension options # - # source://graphql//lib/graphql/schema/resolver.rb#386 + # source://graphql//lib/graphql/schema/resolver.rb#382 def extension(extension, **options); end # @api private # - # source://graphql//lib/graphql/schema/resolver.rb#392 + # source://graphql//lib/graphql/schema/resolver.rb#388 def extensions; end # Additional info injected into {#resolve} # # @see {GraphQL::Schema::Field#extras} # - # source://graphql//lib/graphql/schema/resolver.rb#251 + # source://graphql//lib/graphql/schema/resolver.rb#247 def extras(new_extras = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema/resolver.rb#224 + # source://graphql//lib/graphql/schema/resolver.rb#220 def field_arguments(context = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema/resolver.rb#232 + # source://graphql//lib/graphql/schema/resolver.rb#228 def get_field_argument(name, context = T.unsafe(nil)); end # @return [Boolean] `true` if this resolver or a superclass has an assigned `default_page_size` # - # source://graphql//lib/graphql/schema/resolver.rb#365 + # source://graphql//lib/graphql/schema/resolver.rb#361 def has_default_page_size?; end # @return [Boolean] `true` if this resolver or a superclass has an assigned `max_page_size` # - # source://graphql//lib/graphql/schema/resolver.rb#344 + # source://graphql//lib/graphql/schema/resolver.rb#340 def has_max_page_size?; end # Get or set the `max_page_size:` which will be configured for fields using this resolver @@ -12282,7 +12374,7 @@ class GraphQL::Schema::Resolver # @param max_page_size [Integer, nil] Set a new value # @return [Integer, nil] The `max_page_size` assigned to fields that use this resolver # - # source://graphql//lib/graphql/schema/resolver.rb#331 + # source://graphql//lib/graphql/schema/resolver.rb#327 def max_page_size(new_max_page_size = T.unsafe(nil)); end # If `true` (default), then the return type for this resolver will be nullable. @@ -12291,17 +12383,17 @@ class GraphQL::Schema::Resolver # @param allow_null [Boolean] Whether or not the response can be null # @see #type which sets the return type of this field and accepts a `null:` option # - # source://graphql//lib/graphql/schema/resolver.rb#264 + # source://graphql//lib/graphql/schema/resolver.rb#260 def null(allow_null = T.unsafe(nil)); end # Default `:resolve` set below. # # @return [Symbol] The method to call on instances of this object to resolve the field # - # source://graphql//lib/graphql/schema/resolver.rb#242 + # source://graphql//lib/graphql/schema/resolver.rb#238 def resolve_method(new_method = T.unsafe(nil)); end - # source://graphql//lib/graphql/schema/resolver.rb#272 + # source://graphql//lib/graphql/schema/resolver.rb#268 def resolver_method(new_method_name = T.unsafe(nil)); end # Call this method to get the return type of the field, @@ -12313,19 +12405,19 @@ class GraphQL::Schema::Resolver # @param null [true, false] Whether or not the field may return `nil` # @return [Class] The type which this field returns. # - # source://graphql//lib/graphql/schema/resolver.rb#287 + # source://graphql//lib/graphql/schema/resolver.rb#283 def type(new_type = T.unsafe(nil), null: T.unsafe(nil)); end # A non-normalized type configuration, without `null` applied # - # source://graphql//lib/graphql/schema/resolver.rb#370 + # source://graphql//lib/graphql/schema/resolver.rb#366 def type_expr; end private # Returns the value of attribute own_extensions. # - # source://graphql//lib/graphql/schema/resolver.rb#413 + # source://graphql//lib/graphql/schema/resolver.rb#409 def own_extensions; end end end @@ -12820,16 +12912,16 @@ module GraphQL::Schema::UniqueWithinType end end -# source://graphql//lib/graphql/schema.rb#90 +# source://graphql//lib/graphql/schema.rb#89 class GraphQL::Schema::UnresolvedLateBoundTypeError < ::GraphQL::Error # @return [UnresolvedLateBoundTypeError] a new instance of UnresolvedLateBoundTypeError # - # source://graphql//lib/graphql/schema.rb#92 + # source://graphql//lib/graphql/schema.rb#91 def initialize(type:); end # Returns the value of attribute type. # - # source://graphql//lib/graphql/schema.rb#91 + # source://graphql//lib/graphql/schema.rb#90 def type; end end @@ -13180,21 +13272,21 @@ end class GraphQL::Schema::Visibility # @return [Visibility] a new instance of Visibility # - # source://graphql//lib/graphql/schema/visibility.rb#22 + # source://graphql//lib/graphql/schema/visibility.rb#26 def initialize(schema, dynamic:, preload:, profiles:, migration_errors:); end - # source://graphql//lib/graphql/schema/visibility.rb#44 + # source://graphql//lib/graphql/schema/visibility.rb#48 def all_directives; end - # source://graphql//lib/graphql/schema/visibility.rb#49 + # source://graphql//lib/graphql/schema/visibility.rb#53 def all_interface_type_memberships; end - # source://graphql//lib/graphql/schema/visibility.rb#54 + # source://graphql//lib/graphql/schema/visibility.rb#58 def all_references; end # Returns the value of attribute cached_profiles. # - # source://graphql//lib/graphql/schema/visibility.rb#146 + # source://graphql//lib/graphql/schema/visibility.rb#149 def cached_profiles; end # Make another Visibility for `schema` based on this one @@ -13202,72 +13294,72 @@ class GraphQL::Schema::Visibility # @api private # @return [Visibility] # - # source://graphql//lib/graphql/schema/visibility.rb#132 + # source://graphql//lib/graphql/schema/visibility.rb#135 def dup_for(other_schema); end - # source://graphql//lib/graphql/schema/visibility.rb#59 + # source://graphql//lib/graphql/schema/visibility.rb#63 def get_type(type_name); end # @api private # - # source://graphql//lib/graphql/schema/visibility.rb#119 + # source://graphql//lib/graphql/schema/visibility.rb#122 def introspection_system_configured(introspection_system); end # @return [Boolean] # - # source://graphql//lib/graphql/schema/visibility.rb#142 + # source://graphql//lib/graphql/schema/visibility.rb#145 def migration_errors?; end # @api private # - # source://graphql//lib/graphql/schema/visibility.rb#98 + # source://graphql//lib/graphql/schema/visibility.rb#101 def mutation_configured(mutation_type); end # @api private # - # source://graphql//lib/graphql/schema/visibility.rb#112 + # source://graphql//lib/graphql/schema/visibility.rb#115 def orphan_types_configured(orphan_types); end - # source://graphql//lib/graphql/schema/visibility.rb#68 + # source://graphql//lib/graphql/schema/visibility.rb#72 def preload; end # @return [Boolean] # - # source://graphql//lib/graphql/schema/visibility.rb#64 + # source://graphql//lib/graphql/schema/visibility.rb#68 def preload?; end - # source://graphql//lib/graphql/schema/visibility.rb#148 - def profile_for(context, visibility_profile); end + # source://graphql//lib/graphql/schema/visibility.rb#151 + def profile_for(context, visibility_profile = T.unsafe(nil)); end # @api private # - # source://graphql//lib/graphql/schema/visibility.rb#91 + # source://graphql//lib/graphql/schema/visibility.rb#94 def query_configured(query_type); end # @api private # - # source://graphql//lib/graphql/schema/visibility.rb#105 + # source://graphql//lib/graphql/schema/visibility.rb#108 def subscription_configured(subscription_type); end # Returns the value of attribute top_level. # - # source://graphql//lib/graphql/schema/visibility.rb#172 + # source://graphql//lib/graphql/schema/visibility.rb#176 def top_level; end - # source://graphql//lib/graphql/schema/visibility.rb#177 + # source://graphql//lib/graphql/schema/visibility.rb#181 def top_level_profile(refresh: T.unsafe(nil)); end # @api private # - # source://graphql//lib/graphql/schema/visibility.rb#175 + # source://graphql//lib/graphql/schema/visibility.rb#179 def unfiltered_interface_type_memberships; end private - # source://graphql//lib/graphql/schema/visibility.rb#186 + # source://graphql//lib/graphql/schema/visibility.rb#190 def ensure_all_loaded(types_to_visit); end - # source://graphql//lib/graphql/schema/visibility.rb#199 + # source://graphql//lib/graphql/schema/visibility.rb#203 def load_all(types: T.unsafe(nil)); end class << self @@ -15809,7 +15901,7 @@ class GraphQL::StaticValidation::Validator # @param query [GraphQL::Query] # @param context [GraphQL::StaticValidation::ValidationContext] # - # source://graphql//lib/graphql/static_validation/validator.rb#70 + # source://graphql//lib/graphql/static_validation/validator.rb#75 def handle_timeout(query, context); end # Validate `query` against the schema. Returns an array of message hashes. @@ -17378,81 +17470,85 @@ end # source://graphql//lib/graphql/tracing/new_relic_trace.rb#7 module GraphQL::Tracing::NewRelicTrace - include ::GraphQL::Tracing::PlatformTrace - # @param set_transaction_name [Boolean] If true, the GraphQL operation name will be used as the transaction name. # This is not advised if you run more than one query per HTTP request, for example, with `graphql-client` or multiplexing. # It can also be specified per-query with `context[:set_new_relic_transaction_name]`. + # @param trace_authorized [Boolean] If `false`, skip tracing `authorized?` calls + # @param trace_resolve_type [Boolean] If `false`, skip tracing `resolve_type?` calls # # source://graphql//lib/graphql/tracing/new_relic_trace.rb#13 - def initialize(set_transaction_name: T.unsafe(nil), **_rest); end + def initialize(set_transaction_name: T.unsafe(nil), trace_authorized: T.unsafe(nil), trace_resolve_type: T.unsafe(nil), **_rest); end - # source://graphql//lib/graphql/tracing/new_relic_trace.rb#37 - def analyze_multiplex(**_keys); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#57 + def begin_analyze_multiplex(multiplex, analyzers); end - # source://graphql//lib/graphql/tracing/new_relic_trace.rb#37 - def analyze_query(**_keys); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#92 + def begin_authorized(type, obj, ctx); end - # source://graphql//lib/graphql/tracing/platform_trace.rb#72 - def authorized(type:, query:, object:); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#120 + def begin_dataloader(dl); end - # source://graphql//lib/graphql/tracing/platform_trace.rb#72 - def authorized_lazy(type:, query:, object:); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#128 + def begin_dataloader_source(source); end - # source://graphql//lib/graphql/tracing/platform_trace.rb#44 - def execute_field(query:, field:, ast_node:, arguments:, object:); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#82 + def begin_execute_field(field, object, arguments, query); end - # source://graphql//lib/graphql/tracing/platform_trace.rb#44 - def execute_field_lazy(query:, field:, ast_node:, arguments:, object:); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#67 + def begin_execute_multiplex(multiplex); end # source://graphql//lib/graphql/tracing/new_relic_trace.rb#37 - def execute_multiplex(**_keys); end + def begin_parse(query_str); end - # source://graphql//lib/graphql/tracing/new_relic_trace.rb#18 - def execute_query(query:); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#106 + def begin_resolve_type(type, value, context); end - # source://graphql//lib/graphql/tracing/new_relic_trace.rb#37 - def execute_query_lazy(**_keys); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#47 + def begin_validate(query, validate); end - # source://graphql//lib/graphql/tracing/new_relic_trace.rb#37 - def lex(**_keys); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#144 + def dataloader_fiber_resume(source); end - # source://graphql//lib/graphql/tracing/new_relic_trace.rb#37 - def parse(**_keys); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#138 + def dataloader_fiber_yield(source); end - # source://graphql//lib/graphql/tracing/new_relic_trace.rb#52 - def platform_authorized(platform_key); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#62 + def end_analyze_multiplex(multiplex, analyzers); end - # source://graphql//lib/graphql/tracing/new_relic_trace.rb#68 - def platform_authorized_key(type); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#99 + def end_authorized(type, obj, ctx, is_authed); end - # source://graphql//lib/graphql/tracing/new_relic_trace.rb#46 - def platform_execute_field(platform_key); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#124 + def end_dataloader(dl); end - # source://graphql//lib/graphql/tracing/new_relic_trace.rb#64 - def platform_field_key(field); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#133 + def end_dataloader_source(source); end - # source://graphql//lib/graphql/tracing/new_relic_trace.rb#58 - def platform_resolve_type(platform_key); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#87 + def end_execute_field(field, objects, arguments, query, result); end - # source://graphql//lib/graphql/tracing/new_relic_trace.rb#72 - def platform_resolve_type_key(type); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#77 + def end_execute_multiplex(multiplex); end - # source://graphql//lib/graphql/tracing/platform_trace.rb#85 - def resolve_type(query:, type:, object:); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#42 + def end_parse(query_str); end - # source://graphql//lib/graphql/tracing/platform_trace.rb#85 - def resolve_type_lazy(query:, type:, object:); end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#113 + def end_resolve_type(type, value, context, resolved_type); end - # source://graphql//lib/graphql/tracing/new_relic_trace.rb#37 - def validate(**_keys); end -end + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#52 + def end_validate(query, validate, validation_errors); end -# source://graphql//lib/graphql/tracing/new_relic_trace.rb#0 -class GraphQL::Tracing::NewRelicTrace::KeyCache - include ::GraphQL::Tracing::PlatformTrace - include ::GraphQL::Tracing::NewRelicTrace - include ::GraphQL::Tracing::PlatformTrace::BaseKeyCache + private + + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#169 + def fallback_transaction_name(context); end + + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#153 + def nr_segment_stack; end + + # source://graphql//lib/graphql/tracing/new_relic_trace.rb#157 + def transaction_name(query); end end # source://graphql//lib/graphql/tracing/new_relic_tracing.rb#7 @@ -17584,19 +17680,316 @@ GraphQL::Tracing::NotificationsTracing::MAX_KEYS_SIZE = T.let(T.unsafe(nil), Int # source://graphql//lib/graphql/tracing/null_trace.rb#7 GraphQL::Tracing::NullTrace = T.let(T.unsafe(nil), GraphQL::Tracing::Trace) -# source://graphql//lib/graphql/tracing.rb#65 +# source://graphql//lib/graphql/tracing.rb#66 module GraphQL::Tracing::NullTracer private - # source://graphql//lib/graphql/tracing.rb#67 + # source://graphql//lib/graphql/tracing.rb#68 def trace(k, v); end class << self - # source://graphql//lib/graphql/tracing.rb#67 + # source://graphql//lib/graphql/tracing.rb#68 def trace(k, v); end end end +# This produces a trace file for inspecting in the [Perfetto Trace Viewer](https://ui.perfetto.dev). +# +# To get the file, call {#write} on the trace. +# +# Use "trace modes" to configure this to run on command or on a sample of traffic. +# +# @example Writing trace output +# +# result = MySchema.execute(...) +# result.query.trace.write(file: "tmp/trace.dump") +# @example Running this instrumenter when `trace: true` is present in the request +# +# class MySchema < GraphQL::Schema +# # Only run this tracer when `context[:trace_mode]` is `:trace` +# trace_with GraphQL::Tracing::Perfetto, mode: :trace +# end +# +# # In graphql_controller.rb: +# +# context[:trace_mode] = params[:trace] ? :trace : nil +# result = MySchema.execute(query_str, context: context, variables: variables, ...) +# if context[:trace_mode] == :trace +# result.trace.write(file: ...) +# end +# +# source://graphql//lib/graphql/tracing/perfetto_trace.rb#30 +module GraphQL::Tracing::PerfettoTrace + # @param active_support_notifications_pattern [String, RegExp, false] A filter for `ActiveSupport::Notifications`, if it's present. Or `false` to skip subscribing. + # + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#64 + def initialize(active_support_notifications_pattern: T.unsafe(nil), **_rest); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#228 + def begin_analyze_multiplex(m, analyzers); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#441 + def begin_authorized(type, obj, ctx); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#386 + def begin_dataloader(dl); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#406 + def begin_dataloader_source(source); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#195 + def begin_execute_field(field, object, arguments, query); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#174 + def begin_execute_multiplex(m); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#253 + def begin_parse(str); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#467 + def begin_resolve_type(type, value, context); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#274 + def begin_validate(query, validate); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#374 + def dataloader_fiber_exit; end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#355 + def dataloader_fiber_resume(source); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#333 + def dataloader_fiber_yield(source); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#307 + def dataloader_spawn_execution_fiber(jobs); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#320 + def dataloader_spawn_source_fiber(pending_sources); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#243 + def end_analyze_multiplex(m, analyzers); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#455 + def end_authorized(type, obj, ctx, is_authorized); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#397 + def end_dataloader(dl); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#430 + def end_dataloader_source(source); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#209 + def end_execute_field(field, object, arguments, query, app_result); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#186 + def end_execute_multiplex(m); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#264 + def end_parse(str); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#481 + def end_resolve_type(type, value, context, resolved_type); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#288 + def end_validate(query, validate, validation_errors); end + + # Dump protobuf output in the specified file. + # + # @param file [String] path to a file in a directory that already exists + # @param debug_json [Boolean] True to print JSON instead of binary + # @return [nil, String, Hash] If `file` was given, `nil`. If `file` was `nil`, a Hash if `debug_json: true`, else binary data. + # + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#497 + def write(file:, debug_json: T.unsafe(nil)); end + + private + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#591 + def count_allocations; end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#595 + def count_fibers(diff); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#599 + def count_fields; end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#530 + def debug_annotation(iid, value_key, value); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#603 + def dup_with(message, attrs, delete_counters: T.unsafe(nil)); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#613 + def fiber_flow_stack; end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#526 + def fid; end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#627 + def new_interned_data; end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#538 + def payload_to_debug(k, v, iid: T.unsafe(nil), intern_value: T.unsafe(nil)); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#683 + def subscribe_to_active_support_notifications(pattern); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#522 + def tid; end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#617 + def trace_packet(event_attrs); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#654 + def track_descriptor_packet(parent_uuid, uuid, name, counter: T.unsafe(nil)); end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#518 + def ts; end + + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#677 + def unsubscribe_from_active_support_notifications; end + + class << self + # @private + # + # source://graphql//lib/graphql/tracing/perfetto_trace.rb#45 + def included(_trace_class); end + end +end + +# source://graphql//lib/graphql/tracing/perfetto_trace.rb#53 +GraphQL::Tracing::PerfettoTrace::ACTIVE_SUPPORT_NOTIFICATIONS_CATEGORY_IIDS = T.let(T.unsafe(nil), Array) + +# source://graphql//lib/graphql/tracing/perfetto_trace.rb#54 +GraphQL::Tracing::PerfettoTrace::AUTHORIZED_CATEGORY_IIDS = T.let(T.unsafe(nil), Array) + +class GraphQL::Tracing::PerfettoTrace::CounterDescriptor < ::Google::Protobuf::AbstractMessage; end + +module GraphQL::Tracing::PerfettoTrace::CounterDescriptor::BuiltinCounterType + class << self + def descriptor; end + def lookup(_arg0); end + def resolve(_arg0); end + end +end + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#24 +GraphQL::Tracing::PerfettoTrace::CounterDescriptor::BuiltinCounterType::COUNTER_THREAD_INSTRUCTION_COUNT = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#24 +GraphQL::Tracing::PerfettoTrace::CounterDescriptor::BuiltinCounterType::COUNTER_THREAD_TIME_NS = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#24 +GraphQL::Tracing::PerfettoTrace::CounterDescriptor::BuiltinCounterType::COUNTER_UNSPECIFIED = T.let(T.unsafe(nil), Integer) + +module GraphQL::Tracing::PerfettoTrace::CounterDescriptor::Unit + class << self + def descriptor; end + def lookup(_arg0); end + def resolve(_arg0); end + end +end + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#25 +GraphQL::Tracing::PerfettoTrace::CounterDescriptor::Unit::UNIT_COUNT = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#25 +GraphQL::Tracing::PerfettoTrace::CounterDescriptor::Unit::UNIT_SIZE_BYTES = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#25 +GraphQL::Tracing::PerfettoTrace::CounterDescriptor::Unit::UNIT_TIME_NS = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#25 +GraphQL::Tracing::PerfettoTrace::CounterDescriptor::Unit::UNIT_UNSPECIFIED = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace.rb#51 +GraphQL::Tracing::PerfettoTrace::DATALOADER_CATEGORY_IIDS = T.let(T.unsafe(nil), Array) + +# source://graphql//lib/graphql/tracing/perfetto_trace.rb#59 +GraphQL::Tracing::PerfettoTrace::DA_ARGUMENTS_IID = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace.rb#60 +GraphQL::Tracing::PerfettoTrace::DA_FETCH_KEYS_IID = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace.rb#57 +GraphQL::Tracing::PerfettoTrace::DA_OBJECT_IID = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace.rb#58 +GraphQL::Tracing::PerfettoTrace::DA_RESULT_IID = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace.rb#61 +GraphQL::Tracing::PerfettoTrace::DA_STR_VAL_NIL_IID = T.let(T.unsafe(nil), Integer) + +class GraphQL::Tracing::PerfettoTrace::DebugAnnotation < ::Google::Protobuf::AbstractMessage; end +class GraphQL::Tracing::PerfettoTrace::DebugAnnotationName < ::Google::Protobuf::AbstractMessage; end +class GraphQL::Tracing::PerfettoTrace::EventCategory < ::Google::Protobuf::AbstractMessage; end +class GraphQL::Tracing::PerfettoTrace::EventName < ::Google::Protobuf::AbstractMessage; end + +# source://graphql//lib/graphql/tracing/perfetto_trace.rb#52 +GraphQL::Tracing::PerfettoTrace::FIELD_EXECUTE_CATEGORY_IIDS = T.let(T.unsafe(nil), Array) + +class GraphQL::Tracing::PerfettoTrace::InternedData < ::Google::Protobuf::AbstractMessage; end +class GraphQL::Tracing::PerfettoTrace::InternedString < ::Google::Protobuf::AbstractMessage; end + +# TODOs: +# - Make debug annotations visible on both parts when dataloader is involved +# +# source://graphql//lib/graphql/tracing/perfetto_trace.rb#34 +GraphQL::Tracing::PerfettoTrace::PROTOBUF_AVAILABLE = T.let(T.unsafe(nil), TrueClass) + +# source://graphql//lib/graphql/tracing/perfetto_trace.rb#55 +GraphQL::Tracing::PerfettoTrace::RESOLVE_TYPE_CATEGORY_IIDS = T.let(T.unsafe(nil), Array) + +class GraphQL::Tracing::PerfettoTrace::Trace < ::Google::Protobuf::AbstractMessage; end +class GraphQL::Tracing::PerfettoTrace::TracePacket < ::Google::Protobuf::AbstractMessage; end +class GraphQL::Tracing::PerfettoTrace::TrackDescriptor < ::Google::Protobuf::AbstractMessage; end + +module GraphQL::Tracing::PerfettoTrace::TrackDescriptor::ChildTracksOrdering + class << self + def descriptor; end + def lookup(_arg0); end + def resolve(_arg0); end + end +end + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#22 +GraphQL::Tracing::PerfettoTrace::TrackDescriptor::ChildTracksOrdering::CHRONOLOGICAL = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#22 +GraphQL::Tracing::PerfettoTrace::TrackDescriptor::ChildTracksOrdering::EXPLICIT = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#22 +GraphQL::Tracing::PerfettoTrace::TrackDescriptor::ChildTracksOrdering::LEXICOGRAPHIC = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#22 +GraphQL::Tracing::PerfettoTrace::TrackDescriptor::ChildTracksOrdering::UNKNOWN = T.let(T.unsafe(nil), Integer) + +class GraphQL::Tracing::PerfettoTrace::TrackEvent < ::Google::Protobuf::AbstractMessage; end + +module GraphQL::Tracing::PerfettoTrace::TrackEvent::Type + class << self + def descriptor; end + def lookup(_arg0); end + def resolve(_arg0); end + end +end + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#19 +GraphQL::Tracing::PerfettoTrace::TrackEvent::Type::TYPE_COUNTER = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#19 +GraphQL::Tracing::PerfettoTrace::TrackEvent::Type::TYPE_INSTANT = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#19 +GraphQL::Tracing::PerfettoTrace::TrackEvent::Type::TYPE_SLICE_BEGIN = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#19 +GraphQL::Tracing::PerfettoTrace::TrackEvent::Type::TYPE_SLICE_END = T.let(T.unsafe(nil), Integer) + +# source://graphql//lib/graphql/tracing/perfetto_trace/trace_pb.rb#19 +GraphQL::Tracing::PerfettoTrace::TrackEvent::Type::TYPE_UNSPECIFIED = T.let(T.unsafe(nil), Integer) + # source://graphql//lib/graphql/tracing/platform_trace.rb#5 module GraphQL::Tracing::PlatformTrace # source://graphql//lib/graphql/tracing/platform_trace.rb#6 @@ -18174,31 +18567,222 @@ class GraphQL::Tracing::Trace # source://graphql//lib/graphql/tracing/trace.rb#16 def initialize(multiplex: T.unsafe(nil), query: T.unsafe(nil), **_options); end - # source://graphql//lib/graphql/tracing/trace.rb#34 + # @param multiplex [GraphQL::Execution::Multiplex] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#58 def analyze_multiplex(multiplex:); end - # source://graphql//lib/graphql/tracing/trace.rb#38 + # source://graphql//lib/graphql/tracing/trace.rb#62 def analyze_query(query:); end - # source://graphql//lib/graphql/tracing/trace.rb#62 + # source://graphql//lib/graphql/tracing/trace.rb#114 def authorized(query:, type:, object:); end - # source://graphql//lib/graphql/tracing/trace.rb#66 + # source://graphql//lib/graphql/tracing/trace.rb#134 def authorized_lazy(query:, type:, object:); end - # source://graphql//lib/graphql/tracing/trace.rb#54 + # @param multiplex [GraphQL::Execution::Multiplex] + # @param analyzers [Array] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#51 + def begin_analyze_multiplex(multiplex, analyzers); end + + # A call to `.authorized?` is starting + # + # @param type [Class] + # @param object [Object] + # @param context [GraphQL::Query::Context] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#123 + def begin_authorized(type, object, context); end + + # A dataloader run is starting + # + # @param dataloader [GraphQL::Dataloader] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#166 + def begin_dataloader(dataloader); end + + # A source with pending keys is about to fetch + # + # @param source [GraphQL::Dataloader::Source] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#175 + def begin_dataloader_source(source); end + + # GraphQL is about to resolve this field + # + # @param field [GraphQL::Schema::Field] + # @param object [GraphQL::Schema::Object] + # @param arguments [Hash] + # @param query [GraphQL::Query] + # + # source://graphql//lib/graphql/tracing/trace.rb#97 + def begin_execute_field(field, object, arguments, query); end + + # This is the first event in the tracing lifecycle. + # Every Query is technically run _inside_ a {GraphQL::Multiplex}. + # + # @param multiplex [GraphQL::Execution::Multiplex] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#70 + def begin_execute_multiplex(multiplex); end + + # @param query_str [String] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#28 + def begin_parse(query_str); end + + # A call to `.resolve_type` is starting + # + # @param type [Class, Module] + # @param value [Object] + # @param context [GraphQL::Query::Context] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#151 + def begin_resolve_type(type, value, context); end + + # source://graphql//lib/graphql/tracing/trace.rb#42 + def begin_validate(query, validate); end + + # Called when an execution or source fiber terminates + # + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#191 + def dataloader_fiber_exit; end + + # Called when a Dataloader fiber is resumed because data has been loaded + # + # @param source [GraphQL::Dataloader::Source] The Source whose `load` call previously caused this Fiber to wait + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#200 + def dataloader_fiber_resume(source); end + + # Called when a Dataloader fiber is paused to wait for data + # + # @param source [GraphQL::Dataloader::Source] The Source whose `load` call initiated this `yield` + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#196 + def dataloader_fiber_yield(source); end + + # Called when Dataloader spins up a new fiber for GraphQL execution + # + # @param jobs [Array<#call>] Execution steps to run + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#184 + def dataloader_spawn_execution_fiber(jobs); end + + # Called when Dataloader spins up a new fiber for fetching data + # + # @param pending_sources [GraphQL::Dataloader::Source] Instances with pending keys + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#188 + def dataloader_spawn_source_fiber(pending_sources); end + + # @param multiplex [GraphQL::Execution::Multiplex] + # @param analyzers [Array] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#55 + def end_analyze_multiplex(multiplex, analyzers); end + + # A call to `.authorized?` just finished + # + # @param type [Class] + # @param object [Object] + # @param context [GraphQL::Query::Context] + # @param authorized_result [Boolean] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#131 + def end_authorized(type, object, context, authorized_result); end + + # A dataloader run has ended + # + # @param dataloder [GraphQL::Dataloader] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#170 + def end_dataloader(dataloader); end + + # A fetch call has just ended + # + # @param source [GraphQL::Dataloader::Source] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#179 + def end_dataloader_source(source); end + + # GraphQL just finished resolving this field + # + # @param field [GraphQL::Schema::Field] + # @param object [GraphQL::Schema::Object] + # @param arguments [Hash] + # @param query [GraphQL::Query] + # @param result [Object] + # + # source://graphql//lib/graphql/tracing/trace.rb#104 + def end_execute_field(field, object, arguments, query, result); end + + # This is the last event of the tracing lifecycle. + # + # @param multiplex [GraphQL::Execution::Multiplex] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#75 + def end_execute_multiplex(multiplex); end + + # @param query_str [String] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#31 + def end_parse(query_str); end + + # A call to `.resolve_type` just ended + # + # @param type [Class, Module] + # @param value [Object] + # @param context [GraphQL::Query::Context] + # @param resolved_type [Class] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#160 + def end_resolve_type(type, value, context, resolved_type); end + + # source://graphql//lib/graphql/tracing/trace.rb#45 + def end_validate(query, validate, errors); end + + # source://graphql//lib/graphql/tracing/trace.rb#106 def execute_field(field:, query:, ast_node:, arguments:, object:); end - # source://graphql//lib/graphql/tracing/trace.rb#58 + # source://graphql//lib/graphql/tracing/trace.rb#110 def execute_field_lazy(field:, query:, ast_node:, arguments:, object:); end - # source://graphql//lib/graphql/tracing/trace.rb#42 + # This wraps an entire `.execute` call. + # + # @param multiplex [GraphQL::Execution::Multiplex] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#80 def execute_multiplex(multiplex:); end - # source://graphql//lib/graphql/tracing/trace.rb#46 + # source://graphql//lib/graphql/tracing/trace.rb#84 def execute_query(query:); end - # source://graphql//lib/graphql/tracing/trace.rb#50 + # source://graphql//lib/graphql/tracing/trace.rb#88 def execute_query_lazy(query:, multiplex:); end # The Ruby parser doesn't call this method (`graphql/c_parser` does.) @@ -18206,16 +18790,19 @@ class GraphQL::Tracing::Trace # source://graphql//lib/graphql/tracing/trace.rb#22 def lex(query_string:); end - # source://graphql//lib/graphql/tracing/trace.rb#26 + # @param query_string [String] + # @return [void] + # + # source://graphql//lib/graphql/tracing/trace.rb#34 def parse(query_string:); end - # source://graphql//lib/graphql/tracing/trace.rb#70 + # source://graphql//lib/graphql/tracing/trace.rb#138 def resolve_type(query:, type:, object:); end - # source://graphql//lib/graphql/tracing/trace.rb#74 + # source://graphql//lib/graphql/tracing/trace.rb#142 def resolve_type_lazy(query:, type:, object:); end - # source://graphql//lib/graphql/tracing/trace.rb#30 + # source://graphql//lib/graphql/tracing/trace.rb#38 def validate(query:, validate:); end end @@ -18224,14 +18811,14 @@ end # # @api private # -# source://graphql//lib/graphql/tracing.rb#38 +# source://graphql//lib/graphql/tracing.rb#39 module GraphQL::Tracing::Traceable # @api private # @param key [String] The name of the event in GraphQL internals # @param metadata [Hash] Event-related metadata (can be anything) # @return [Object] Must return the value of the block # - # source://graphql//lib/graphql/tracing.rb#42 + # source://graphql//lib/graphql/tracing.rb#43 def trace(key, metadata, &block); end private @@ -18245,7 +18832,7 @@ module GraphQL::Tracing::Traceable # @param metadata [Object] The current event object # @return Whatever the block returns # - # source://graphql//lib/graphql/tracing.rb#56 + # source://graphql//lib/graphql/tracing.rb#57 def call_tracers(idx, key, metadata, &block); end end @@ -18988,6 +19575,7 @@ module GraphQL::Types::Relay::Node extend ::GraphQL::Schema::Member::Scoped extend ::GraphQL::Schema::Member::HasAstNode extend ::GraphQL::Schema::Member::HasUnresolvedTypeError + extend ::GraphQL::Schema::Member::HasDataloader extend ::GraphQL::Schema::Member::HasDirectives extend ::GraphQL::Schema::Member::HasInterfaces extend ::GraphQL::Schema::Interface::DefinitionMethods diff --git a/sorbet/rbi/gems/lint_roller@1.1.0.rbi b/sorbet/rbi/gems/lint_roller@1.1.0.rbi new file mode 100644 index 000000000..ef073b8c7 --- /dev/null +++ b/sorbet/rbi/gems/lint_roller@1.1.0.rbi @@ -0,0 +1,240 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `lint_roller` gem. +# Please instead update this file by running `bin/tapioca gem lint_roller`. + + +# source://lint_roller//lib/lint_roller/context.rb#1 +module LintRoller; end + +# source://lint_roller//lib/lint_roller/about.rb#2 +class LintRoller::About < ::Struct + # Returns the value of attribute description + # + # @return [Object] the current value of description + def description; end + + # Sets the attribute description + # + # @param value [Object] the value to set the attribute description to. + # @return [Object] the newly set value + def description=(_); end + + # Returns the value of attribute homepage + # + # @return [Object] the current value of homepage + def homepage; end + + # Sets the attribute homepage + # + # @param value [Object] the value to set the attribute homepage to. + # @return [Object] the newly set value + def homepage=(_); end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + # Returns the value of attribute version + # + # @return [Object] the current value of version + def version; end + + # Sets the attribute version + # + # @param value [Object] the value to set the attribute version to. + # @return [Object] the newly set value + def version=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://lint_roller//lib/lint_roller/context.rb#2 +class LintRoller::Context < ::Struct + # Returns the value of attribute engine + # + # @return [Object] the current value of engine + def engine; end + + # Sets the attribute engine + # + # @param value [Object] the value to set the attribute engine to. + # @return [Object] the newly set value + def engine=(_); end + + # Returns the value of attribute engine_version + # + # @return [Object] the current value of engine_version + def engine_version; end + + # Sets the attribute engine_version + # + # @param value [Object] the value to set the attribute engine_version to. + # @return [Object] the newly set value + def engine_version=(_); end + + # Returns the value of attribute rule_format + # + # @return [Object] the current value of rule_format + def rule_format; end + + # Sets the attribute rule_format + # + # @param value [Object] the value to set the attribute rule_format to. + # @return [Object] the newly set value + def rule_format=(_); end + + # Returns the value of attribute runner + # + # @return [Object] the current value of runner + def runner; end + + # Sets the attribute runner + # + # @param value [Object] the value to set the attribute runner to. + # @return [Object] the newly set value + def runner=(_); end + + # Returns the value of attribute runner_version + # + # @return [Object] the current value of runner_version + def runner_version; end + + # Sets the attribute runner_version + # + # @param value [Object] the value to set the attribute runner_version to. + # @return [Object] the newly set value + def runner_version=(_); end + + # Returns the value of attribute target_ruby_version + # + # @return [Object] the current value of target_ruby_version + def target_ruby_version; end + + # Sets the attribute target_ruby_version + # + # @param value [Object] the value to set the attribute target_ruby_version to. + # @return [Object] the newly set value + def target_ruby_version=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://lint_roller//lib/lint_roller/error.rb#2 +class LintRoller::Error < ::StandardError; end + +# source://lint_roller//lib/lint_roller/plugin.rb#2 +class LintRoller::Plugin + # `config' is a Hash of options passed to the plugin by the user + # + # @return [Plugin] a new instance of Plugin + # + # source://lint_roller//lib/lint_roller/plugin.rb#4 + def initialize(config = T.unsafe(nil)); end + + # @raise [Error] + # + # source://lint_roller//lib/lint_roller/plugin.rb#8 + def about; end + + # `context' is an instance of LintRoller::Context provided by the runner + # + # @raise [Error] + # + # source://lint_roller//lib/lint_roller/plugin.rb#18 + def rules(context); end + + # `context' is an instance of LintRoller::Context provided by the runner + # + # @return [Boolean] + # + # source://lint_roller//lib/lint_roller/plugin.rb#13 + def supported?(context); end +end + +# source://lint_roller//lib/lint_roller/rules.rb#2 +class LintRoller::Rules < ::Struct + # Returns the value of attribute config_format + # + # @return [Object] the current value of config_format + def config_format; end + + # Sets the attribute config_format + # + # @param value [Object] the value to set the attribute config_format to. + # @return [Object] the newly set value + def config_format=(_); end + + # Returns the value of attribute error + # + # @return [Object] the current value of error + def error; end + + # Sets the attribute error + # + # @param value [Object] the value to set the attribute error to. + # @return [Object] the newly set value + def error=(_); end + + # Returns the value of attribute type + # + # @return [Object] the current value of type + def type; end + + # Sets the attribute type + # + # @param value [Object] the value to set the attribute type to. + # @return [Object] the newly set value + def type=(_); end + + # Returns the value of attribute value + # + # @return [Object] the current value of value + def value; end + + # Sets the attribute value + # + # @param value [Object] the value to set the attribute value to. + # @return [Object] the newly set value + def value=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://lint_roller//lib/lint_roller/support/merges_upstream_metadata.rb#2 +module LintRoller::Support; end + +# source://lint_roller//lib/lint_roller/support/merges_upstream_metadata.rb#3 +class LintRoller::Support::MergesUpstreamMetadata + # source://lint_roller//lib/lint_roller/support/merges_upstream_metadata.rb#4 + def merge(plugin_yaml, upstream_yaml); end +end + +# source://lint_roller//lib/lint_roller/version.rb#2 +LintRoller::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/logger@1.6.5.rbi b/sorbet/rbi/gems/logger@1.6.6.rbi similarity index 98% rename from sorbet/rbi/gems/logger@1.6.5.rbi rename to sorbet/rbi/gems/logger@1.6.6.rbi index 3d712eafa..3ba5d2c2f 100644 --- a/sorbet/rbi/gems/logger@1.6.5.rbi +++ b/sorbet/rbi/gems/logger@1.6.6.rbi @@ -857,34 +857,34 @@ class Logger::LogDevice private - # source://logger//lib/logger/log_device.rb#148 + # source://logger//lib/logger/log_device.rb#149 def add_log_header(file); end - # source://logger//lib/logger/log_device.rb#154 + # source://logger//lib/logger/log_device.rb#155 def check_shift_log; end - # source://logger//lib/logger/log_device.rb#124 + # source://logger//lib/logger/log_device.rb#125 def create_logfile(filename); end # source://logger//lib/logger/log_device.rb#96 def fixup_mode(dev, filename); end - # source://logger//lib/logger/log_device.rb#140 + # source://logger//lib/logger/log_device.rb#141 def handle_write_errors(mesg); end - # source://logger//lib/logger/log_device.rb#169 + # source://logger//lib/logger/log_device.rb#170 def lock_shift_log; end - # source://logger//lib/logger/log_device.rb#111 + # source://logger//lib/logger/log_device.rb#112 def open_logfile(filename); end # source://logger//lib/logger/log_device.rb#81 def set_dev(log); end - # source://logger//lib/logger/log_device.rb#198 + # source://logger//lib/logger/log_device.rb#199 def shift_log_age; end - # source://logger//lib/logger/log_device.rb#210 + # source://logger//lib/logger/log_device.rb#211 def shift_log_period(period_end); end end diff --git a/sorbet/rbi/gems/nokogiri@1.18.2.rbi b/sorbet/rbi/gems/nokogiri@1.18.3.rbi similarity index 99% rename from sorbet/rbi/gems/nokogiri@1.18.2.rbi rename to sorbet/rbi/gems/nokogiri@1.18.3.rbi index 2cb85f2b4..eec082c64 100644 --- a/sorbet/rbi/gems/nokogiri@1.18.2.rbi +++ b/sorbet/rbi/gems/nokogiri@1.18.3.rbi @@ -2386,6 +2386,7 @@ Nokogiri::VERSION_INFO = T.let(T.unsafe(nil), Hash) # source://nokogiri//lib/nokogiri/version/info.rb#7 class Nokogiri::VersionInfo + include ::Singleton::SingletonInstanceMethods include ::Singleton extend ::Singleton::SingletonClassMethods diff --git a/sorbet/rbi/gems/parser@3.3.7.0.rbi b/sorbet/rbi/gems/parser@3.3.7.1.rbi similarity index 100% rename from sorbet/rbi/gems/parser@3.3.7.0.rbi rename to sorbet/rbi/gems/parser@3.3.7.1.rbi diff --git a/sorbet/rbi/gems/rubocop-ast@1.37.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.38.0.rbi similarity index 96% rename from sorbet/rbi/gems/rubocop-ast@1.37.0.rbi rename to sorbet/rbi/gems/rubocop-ast@1.38.0.rbi index 4fcabd50b..f64afa11a 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.37.0.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.38.0.rbi @@ -783,6 +783,9 @@ module RuboCop::AST::CollectionNode # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def fetch(*_arg0, **_arg1, &_arg2); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fetch_values(*_arg0, **_arg1, &_arg2); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def fill(*_arg0, **_arg1, &_arg2); end @@ -2733,6 +2736,11 @@ class RuboCop::AST::Node < ::Parser::AST::Node # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def and_type?; end + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#531 + def any_block_type?; end + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def arg_expr_type?; end @@ -2829,10 +2837,10 @@ class RuboCop::AST::Node < ::Parser::AST::Node # source://rubocop-ast//lib/rubocop/ast/node.rb#507 def chained?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#570 + # source://rubocop-ast//lib/rubocop/ast/node.rb#579 def class_constructor?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#588 + # source://rubocop-ast//lib/rubocop/ast/node.rb#597 def class_definition?(param0 = T.unsafe(nil)); end # source://rubocop-ast//lib/rubocop/ast/node.rb#170 @@ -2963,12 +2971,12 @@ class RuboCop::AST::Node < ::Parser::AST::Node # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def forwarded_restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#567 + # source://rubocop-ast//lib/rubocop/ast/node.rb#576 def global_const?(param0 = T.unsafe(nil), param1); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#531 + # source://rubocop-ast//lib/rubocop/ast/node.rb#535 def guard_clause?; end # source://rubocop-ast//lib/rubocop/ast/node.rb#170 @@ -3050,10 +3058,10 @@ class RuboCop::AST::Node < ::Parser::AST::Node # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def kwsplat_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#561 + # source://rubocop-ast//lib/rubocop/ast/node.rb#570 def lambda?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#564 + # source://rubocop-ast//lib/rubocop/ast/node.rb#573 def lambda_or_proc?(param0 = T.unsafe(nil)); end # source://rubocop-ast//lib/rubocop/ast/node.rb#170 @@ -3086,12 +3094,19 @@ class RuboCop::AST::Node < ::Parser::AST::Node # source://rubocop-ast//lib/rubocop/ast/node.rb#417 def literal?; end + # Shortcut to safely check if a location is present + # + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#543 + def loc?(which_loc); end + # Shortcut to safely test a particular location, even if # this location does not exist or is `nil` # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#539 + # source://rubocop-ast//lib/rubocop/ast/node.rb#551 def loc_is?(which_loc, str); end # NOTE: `loop { }` is a normal method call and thus not a loop keyword. @@ -3119,7 +3134,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def match_current_line_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#549 + # source://rubocop-ast//lib/rubocop/ast/node.rb#558 def match_guard_clause?(param0 = T.unsafe(nil)); end # source://rubocop-ast//lib/rubocop/ast/node.rb#170 @@ -3146,7 +3161,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def mlhs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#595 + # source://rubocop-ast//lib/rubocop/ast/node.rb#604 def module_definition?(param0 = T.unsafe(nil)); end # source://rubocop-ast//lib/rubocop/ast/node.rb#170 @@ -3164,7 +3179,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # source://rubocop-ast//lib/rubocop/ast/node.rb#433 def mutable_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#727 + # source://rubocop-ast//lib/rubocop/ast/node.rb#735 def new_class_or_module_block?(param0 = T.unsafe(nil)); end # source://rubocop-ast//lib/rubocop/ast/node.rb#170 @@ -3268,7 +3283,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def preexe_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#554 + # source://rubocop-ast//lib/rubocop/ast/node.rb#563 def proc?(param0 = T.unsafe(nil)); end # source://rubocop-ast//lib/rubocop/ast/node.rb#170 @@ -3284,7 +3299,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#638 + # source://rubocop-ast//lib/rubocop/ast/node.rb#647 def pure?; end # @return [Boolean] @@ -3426,7 +3441,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # @deprecated Use `:class_constructor?` # - # source://rubocop-ast//lib/rubocop/ast/node.rb#583 + # source://rubocop-ast//lib/rubocop/ast/node.rb#592 def struct_constructor?(param0 = T.unsafe(nil)); end # source://rubocop-ast//lib/rubocop/ast/node.rb#170 @@ -3483,7 +3498,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#608 + # source://rubocop-ast//lib/rubocop/ast/node.rb#617 def value_used?; end # @return [Boolean] @@ -3518,12 +3533,12 @@ class RuboCop::AST::Node < ::Parser::AST::Node # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#666 + # source://rubocop-ast//lib/rubocop/ast/node.rb#674 def begin_value_used?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#677 + # source://rubocop-ast//lib/rubocop/ast/node.rb#685 def case_if_value_used?; end # source://rubocop-ast//lib/rubocop/ast/node.rb#363 @@ -3531,24 +3546,24 @@ class RuboCop::AST::Node < ::Parser::AST::Node # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#671 + # source://rubocop-ast//lib/rubocop/ast/node.rb#679 def for_value_used?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#713 + # source://rubocop-ast//lib/rubocop/ast/node.rb#721 def parent_module_name_for_block(ancestor); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#701 + # source://rubocop-ast//lib/rubocop/ast/node.rb#709 def parent_module_name_for_sclass(sclass_node); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#688 + # source://rubocop-ast//lib/rubocop/ast/node.rb#696 def parent_module_name_part(node); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#656 + # source://rubocop-ast//lib/rubocop/ast/node.rb#665 def visit_ancestors(types); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#683 + # source://rubocop-ast//lib/rubocop/ast/node.rb#691 def while_until_value_used?; end class << self @@ -3559,11 +3574,6 @@ class RuboCop::AST::Node < ::Parser::AST::Node end end -# @api private -# -# source://rubocop-ast//lib/rubocop/ast/node.rb#80 -RuboCop::AST::Node::ARGUMENT_TYPES = T.let(T.unsafe(nil), Set) - # @api private # # source://rubocop-ast//lib/rubocop/ast/node.rb#55 @@ -3596,10 +3606,10 @@ RuboCop::AST::Node::COMPOSITE_LITERALS = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node.rb#60 RuboCop::AST::Node::CONDITIONALS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node.rb#87 +# source://rubocop-ast//lib/rubocop/ast/node.rb#84 RuboCop::AST::Node::EMPTY_CHILDREN = T.let(T.unsafe(nil), Array) -# source://rubocop-ast//lib/rubocop/ast/node.rb#88 +# source://rubocop-ast//lib/rubocop/ast/node.rb#85 RuboCop::AST::Node::EMPTY_PROPERTIES = T.let(T.unsafe(nil), Hash) # @api private @@ -3614,7 +3624,7 @@ RuboCop::AST::Node::FALSEY_LITERALS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop-ast//lib/rubocop/ast/node.rb#92 +# source://rubocop-ast//lib/rubocop/ast/node.rb#89 RuboCop::AST::Node::GROUP_FOR_TYPE = T.let(T.unsafe(nil), Hash) # @api private @@ -3632,10 +3642,10 @@ RuboCop::AST::Node::KEYWORDS = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node.rb#37 RuboCop::AST::Node::LITERALS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node.rb#83 +# source://rubocop-ast//lib/rubocop/ast/node.rb#80 RuboCop::AST::Node::LITERAL_RECURSIVE_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node.rb#84 +# source://rubocop-ast//lib/rubocop/ast/node.rb#81 RuboCop::AST::Node::LITERAL_RECURSIVE_TYPES = T.let(T.unsafe(nil), Set) # @api private @@ -4350,7 +4360,7 @@ end # Doc on how this fits in the compiling process: # /docs/modules/ROOT/pages/node_pattern.adoc # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#17 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#16 class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler # Calls `compile_sequence`; the actual `compile` method # will be used for the different terms of the sequence. @@ -4852,7 +4862,7 @@ class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#63 def matches_within_set?; end - # @return [Integer] nb of captures of that node and its descendants + # @return [Integer] nb of captures that this node will emit # # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#52 def nb_captures; end @@ -4938,7 +4948,7 @@ RuboCop::AST::NodePattern::Node::INT_TO_RANGE = T.let(T.unsafe(nil), Hash) # Registry # -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#249 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#255 RuboCop::AST::NodePattern::Node::MAP = T.let(T.unsafe(nil), Hash) # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#11 @@ -5024,6 +5034,12 @@ class RuboCop::AST::NodePattern::Node::Union < ::RuboCop::AST::NodePattern::Node # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#231 def in_sequence_head; end + + # Each child in a union must contain the same number + # of captures. Only one branch ends up capturing. + # + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#249 + def nb_captures; end end # Parser for NodePattern @@ -5466,6 +5482,9 @@ RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EVAL_CLASS_EVAL_MODULE_EVAL = T.le # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EXEC_CLASS_EXEC_MODULE_EXEC = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_INTEGER_BIGDECIMAL_COMPLEX_RATIONAL = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_IS_EXPECTED_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set) @@ -5995,33 +6014,39 @@ module RuboCop::AST::PredicateOperatorNode # # @return [Boolean] whether this is a logical operator # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#27 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#32 def logical_operator?; end # Returns the operator as a string. # # @return [String] the operator # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#20 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#25 def operator; end # Checks whether this is a semantic operator. # # @return [Boolean] whether this is a semantic operator # - # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#34 + # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#39 def semantic_operator?; end end # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#8 RuboCop::AST::PredicateOperatorNode::LOGICAL_AND = T.let(T.unsafe(nil), String) +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#17 +RuboCop::AST::PredicateOperatorNode::LOGICAL_OPERATORS = T.let(T.unsafe(nil), Array) + # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#12 RuboCop::AST::PredicateOperatorNode::LOGICAL_OR = T.let(T.unsafe(nil), String) # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#10 RuboCop::AST::PredicateOperatorNode::SEMANTIC_AND = T.let(T.unsafe(nil), String) +# source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#19 +RuboCop::AST::PredicateOperatorNode::SEMANTIC_OPERATORS = T.let(T.unsafe(nil), Array) + # source://rubocop-ast//lib/rubocop/ast/node/mixin/predicate_operator_node.rb#14 RuboCop::AST::PredicateOperatorNode::SEMANTIC_OR = T.let(T.unsafe(nil), String) @@ -6225,13 +6250,13 @@ class RuboCop::AST::ProcessedSource # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#199 def comment_index; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#309 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#329 def create_parser(ruby_version, parser_engine); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#325 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#345 def first_token_index(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#330 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#350 def last_token_index(range_or_node); end # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#205 @@ -6240,7 +6265,19 @@ class RuboCop::AST::ProcessedSource # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#238 def parser_class(ruby_version, parser_engine); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#335 + # Prism is a native extension, a `LoadError` will be raised if linked to an incompatible + # Ruby version. Only raise if it really was caused by Prism not being present. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#306 + def require_prism; end + + # While Prism is not yet a dependency, users may run with outdated versions that + # don't have all the parsers. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#317 + def require_prism_translation_parser(version); end + + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#355 def source_range(range_or_node); end # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#222 @@ -6556,17 +6593,17 @@ class RuboCop::AST::StrNode < ::RuboCop::AST::Node # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#25 + # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#26 def character_literal?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#21 + # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#22 def double_quoted?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#29 + # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#30 def heredoc?; end # Checks whether the string literal is delimited by percent brackets. @@ -6576,12 +6613,12 @@ class RuboCop::AST::StrNode < ::RuboCop::AST::Node # @param type [Symbol] an optional percent literal type # @return [Boolean] whether the string is enclosed in percent brackets # - # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#44 + # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#45 def percent_literal?(type = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#17 + # source://rubocop-ast//lib/rubocop/ast/node/str_node.rb#18 def single_quoted?; end end @@ -6625,151 +6662,154 @@ end class RuboCop::AST::Token # @return [Token] a new instance of Token # - # source://rubocop-ast//lib/rubocop/ast/token.rb#17 + # source://rubocop-ast//lib/rubocop/ast/token.rb#18 def initialize(pos, type, text); end - # source://rubocop-ast//lib/rubocop/ast/token.rb#32 + # source://rubocop-ast//lib/rubocop/ast/token.rb#33 def begin_pos; end - # source://rubocop-ast//lib/rubocop/ast/token.rb#28 + # source://rubocop-ast//lib/rubocop/ast/token.rb#29 def column; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#101 + # source://rubocop-ast//lib/rubocop/ast/token.rb#102 def comma?; end # Type Predicates # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#57 + # source://rubocop-ast//lib/rubocop/ast/token.rb#58 def comment?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#105 + # source://rubocop-ast//lib/rubocop/ast/token.rb#106 def dot?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#117 + # source://rubocop-ast//lib/rubocop/ast/token.rb#118 def end?; end - # source://rubocop-ast//lib/rubocop/ast/token.rb#36 + # source://rubocop-ast//lib/rubocop/ast/token.rb#37 def end_pos; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#121 + # source://rubocop-ast//lib/rubocop/ast/token.rb#122 def equal_sign?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#65 + # source://rubocop-ast//lib/rubocop/ast/token.rb#66 def left_array_bracket?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#81 + # source://rubocop-ast//lib/rubocop/ast/token.rb#82 def left_brace?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#73 + # source://rubocop-ast//lib/rubocop/ast/token.rb#74 def left_bracket?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#85 + # source://rubocop-ast//lib/rubocop/ast/token.rb#86 def left_curly_brace?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#93 + # source://rubocop-ast//lib/rubocop/ast/token.rb#94 def left_parens?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#69 + # source://rubocop-ast//lib/rubocop/ast/token.rb#70 def left_ref_bracket?; end - # source://rubocop-ast//lib/rubocop/ast/token.rb#24 + # source://rubocop-ast//lib/rubocop/ast/token.rb#25 def line; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#125 + # source://rubocop-ast//lib/rubocop/ast/token.rb#126 def new_line?; end # Returns the value of attribute pos. # - # source://rubocop-ast//lib/rubocop/ast/token.rb#9 + # source://rubocop-ast//lib/rubocop/ast/token.rb#10 def pos; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#109 + # source://rubocop-ast//lib/rubocop/ast/token.rb#110 def regexp_dots?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#113 + # source://rubocop-ast//lib/rubocop/ast/token.rb#114 def rescue_modifier?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#77 + # source://rubocop-ast//lib/rubocop/ast/token.rb#78 def right_bracket?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#89 + # source://rubocop-ast//lib/rubocop/ast/token.rb#90 def right_curly_brace?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#97 + # source://rubocop-ast//lib/rubocop/ast/token.rb#98 def right_parens?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#61 + # source://rubocop-ast//lib/rubocop/ast/token.rb#62 def semicolon?; end # Checks if there is whitespace after token # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#45 + # source://rubocop-ast//lib/rubocop/ast/token.rb#46 def space_after?; end # Checks if there is whitespace before token # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/token.rb#50 + # source://rubocop-ast//lib/rubocop/ast/token.rb#51 def space_before?; end # Returns the value of attribute text. # - # source://rubocop-ast//lib/rubocop/ast/token.rb#9 + # source://rubocop-ast//lib/rubocop/ast/token.rb#10 def text; end - # source://rubocop-ast//lib/rubocop/ast/token.rb#40 + # source://rubocop-ast//lib/rubocop/ast/token.rb#41 def to_s; end # Returns the value of attribute type. # - # source://rubocop-ast//lib/rubocop/ast/token.rb#9 + # source://rubocop-ast//lib/rubocop/ast/token.rb#10 def type; end class << self - # source://rubocop-ast//lib/rubocop/ast/token.rb#11 + # source://rubocop-ast//lib/rubocop/ast/token.rb#12 def from_parser_token(parser_token); end end end +# source://rubocop-ast//lib/rubocop/ast/token.rb#8 +RuboCop::AST::Token::LEFT_CURLY_TYPES = T.let(T.unsafe(nil), Array) + # source://rubocop-ast//lib/rubocop/ast/token.rb#7 RuboCop::AST::Token::LEFT_PAREN_TYPES = T.let(T.unsafe(nil), Array) @@ -7364,28 +7404,28 @@ class RuboCop::AST::YieldNode < ::RuboCop::AST::Node end class RuboCop::CommentConfig - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#34 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#34 def initialize(processed_source); end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#63 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#63 def comment_only_line?(line_number); end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def config(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#51 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#51 def cop_disabled_line_ranges; end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#39 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#39 def cop_enabled_at_line?(cop, line_number); end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#47 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#47 def cop_opted_in?(cop); end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#55 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#55 def extra_enabled_comments; end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#30 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#30 def processed_source; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7393,51 +7433,51 @@ class RuboCop::CommentConfig private - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#96 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#96 def analyze; end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#124 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#124 def analyze_cop(analysis, directive); end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#144 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#144 def analyze_disabled(analysis, directive); end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#155 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#155 def analyze_rest(analysis, directive); end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#135 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#135 def analyze_single_line(analysis, directive); end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#164 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#164 def cop_line_ranges(analysis); end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#170 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#170 def each_directive; end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#69 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#69 def extra_enabled_comments_with_names(extras:, names:); end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#190 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#190 def handle_enable_all(directive, names, extras); end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#204 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#204 def handle_switch(directive, names, extras); end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#115 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#115 def inject_disabled_cops_directives(analyses); end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#183 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#183 def non_comment_token_line_numbers; end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#83 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#83 def opt_in_cops; end - # source://rubocop/1.70.0/lib/rubocop/comment_config.rb#179 + # source://rubocop/1.72.2/lib/rubocop/comment_config.rb#179 def qualified_cop_name(cop_name); end end class RuboCop::Config - # source://rubocop/1.70.0/lib/rubocop/config.rb#31 + # source://rubocop/1.72.2/lib/rubocop/config.rb#31 def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7446,40 +7486,40 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def []=(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#179 + # source://rubocop/1.72.2/lib/rubocop/config.rb#183 def active_support_extensions_enabled?; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#94 + # source://rubocop/1.72.2/lib/rubocop/config.rb#98 def add_excludes_from_higher_level(highest_config); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#206 + # source://rubocop/1.72.2/lib/rubocop/config.rb#210 def allowed_camel_case_file?(file); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#250 + # source://rubocop/1.72.2/lib/rubocop/config.rb#254 def base_dir_for_path_parameters; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#280 + # source://rubocop/1.72.2/lib/rubocop/config.rb#284 def bundler_lock_file_path; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#52 + # source://rubocop/1.72.2/lib/rubocop/config.rb#56 def check; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#147 + # source://rubocop/1.72.2/lib/rubocop/config.rb#151 def clusivity_config_for_badge?(badge); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#167 + # source://rubocop/1.72.2/lib/rubocop/config.rb#171 def cop_enabled?(name); end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def delete(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#106 + # source://rubocop/1.72.2/lib/rubocop/config.rb#110 def deprecation_check; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def dig(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#171 + # source://rubocop/1.72.2/lib/rubocop/config.rb#175 def disabled_new_cops?; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7488,40 +7528,40 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def each_key(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#175 + # source://rubocop/1.72.2/lib/rubocop/config.rb#179 def enabled_new_cops?; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def fetch(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#228 + # source://rubocop/1.72.2/lib/rubocop/config.rb#232 def file_to_exclude?(file); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#187 + # source://rubocop/1.72.2/lib/rubocop/config.rb#191 def file_to_include?(file); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#163 + # source://rubocop/1.72.2/lib/rubocop/config.rb#167 def for_all_cops; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#133 + # source://rubocop/1.72.2/lib/rubocop/config.rb#137 def for_badge(badge); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#120 + # source://rubocop/1.72.2/lib/rubocop/config.rb#124 def for_cop(cop); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#158 + # source://rubocop/1.72.2/lib/rubocop/config.rb#162 def for_department(department_name); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#127 + # source://rubocop/1.72.2/lib/rubocop/config.rb#131 def for_enabled_cop(cop); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#305 + # source://rubocop/1.72.2/lib/rubocop/config.rb#309 def gem_versions_in_target; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#309 + # source://rubocop/1.72.2/lib/rubocop/config.rb#313 def inspect; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#77 + # source://rubocop/1.72.2/lib/rubocop/config.rb#81 def internal?; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7530,13 +7570,16 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def keys(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#48 + # source://rubocop/1.72.2/lib/rubocop/config.rb#52 def loaded_features; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#21 + # source://rubocop/1.72.2/lib/rubocop/config.rb#21 def loaded_path; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#82 + # source://rubocop/1.72.2/lib/rubocop/config.rb#48 + def loaded_plugins; end + + # source://rubocop/1.72.2/lib/rubocop/config.rb#86 def make_excludes_absolute; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7545,37 +7588,37 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def merge(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#260 + # source://rubocop/1.72.2/lib/rubocop/config.rb#264 def parser_engine; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#241 + # source://rubocop/1.72.2/lib/rubocop/config.rb#245 def path_relative_to_config(path); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#237 + # source://rubocop/1.72.2/lib/rubocop/config.rb#241 def patterns_to_exclude; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#233 + # source://rubocop/1.72.2/lib/rubocop/config.rb#237 def patterns_to_include; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#291 + # source://rubocop/1.72.2/lib/rubocop/config.rb#295 def pending_cops; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#220 + # source://rubocop/1.72.2/lib/rubocop/config.rb#224 def possibly_include_hidden?; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def replace(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#72 + # source://rubocop/1.72.2/lib/rubocop/config.rb#76 def signature; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#275 + # source://rubocop/1.72.2/lib/rubocop/config.rb#279 def smart_loaded_path; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#183 + # source://rubocop/1.72.2/lib/rubocop/config.rb#187 def string_literals_frozen_by_default?; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#264 + # source://rubocop/1.72.2/lib/rubocop/config.rb#268 def target_rails_version; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7587,7 +7630,7 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def to_hash(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#68 + # source://rubocop/1.72.2/lib/rubocop/config.rb#72 def to_s; end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7596,37 +7639,37 @@ class RuboCop::Config # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def validate(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#59 + # source://rubocop/1.72.2/lib/rubocop/config.rb#63 def validate_after_resolution; end private - # source://rubocop/1.70.0/lib/rubocop/config.rb#359 + # source://rubocop/1.72.2/lib/rubocop/config.rb#363 def department_of(qualified_cop_name); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#347 + # source://rubocop/1.72.2/lib/rubocop/config.rb#351 def enable_cop?(qualified_cop_name, cop_options); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#334 + # source://rubocop/1.72.2/lib/rubocop/config.rb#338 def gem_version_to_major_minor_float(gem_version); end - # source://rubocop/1.70.0/lib/rubocop/config.rb#340 + # source://rubocop/1.72.2/lib/rubocop/config.rb#344 def read_gem_versions_from_target_lockfile; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#321 + # source://rubocop/1.72.2/lib/rubocop/config.rb#325 def read_rails_version_from_bundler_lock_file; end - # source://rubocop/1.70.0/lib/rubocop/config.rb#316 + # source://rubocop/1.72.2/lib/rubocop/config.rb#320 def target_rails_version_from_bundler_lock_file; end class << self - # source://rubocop/1.70.0/lib/rubocop/config.rb#23 + # source://rubocop/1.72.2/lib/rubocop/config.rb#23 def create(hash, path, check: T.unsafe(nil)); end end end class RuboCop::ConfigValidator - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#28 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#28 def initialize(config); end # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -7635,66 +7678,66 @@ class RuboCop::ConfigValidator # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 def smart_loaded_path(*_arg0, **_arg1, &_arg2); end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#65 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#65 def target_ruby_version; end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#34 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#34 def validate; end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#61 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#61 def validate_after_resolution; end private - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#100 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#100 def alert_about_unrecognized_cops(invalid_cop_names); end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#263 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#263 def check_cop_config_value(hash, parent = T.unsafe(nil)); end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#73 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#73 def check_obsoletions; end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#80 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#80 def check_target_ruby; end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#204 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#204 def each_invalid_parameter(cop_name); end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#116 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#116 def list_unknown_cops(invalid_cop_names); end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#283 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#283 def param_error_message(parent, key, value, supposed_values); end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#251 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#251 def reject_conflicting_safe_settings; end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#242 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#242 def reject_mutually_exclusive_defaults; end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#138 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#138 def suggestion(name); end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#71 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#71 def target_ruby; end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#216 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#216 def validate_enforced_styles(valid_cop_names); end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#165 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#165 def validate_new_cops_parameter; end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#190 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#190 def validate_parameter_names(valid_cop_names); end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#176 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#176 def validate_parameter_shape(valid_cop_names); end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#236 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#236 def validate_support_and_has_list(name, formats, valid); end - # source://rubocop/1.70.0/lib/rubocop/config_validator.rb#154 + # source://rubocop/1.72.2/lib/rubocop/config_validator.rb#154 def validate_syntax_cop; end end diff --git a/sorbet/rbi/gems/rubocop-rspec@3.4.0.rbi b/sorbet/rbi/gems/rubocop-rspec@3.5.0.rbi similarity index 98% rename from sorbet/rbi/gems/rubocop-rspec@3.4.0.rbi rename to sorbet/rbi/gems/rubocop-rspec@3.5.0.rbi index bed4a1744..8c90532b0 100644 --- a/sorbet/rbi/gems/rubocop-rspec@3.4.0.rbi +++ b/sorbet/rbi/gems/rubocop-rspec@3.5.0.rbi @@ -371,10 +371,10 @@ class RuboCop::Cop::RSpec::BeNil < ::RuboCop::Cop::RSpec::Base private - # source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#64 + # source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#68 def check_be_nil_style(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#56 + # source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#60 def check_be_style(node); end end @@ -489,39 +489,39 @@ class RuboCop::Cop::RSpec::ChangeByZero < ::RuboCop::Cop::RSpec::Base private - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#134 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#132 def autocorrect(corrector, node, change_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#141 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#139 def autocorrect_compound(corrector, node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#120 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#118 def compound_expectations?(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#151 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#149 def insert_operator(corrector, node, change_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#125 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#123 def message(change_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#129 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#127 def message_compound(change_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#175 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#173 def negated_matcher; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#179 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#177 def preferred_method; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#105 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#104 def register_offense(node, change_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#164 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#162 def remove_by_zero(corrector, node, change_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#160 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#158 def replace_node(node, change_node); end end @@ -1924,41 +1924,41 @@ class RuboCop::Cop::RSpec::ExampleWording < ::RuboCop::Cop::RSpec::Base # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#63 def it_description(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#71 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#70 def on_block(node); end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#89 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#87 def add_wording_offense(node, message); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#136 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#134 def custom_transform; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#99 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#97 def docstring(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#140 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#138 def ignored_words; end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#144 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#142 def insufficient_docstring?(description_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#148 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#146 def insufficient_examples; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#153 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#151 def preprocess(message); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#109 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#107 def replacement_text(node); end # Recursive processing is required to process nested dstr nodes # that is the case for \-separated multiline strings with interpolation. # - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#125 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#123 def text(node); end end @@ -2269,65 +2269,65 @@ RuboCop::Cop::RSpec::ExpectOutput::MSG = T.let(T.unsafe(nil), String) # A helper for `explicit` style # -# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#121 +# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#129 module RuboCop::Cop::RSpec::ExplicitHelper include ::RuboCop::RSpec::Language extend ::RuboCop::AST::NodePattern::Macros - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#182 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#190 def predicate_matcher?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#195 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#203 def predicate_matcher_block?(param0 = T.unsafe(nil)); end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#135 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#143 def allowed_explicit_matchers; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#139 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#147 def check_explicit(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#219 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#227 def corrector_explicit(corrector, to_node, actual, matcher, block_child); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#175 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#183 def heredoc_argument?(matcher); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#213 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#221 def message_explicit(matcher); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#226 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#234 def move_predicate(corrector, actual, matcher, block_child); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#204 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#212 def predicate_matcher_name?(name); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#162 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#170 def replaceable_matcher?(matcher); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#255 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#261 def replacement_matcher(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#237 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#244 def to_predicate_method(matcher); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#171 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#179 def uncorrectable_matcher?(node, matcher); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#127 +# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#135 RuboCop::Cop::RSpec::ExplicitHelper::BUILT_IN_MATCHERS = T.let(T.unsafe(nil), Array) -# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#125 +# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#133 RuboCop::Cop::RSpec::ExplicitHelper::MSG_EXPLICIT = T.let(T.unsafe(nil), String) # Help methods for file. @@ -2405,15 +2405,16 @@ class RuboCop::Cop::RSpec::Focus < ::RuboCop::Cop::RSpec::Base private - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#104 + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#108 def correct_send(corrector, focus); end - # @yield [node] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#91 - def focus_metadata(node, &block); end + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#89 + def on_focused_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#95 + def on_metadata(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#97 + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#101 def with_surrounding(focus); end end @@ -2673,15 +2674,15 @@ class RuboCop::Cop::RSpec::ImplicitExpect < ::RuboCop::Cop::RSpec::Base private - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#78 - def is_expected_range(source_map); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#69 def offending_expect(node); end # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#86 def offense_message(offending_source); end + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#78 + def range_for_is_expected(source_map); end + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#94 def replacement_source(offending_source); end end @@ -2770,45 +2771,45 @@ class RuboCop::Cop::RSpec::ImplicitSubject < ::RuboCop::Cop::RSpec::Base # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#100 def autocorrect(corrector, node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#159 + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#167 def example_of(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#135 + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#143 def implicit_subject_in_non_its?(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#139 + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#147 def implicit_subject_in_non_its_and_non_single_line?(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#143 + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#151 def implicit_subject_in_non_its_and_non_single_statement?(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#122 + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#126 def invalid?(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#147 + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#155 def its?(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#113 + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#117 def message(_node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#151 + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#159 def single_line?(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#155 + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#163 def single_statement?(node); end end @@ -2872,25 +2873,25 @@ class RuboCop::Cop::RSpec::IndexedLet < ::RuboCop::Cop::RSpec::Base private - # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#105 + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#107 def allowed_identifiers; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#99 + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#101 def cop_config_patterns_values; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#79 + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#81 def filter_indexed_lets(candidates); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#88 + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#90 def indexed_let?(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#95 + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#97 def let_name_stripped_index(node); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#77 +# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#78 RuboCop::Cop::RSpec::IndexedLet::INDEX_REGEX = T.let(T.unsafe(nil), Regexp) # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#51 @@ -2906,45 +2907,50 @@ module RuboCop::Cop::RSpec::InflectedHelper include ::RuboCop::RSpec::Language extend ::RuboCop::AST::NodePattern::Macros - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#39 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#45 def be_bool?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#44 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#50 def be_boolthy?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#29 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#31 def predicate_in_actual?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#48 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#54 def boolean_matcher?(node); end + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#40 + def cannot_replace_predicate?(send_node); end + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#16 def check_inflected(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#60 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#66 def message_inflected(predicate); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#56 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#62 def predicate?(sym); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#85 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#89 def remove_predicate(corrector, predicate); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#96 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#100 def rewrite_matcher(corrector, predicate, matcher); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#67 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#72 def to_predicate_matcher(name); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#107 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#111 def true?(to_symbol, matcher); end end @@ -4010,7 +4016,7 @@ class RuboCop::Cop::RSpec::MultipleExpectations < ::RuboCop::Cop::RSpec::Base # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#86 def expect?(param0 = T.unsafe(nil)); end - # source://rubocop/1.70.0/lib/rubocop/cop/exclude_limit.rb#11 + # source://rubocop/1.72.2/lib/rubocop/cop/exclude_limit.rb#11 def max=(value); end # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#93 @@ -4125,7 +4131,7 @@ RuboCop::Cop::RSpec::MultipleExpectations::TRUE_NODE = T.let(T.unsafe(nil), Proc class RuboCop::Cop::RSpec::MultipleMemoizedHelpers < ::RuboCop::Cop::RSpec::Base include ::RuboCop::Cop::RSpec::Variable - # source://rubocop/1.70.0/lib/rubocop/cop/exclude_limit.rb#11 + # source://rubocop/1.72.2/lib/rubocop/cop/exclude_limit.rb#11 def max=(value); end # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#91 @@ -4467,7 +4473,7 @@ end class RuboCop::Cop::RSpec::NestedGroups < ::RuboCop::Cop::RSpec::Base include ::RuboCop::Cop::RSpec::TopLevelGroup - # source://rubocop/1.70.0/lib/rubocop/cop/exclude_limit.rb#11 + # source://rubocop/1.72.2/lib/rubocop/cop/exclude_limit.rb#11 def max=(value); end # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#107 @@ -4891,21 +4897,21 @@ RuboCop::Cop::RSpec::PendingWithoutReason::MSG = T.let(T.unsafe(nil), String) # # good - the above code is rewritten to it by this cop # expect(foo.something?).to be_truthy # -# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#318 +# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#324 class RuboCop::Cop::RSpec::PredicateMatcher < ::RuboCop::Cop::RSpec::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RSpec::InflectedHelper include ::RuboCop::Cop::RSpec::ExplicitHelper extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#335 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#345 def on_block(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#326 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#332 def on_send(node); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#324 +# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#330 RuboCop::Cop::RSpec::PredicateMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Check for `once` and `twice` receive counts matchers usage. @@ -7051,9 +7057,6 @@ class RuboCop::RSpec::AlignLetBrace def token; end end -# source://rubocop-rspec//lib/rubocop/rspec.rb#7 -RuboCop::RSpec::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) - # Wrapper for RSpec DSL methods # # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#6 @@ -7251,17 +7254,6 @@ class RuboCop::RSpec::Hook < ::RuboCop::RSpec::Concept def valid_scope?(node); end end -# Because RuboCop doesn't yet support plugins, we have to monkey patch in a -# bit of our configuration. -# -# source://rubocop-rspec//lib/rubocop/rspec/inject.rb#7 -module RuboCop::RSpec::Inject - class << self - # source://rubocop-rspec//lib/rubocop/rspec/inject.rb#8 - def defaults!; end - end -end - # Contains node matchers for common RSpec DSL. # # RSpec allows for configuring aliases for commonly used DSL elements, e.g. @@ -7466,8 +7458,25 @@ module RuboCop::RSpec::Node def recursive_literal_or_const?; end end -# source://rubocop-rspec//lib/rubocop/rspec.rb#6 -RuboCop::RSpec::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) +# A plugin that integrates RuboCop RSpec with RuboCop's plugin system. +# +# source://rubocop-rspec//lib/rubocop/rspec/plugin.rb#8 +class RuboCop::RSpec::Plugin < ::LintRoller::Plugin + # :nocov: + # + # source://rubocop-rspec//lib/rubocop/rspec/plugin.rb#10 + def about; end + + # source://rubocop-rspec//lib/rubocop/rspec/plugin.rb#24 + def rules(_context); end + + # :nocov: + # + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/rspec/plugin.rb#20 + def supported?(context); end +end # Version information for the RSpec RuboCop plugin. # @@ -7486,46 +7495,46 @@ class RuboCop::RSpec::Wording # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#14 def initialize(text, ignore:, replace:); end - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#21 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#20 def rewrite; end private - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#80 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#78 def append_suffix(word, suffix); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#65 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#63 def ignored_word?(word); end # Returns the value of attribute ignores. # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#39 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#37 def ignores; end - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#51 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#49 def remove_should_and_pluralize; end - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#41 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#39 def replace_prefix(pattern, replacement); end # Returns the value of attribute replacements. # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#39 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#37 def replacements; end - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#69 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#67 def substitute(word); end # Returns the value of attribute text. # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#39 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#37 def text; end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#47 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#45 def uppercase?(word); end end diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.8.7.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.8.9.rbi similarity index 97% rename from sorbet/rbi/gems/rubocop-sorbet@0.8.7.rbi rename to sorbet/rbi/gems/rubocop-sorbet@0.8.9.rbi index ce85893f7..645f5fa25 100644 --- a/sorbet/rbi/gems/rubocop-sorbet@0.8.7.rbi +++ b/sorbet/rbi/gems/rubocop-sorbet@0.8.9.rbi @@ -190,15 +190,15 @@ RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil), # end # end # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#35 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#36 class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#81 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#82 def argumentless_unbound_callable_callback_conditional?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#91 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#92 def on_send(node); end private @@ -206,14 +206,14 @@ class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Base # Find the immediately enclosing class or module name. # Returns `nil`` if the immediate parent (skipping begin if present) is not a class or module. # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#128 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#129 def immediately_enclosing_module_name(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#39 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#40 RuboCop::Cop::Sorbet::CallbackConditionalsBinding::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#41 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#42 RuboCop::Cop::Sorbet::CallbackConditionalsBinding::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Disallows the usage of `checked(true)`. This usage could cause @@ -716,6 +716,37 @@ end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_superclass_const_literal.rb#29 RuboCop::Cop::Sorbet::ForbidSuperclassConstLiteral::MSG = T.let(T.unsafe(nil), String) +# Disallow using `T::Enum`. +# +# @example +# +# # bad +# class MyEnum < T::Enum +# enums do +# A = new +# B = new +# end +# end +# +# # good +# class MyEnum +# A = "a" +# B = "b" +# C = "c" +# end +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_enum.rb#26 +class RuboCop::Cop::Sorbet::ForbidTEnum < ::RuboCop::Cop::Base + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_enum.rb#34 + def on_class(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_enum.rb#30 + def t_enum?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_enum.rb#27 +RuboCop::Cop::Sorbet::ForbidTEnum::MSG = T.let(T.unsafe(nil), String) + # Disallow using `T::Struct` and `T::Props`. # # @example @@ -887,6 +918,9 @@ end # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#17 class RuboCop::Cop::Sorbet::ForbidTUnsafe < ::RuboCop::Cop::Base + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#24 + def on_csend(node); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/forbid_t_unsafe.rb#24 def on_send(node); end @@ -1028,13 +1062,14 @@ RuboCop::Cop::Sorbet::GemVersionAnnotationHelper::VERSION_PREFIX = T.let(T.unsaf # * `SuggestedStrictness`: Sorbet strictness level suggested in offense messages (default: 'false') # * `MinimumStrictness`: If set, make offense if the strictness level in the file is below this one # +# If a `SuggestedStrictness` level is specified, it will be used in autocorrect. # If a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#17 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#18 class RuboCop::Cop::Sorbet::HasSigil < ::RuboCop::Cop::Sorbet::ValidSigil # @return [Boolean] # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#18 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/has_sigil.rb#19 def require_sigil_on_all_files?; end end @@ -1399,9 +1434,20 @@ RuboCop::Cop::Sorbet::SingleLineRbiClassModuleDefinitions::MSG = T.let(T.unsafe( # Makes the Sorbet `strict` sigil mandatory in all files. # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#10 +# @example +# +# # bad +# # typed: true +# +# # bad +# # typed: false +# +# # good +# # typed: strict +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#25 class RuboCop::Cop::Sorbet::StrictSigil < ::RuboCop::Cop::Sorbet::HasSigil - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#11 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/strict_sigil.rb#26 def minimum_strictness; end end @@ -1557,72 +1603,73 @@ RuboCop::Cop::Sorbet::ValidGemVersionAnnotations::VALID_OPERATORS = T.let(T.unsa # * `ExactStrictness`: If set, make offense if the strictness level in the file is different than this one # # If an `ExactStrictness` level is specified, it will be used in offense messages and autocorrect. +# If a `SuggestedStrictness` level is specified, it will be used in autocorrect. # Otherwise, if a `MinimumStrictness` level is specified, it will be used in offense messages and autocorrect. # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#20 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#21 class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#23 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#24 def on_new_investigation; end protected - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#150 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#151 def autocorrect(corrector); end # checks # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#55 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#56 def check_sigil_present(sigil); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#118 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#119 def check_strictness_level(sigil, strictness); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#94 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#95 def check_strictness_not_empty(sigil, strictness); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#106 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#107 def check_strictness_valid(sigil, strictness); end # Default is `nil` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#184 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#185 def exact_strictness; end # extraction # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#43 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#44 def extract_sigil(processed_source); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#49 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#50 def extract_strictness(sigil); end # Default is `nil` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#178 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#179 def minimum_strictness; end # Default is `false` # # @return [Boolean] # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#167 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#168 def require_sigil_on_all_files?; end # Default is `'false'` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#172 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#173 def suggested_strictness; end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#72 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#73 def suggested_strictness_level; end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#39 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#40 RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#38 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#39 RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) # Disallows the usage of `.void.checked(:tests)`. diff --git a/sorbet/rbi/gems/rubocop@1.70.0.rbi b/sorbet/rbi/gems/rubocop@1.72.2.rbi similarity index 96% rename from sorbet/rbi/gems/rubocop@1.70.0.rbi rename to sorbet/rbi/gems/rubocop@1.72.2.rbi index 9ac2ec34a..b46b6a4ca 100644 --- a/sorbet/rbi/gems/rubocop@1.70.0.rbi +++ b/sorbet/rbi/gems/rubocop@1.72.2.rbi @@ -452,47 +452,107 @@ class RuboCop::CLI::Command::ShowCops < ::RuboCop::CLI::Command::Base # @api private # @return [ShowCops] a new instance of ShowCops # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#12 + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#24 def initialize(env); end # @api private # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#19 + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#39 def run; end private # @api private # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#67 + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#89 def config_lines(cop); end # @api private # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#63 + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#85 def cops_of_department(cops, department); end # @api private # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#25 + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#45 def print_available_cops; end # @api private # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#48 + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#68 def print_cop_details(cops); end # @api private # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#36 + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#56 def print_cops_of_department(registry, department, show_all); end # @api private # - # source://rubocop//lib/rubocop/cli/command/show_cops.rb#57 + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#77 def selected_cops_of_department(cops, department); end end +# @api private +# +# source://rubocop//lib/rubocop/cli/command/show_cops.rb#12 +class RuboCop::CLI::Command::ShowCops::ExactMatcher < ::Struct + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#13 + def match?(name); end + + # Returns the value of attribute pattern + # + # @return [Object] the current value of pattern + def pattern; end + + # Sets the attribute pattern + # + # @param value [Object] the value to set the attribute pattern to. + # @return [Object] the newly set value + def pattern=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/cli/command/show_cops.rb#18 +class RuboCop::CLI::Command::ShowCops::WildcardMatcher < ::Struct + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cli/command/show_cops.rb#19 + def match?(name); end + + # Returns the value of attribute pattern + # + # @return [Object] the current value of pattern + def pattern; end + + # Sets the attribute pattern + # + # @param value [Object] the value to set the attribute pattern to. + # @return [Object] the newly set value + def pattern=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + # Prints out url to documentation of provided cops # or documentation base url by default. # @@ -557,7 +617,7 @@ class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base # @api private # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#111 + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#117 def dependent_gems; end # @api private @@ -567,7 +627,7 @@ class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base # @api private # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#103 + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#109 def installed_and_not_loaded_extensions; end # @api private @@ -577,7 +637,7 @@ class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base # @api private # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#115 + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#121 def installed_gems; end # @api private @@ -587,7 +647,7 @@ class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base # @api private # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#107 + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#113 def lockfile; end # @api private @@ -612,7 +672,7 @@ class RuboCop::CLI::Command::SuggestExtensions < ::RuboCop::CLI::Command::Base # @api private # - # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#119 + # source://rubocop//lib/rubocop/cli/command/suggest_extensions.rb#125 def puts(*args); end # @api private @@ -780,7 +840,7 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#63 def comment_only_line?(line_number); end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def config(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/comment_config.rb#51 @@ -804,7 +864,7 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#30 def processed_source; end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def registry(*_arg0, **_arg1, &_arg2); end private @@ -980,23 +1040,23 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#31 def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def [](*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def []=(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#179 + # source://rubocop//lib/rubocop/config.rb#183 def active_support_extensions_enabled?; end - # source://rubocop//lib/rubocop/config.rb#94 + # source://rubocop//lib/rubocop/config.rb#98 def add_excludes_from_higher_level(highest_config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#206 + # source://rubocop//lib/rubocop/config.rb#210 def allowed_camel_case_file?(file); end # Paths specified in configuration files starting with .rubocop are @@ -1005,74 +1065,74 @@ class RuboCop::Config # config/default.yml, for example, are not relative to RuboCop's config # directory since that wouldn't work. # - # source://rubocop//lib/rubocop/config.rb#250 + # source://rubocop//lib/rubocop/config.rb#254 def base_dir_for_path_parameters; end # @return [String, nil] # - # source://rubocop//lib/rubocop/config.rb#280 + # source://rubocop//lib/rubocop/config.rb#284 def bundler_lock_file_path; end - # source://rubocop//lib/rubocop/config.rb#52 + # source://rubocop//lib/rubocop/config.rb#56 def check; end # @api private # @return [Boolean] whether config for this badge has 'Include' or 'Exclude' keys # - # source://rubocop//lib/rubocop/config.rb#147 + # source://rubocop//lib/rubocop/config.rb#151 def clusivity_config_for_badge?(badge); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#167 + # source://rubocop//lib/rubocop/config.rb#171 def cop_enabled?(name); end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def delete(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#106 + # source://rubocop//lib/rubocop/config.rb#110 def deprecation_check; end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def dig(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#171 + # source://rubocop//lib/rubocop/config.rb#175 def disabled_new_cops?; end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def each(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def each_key(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#175 + # source://rubocop//lib/rubocop/config.rb#179 def enabled_new_cops?; end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def fetch(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#228 + # source://rubocop//lib/rubocop/config.rb#232 def file_to_exclude?(file); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#187 + # source://rubocop//lib/rubocop/config.rb#191 def file_to_include?(file); end - # source://rubocop//lib/rubocop/config.rb#163 + # source://rubocop//lib/rubocop/config.rb#167 def for_all_cops; end # Note: the 'Enabled' attribute is same as that returned by `for_cop` # # @return [Config] for the given cop merged with that of its department (if any) # - # source://rubocop//lib/rubocop/config.rb#133 + # source://rubocop//lib/rubocop/config.rb#137 def for_badge(badge); end # Note: the 'Enabled' attribute is calculated according to the department's @@ -1080,7 +1140,7 @@ class RuboCop::Config # # @return [Config] for the given cop / cop name. # - # source://rubocop//lib/rubocop/config.rb#120 + # source://rubocop//lib/rubocop/config.rb#124 def for_cop(cop); end # Note: the 'Enabled' attribute will be present only if specified @@ -1088,7 +1148,7 @@ class RuboCop::Config # # @return [Config] for the given department name. # - # source://rubocop//lib/rubocop/config.rb#158 + # source://rubocop//lib/rubocop/config.rb#162 def for_department(department_name); end # If the given cop is enabled, returns its configuration hash. @@ -1096,31 +1156,31 @@ class RuboCop::Config # # @return [Config, Hash] for the given cop / cop name. # - # source://rubocop//lib/rubocop/config.rb#127 + # source://rubocop//lib/rubocop/config.rb#131 def for_enabled_cop(cop); end # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) # - # source://rubocop//lib/rubocop/config.rb#305 + # source://rubocop//lib/rubocop/config.rb#309 def gem_versions_in_target; end - # source://rubocop//lib/rubocop/config.rb#309 + # source://rubocop//lib/rubocop/config.rb#313 def inspect; end # True if this is a config file that is shipped with RuboCop # # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#77 + # source://rubocop//lib/rubocop/config.rb#81 def internal?; end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def key?(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def keys(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#48 + # source://rubocop//lib/rubocop/config.rb#52 def loaded_features; end # Returns the value of attribute loaded_path. @@ -1128,28 +1188,31 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#21 def loaded_path; end - # source://rubocop//lib/rubocop/config.rb#82 + # source://rubocop//lib/rubocop/config.rb#48 + def loaded_plugins; end + + # source://rubocop//lib/rubocop/config.rb#86 def make_excludes_absolute; end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def map(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def merge(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#260 + # source://rubocop//lib/rubocop/config.rb#264 def parser_engine; end - # source://rubocop//lib/rubocop/config.rb#241 + # source://rubocop//lib/rubocop/config.rb#245 def path_relative_to_config(path); end - # source://rubocop//lib/rubocop/config.rb#237 + # source://rubocop//lib/rubocop/config.rb#241 def patterns_to_exclude; end - # source://rubocop//lib/rubocop/config.rb#233 + # source://rubocop//lib/rubocop/config.rb#237 def patterns_to_include; end - # source://rubocop//lib/rubocop/config.rb#291 + # source://rubocop//lib/rubocop/config.rb#295 def pending_cops; end # Returns true if there's a chance that an Include pattern matches hidden @@ -1157,74 +1220,74 @@ class RuboCop::Config # # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#220 + # source://rubocop//lib/rubocop/config.rb#224 def possibly_include_hidden?; end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def replace(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#72 + # source://rubocop//lib/rubocop/config.rb#76 def signature; end - # source://rubocop//lib/rubocop/config.rb#275 + # source://rubocop//lib/rubocop/config.rb#279 def smart_loaded_path; end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#183 + # source://rubocop//lib/rubocop/config.rb#187 def string_literals_frozen_by_default?; end - # source://rubocop//lib/rubocop/config.rb#264 + # source://rubocop//lib/rubocop/config.rb#268 def target_rails_version; end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def target_ruby_version(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def to_h(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def to_hash(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#68 + # source://rubocop//lib/rubocop/config.rb#72 def to_s; end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def transform_values(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def validate(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#59 + # source://rubocop//lib/rubocop/config.rb#63 def validate_after_resolution; end private - # source://rubocop//lib/rubocop/config.rb#359 + # source://rubocop//lib/rubocop/config.rb#363 def department_of(qualified_cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#347 + # source://rubocop//lib/rubocop/config.rb#351 def enable_cop?(qualified_cop_name, cop_options); end # @param gem_version [Gem::Version] an object like `Gem::Version.new("7.1.2.3")` # @return [Float] The major and minor version, like `7.1` # - # source://rubocop//lib/rubocop/config.rb#334 + # source://rubocop//lib/rubocop/config.rb#338 def gem_version_to_major_minor_float(gem_version); end - # source://rubocop//lib/rubocop/config.rb#340 + # source://rubocop//lib/rubocop/config.rb#344 def read_gem_versions_from_target_lockfile; end # @return [Float, nil] The Rails version as a `major.minor` Float. # - # source://rubocop//lib/rubocop/config.rb#321 + # source://rubocop//lib/rubocop/config.rb#325 def read_rails_version_from_bundler_lock_file; end # @return [Float, nil] The Rails version as a `major.minor` Float. # - # source://rubocop//lib/rubocop/config.rb#316 + # source://rubocop//lib/rubocop/config.rb#320 def target_rails_version_from_bundler_lock_file; end class << self @@ -1364,7 +1427,7 @@ class RuboCop::ConfigLoader extend ::RuboCop::FileFinder class << self - # source://rubocop//lib/rubocop/config_loader.rb#141 + # source://rubocop//lib/rubocop/config_loader.rb#149 def add_excludes_from_files(config, config_file); end # Used to add features that were required inside a config or from @@ -1372,10 +1435,18 @@ class RuboCop::ConfigLoader # # @api private # - # source://rubocop//lib/rubocop/config_loader.rb#202 + # source://rubocop//lib/rubocop/config_loader.rb#238 def add_loaded_features(loaded_features); end - # source://rubocop//lib/rubocop/config_loader.rb#84 + # Used to add plugins that were required inside a config or from + # the CLI using `--plugin`. + # + # @api private + # + # source://rubocop//lib/rubocop/config_loader.rb#231 + def add_loaded_plugins(loaded_plugins); end + + # source://rubocop//lib/rubocop/config_loader.rb#92 def add_missing_namespaces(path, hash); end # source://rubocop//lib/rubocop/config_loader.rb#41 @@ -1387,10 +1458,10 @@ class RuboCop::ConfigLoader # user's home directory is checked. If there's no .rubocop.yml # there either, the path to the default file is returned. # - # source://rubocop//lib/rubocop/config_loader.rb#108 + # source://rubocop//lib/rubocop/config_loader.rb#116 def configuration_file_for(target_dir); end - # source://rubocop//lib/rubocop/config_loader.rb#112 + # source://rubocop//lib/rubocop/config_loader.rb#120 def configuration_from_file(config_file, check: T.unsafe(nil)); end # Returns the value of attribute debug. @@ -1410,7 +1481,7 @@ class RuboCop::ConfigLoader # source://rubocop//lib/rubocop/config_loader.rb#33 def debug?; end - # source://rubocop//lib/rubocop/config_loader.rb#151 + # source://rubocop//lib/rubocop/config_loader.rb#159 def default_configuration; end # Sets the attribute default_configuration @@ -1473,17 +1544,20 @@ class RuboCop::ConfigLoader # source://rubocop//lib/rubocop/config_loader.rb#33 def ignore_unrecognized_cops=(_arg0); end - # @api private + # This API is primarily intended for testing and documenting plugins. + # When testing a plugin using `rubocop/rspec/support`, the plugin is loaded automatically, + # so this API is usually not needed. It is intended to be used only when implementing tests + # that do not use `rubocop/rspec/support`. # - # source://rubocop//lib/rubocop/config_loader.rb#159 - def inject_defaults!(project_root); end + # source://rubocop//lib/rubocop/config_loader.rb#171 + def inject_defaults!(config_yml_path); end - # source://rubocop//lib/rubocop/config_loader.rb#51 + # source://rubocop//lib/rubocop/config_loader.rb#53 def load_file(file, check: T.unsafe(nil)); end # @raise [TypeError] # - # source://rubocop//lib/rubocop/config_loader.rb#71 + # source://rubocop//lib/rubocop/config_loader.rb#79 def load_yaml_configuration(absolute_path); end # Returns the value of attribute loaded_features. @@ -1491,24 +1565,29 @@ class RuboCop::ConfigLoader # source://rubocop//lib/rubocop/config_loader.rb#36 def loaded_features; end + # Returns the value of attribute loaded_plugins. + # + # source://rubocop//lib/rubocop/config_loader.rb#36 + def loaded_plugins; end + # Return a recursive merge of two hashes. That is, a normal hash merge, # with the addition that any value that is a hash, and occurs in both # arguments, will also be merged. And so on. # - # source://rubocop//lib/rubocop/config_loader.rb#99 + # source://rubocop//lib/rubocop/config_loader.rb#107 def merge(base_hash, derived_hash); end # Merges the given configuration with the default one. # - # source://rubocop//lib/rubocop/config_loader.rb#195 + # source://rubocop//lib/rubocop/config_loader.rb#224 def merge_with_default(config, config_file, unset_nil: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/config_loader.rb#132 + # source://rubocop//lib/rubocop/config_loader.rb#140 def pending_cops_only_qualified(pending_cops); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader.rb#136 + # source://rubocop//lib/rubocop/config_loader.rb#144 def possible_new_cops?(config); end # Returns the path RuboCop inferred as the root of the project. No file @@ -1516,37 +1595,37 @@ class RuboCop::ConfigLoader # # @deprecated Use `RuboCop::ConfigFinder.project_root` instead. # - # source://rubocop//lib/rubocop/config_loader.rb#170 + # source://rubocop//lib/rubocop/config_loader.rb#199 def project_root; end - # source://rubocop//lib/rubocop/config_loader.rb#179 + # source://rubocop//lib/rubocop/config_loader.rb#208 def warn_on_pending_cops(pending_cops); end - # source://rubocop//lib/rubocop/config_loader.rb#187 + # source://rubocop//lib/rubocop/config_loader.rb#216 def warn_pending_cop(cop); end private - # source://rubocop//lib/rubocop/config_loader.rb#216 + # source://rubocop//lib/rubocop/config_loader.rb#252 def check_duplication(yaml_code, absolute_path); end - # source://rubocop//lib/rubocop/config_loader.rb#208 + # source://rubocop//lib/rubocop/config_loader.rb#244 def file_path(file); end # Read the specified file, or exit with a friendly, concise message on # stderr. Care is taken to use the standard OS exit code for a "file not # found" error. # - # source://rubocop//lib/rubocop/config_loader.rb#236 + # source://rubocop//lib/rubocop/config_loader.rb#272 def read_file(absolute_path); end - # source://rubocop//lib/rubocop/config_loader.rb#212 + # source://rubocop//lib/rubocop/config_loader.rb#248 def resolver; end - # source://rubocop//lib/rubocop/config_loader.rb#242 + # source://rubocop//lib/rubocop/config_loader.rb#278 def yaml_tree_to_hash(yaml_tree); end - # source://rubocop//lib/rubocop/config_loader.rb#252 + # source://rubocop//lib/rubocop/config_loader.rb#288 def yaml_tree_to_hash!(yaml_tree); end end end @@ -1564,7 +1643,7 @@ RuboCop::ConfigLoader::RUBOCOP_HOME = T.let(T.unsafe(nil), String) # # @api private # -# source://rubocop//lib/rubocop/config_loader_resolver.rb#9 +# source://rubocop//lib/rubocop/config_loader_resolver.rb#10 class RuboCop::ConfigLoaderResolver # When one .rubocop.yml file inherits from another .rubocop.yml file, the Include paths in the # base configuration are relative to the directory where the base configuration file is. For the @@ -1573,7 +1652,7 @@ class RuboCop::ConfigLoaderResolver # # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#45 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#63 def fix_include_paths(base_config_path, hash, path, key, value); end # Return a recursive merge of two hashes. That is, a normal hash merge, @@ -1583,7 +1662,7 @@ class RuboCop::ConfigLoaderResolver # # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#99 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#117 def merge(base_hash, derived_hash, **opts); end # Merges the given configuration with the default one. If @@ -1594,7 +1673,7 @@ class RuboCop::ConfigLoaderResolver # # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#75 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#93 def merge_with_default(config, config_file, unset_nil:); end # An `Enabled: true` setting in user configuration for a cop overrides an @@ -1602,7 +1681,7 @@ class RuboCop::ConfigLoaderResolver # # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#119 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#137 def override_department_setting_for_cops(base_hash, derived_hash); end # If a cop was previously explicitly enabled, but then superseded by the @@ -1610,112 +1689,111 @@ class RuboCop::ConfigLoaderResolver # # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#136 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#154 def override_enabled_for_disabled_departments(base_hash, derived_hash); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#19 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#37 def resolve_inheritance(path, hash, file, debug); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#55 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#73 def resolve_inheritance_from_gems(hash); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#10 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#11 + def resolve_plugins(rubocop_config, plugins); end + + # @api private + # + # source://rubocop//lib/rubocop/config_loader_resolver.rb#17 def resolve_requires(path, hash); end private # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#215 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#233 def base_configs(path, inherit_from, file); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#183 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#201 def determine_inherit_mode(hash, key); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#152 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#170 def disabled?(hash, department); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#156 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#174 def duplicate_setting?(base_hash, derived_hash, key, inherited_file); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#177 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#195 def duplicate_setting_warning(opts, key); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#278 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#292 def gem_config_path(gem_name, relative_config_path); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#256 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#270 def handle_disabled_by_default(config, new_default_configuration); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#227 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#245 def inherited_file(path, inherit_from, file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#211 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#229 def merge_hashes?(base_hash, derived_hash, key); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#252 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#266 def remote_config?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#248 - def remote_file?(uri); end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#203 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#221 def should_merge?(mode, key); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#207 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#225 def should_override?(mode, key); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#189 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#207 def should_union?(derived_hash, base_hash, root_mode, key); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#274 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#288 def transform(config, &block); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#165 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#183 def warn_on_duplicate_setting(base_hash, derived_hash, key, **opts); end end @@ -2299,10 +2377,10 @@ class RuboCop::ConfigValidator # source://rubocop//lib/rubocop/config_validator.rb#28 def initialize(config); end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def for_all_cops(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def smart_loaded_path(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config_validator.rb#65 @@ -2468,7 +2546,7 @@ module RuboCop::Cop::Alignment def within?(inner, outer); end end -# source://rubocop//lib/rubocop/cop/mixin/alignment.rb#10 +# source://rubocop//lib/rubocop/cop/mixin/alignment.rb#8 RuboCop::Cop::Alignment::SPACE = T.let(T.unsafe(nil), String) # This class does autocorrection of nodes that should just be moved to @@ -2609,7 +2687,7 @@ module RuboCop::Cop::AllowedPattern # @return [Boolean] # # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#21 - def ignored_line?; end + def ignored_line?(line); end # @return [Boolean] # @@ -2620,7 +2698,7 @@ module RuboCop::Cop::AllowedPattern # @return [Boolean] # # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#34 - def matches_ignored_pattern?; end + def matches_ignored_pattern?(line); end end # This module encapsulates the ability to allow certain receivers in a cop. @@ -5200,7 +5278,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter # Legacy # - # source://parser/3.3.7.0/lib/parser/source/tree_rewriter.rb#252 + # source://parser/3.3.7.1/lib/parser/source/tree_rewriter.rb#252 def rewrite; end # Swaps sources at the given ranges. @@ -5788,12 +5866,12 @@ module RuboCop::Cop::FrozenStringLiteral end end -# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#9 -RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL = T.let(T.unsafe(nil), String) - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#10 RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_ENABLED = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#9 +RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_REGEXP = T.let(T.unsafe(nil), Regexp) + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#11 RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_TYPES_RUBY27 = T.let(T.unsafe(nil), Array) @@ -6826,99 +6904,99 @@ end # # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#7 module RuboCop::Cop::HashShorthandSyntax - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#14 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#32 def on_hash_for_mixed_shorthand(hash_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#26 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#44 def on_pair(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#126 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#144 def brackets?(method_dispatch_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#156 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#174 def breakdown_value_types_of_hash(hash_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#103 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#121 def def_node_that_require_parentheses(node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#185 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#203 def each_omittable_value_pair(hash_value_type_breakdown, &block); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#181 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#199 def each_omitted_value_pair(hash_value_type_breakdown, &block); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#81 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#99 def enforced_shorthand_syntax; end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#118 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#136 def find_ancestor_method_dispatch_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#168 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#186 def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#172 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#190 def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#176 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#194 def ignore_explicit_omissible_hash_shorthand_syntax?(hash_value_type_breakdown); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#75 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#93 def ignore_hash_shorthand_syntax?(pair_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#69 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#87 def ignore_mixed_hash_shorthand_syntax?(hash_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#141 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#159 def last_expression?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#149 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#167 def method_dispatch_as_argument?(method_dispatch_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#189 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#207 def mixed_shorthand_syntax_check(hash_value_type_breakdown); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#205 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#223 def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#49 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#67 def register_offense(node, message, replacement); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#85 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#103 def require_hash_value?(hash_key_source, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#94 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#112 def require_hash_value_for_around_hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#130 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#148 def use_element_of_hash_literal_as_receiver?(ancestor, parent); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#135 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#153 def use_modifier_form_without_parenthesized_method_call?(ancestor); end end @@ -6931,12 +7009,12 @@ RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_MSG_PREFIX = T.let(T.unsafe(nil), # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#11 RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_OMIT_VALUE_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#216 +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#14 class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#225 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#23 def first_argument; end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#229 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#27 def last_argument; end # Returns the value of attribute node @@ -6950,7 +7028,7 @@ class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct # @return [Object] the newly set value def node=(_); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#217 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#15 def selector; end class << self @@ -6968,6 +7046,108 @@ RuboCop::Cop::HashShorthandSyntax::EXPLICIT_HASH_VALUE_MSG = T.let(T.unsafe(nil) # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#8 RuboCop::Cop::HashShorthandSyntax::OMIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), String) +# Common functionality for Style/HashExcept and Style/HashSlice cops. +# It registers an offense on methods with blocks that are equivalent +# to Hash#except or Hash#slice. +# +# source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#9 +module RuboCop::Cop::HashSubset + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#21 + def block_with_first_arg_check?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#36 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#36 + def on_send(node); end + + private + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#166 + def decorate_source(value); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#174 + def except_key(node); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#153 + def except_key_source(key); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#145 + def extract_body_if_negated(body); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#59 + def extract_offense(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#69 + def extracts_hash_subset?(block); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#123 + def included?(body, negated); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#131 + def not_included?(body, negated); end + + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#182 + def offense_range(node); end + + # @raise [NotImplementedError] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#55 + def preferred_method_name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#88 + def range_include?(send_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#135 + def safe_to_register_offense?(block, except_key); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#108 + def semantically_except_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#119 + def semantically_slice_method?(node); end + + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#51 + def semantically_subset_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#100 + def supported_subset_method?(method); end +end + +# source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#16 +RuboCop::Cop::HashSubset::ACTIVE_SUPPORT_SUBSET_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#18 +RuboCop::Cop::HashSubset::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#13 +RuboCop::Cop::HashSubset::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/mixin/hash_subset.rb#15 +RuboCop::Cop::HashSubset::SUBSET_METHODS = T.let(T.unsafe(nil), Array) + # Common functionality for Style/HashTransformKeys and # Style/HashTransformValues # @@ -6975,71 +7155,71 @@ RuboCop::Cop::HashShorthandSyntax::OMIT_HASH_VALUE_MSG = T.let(T.unsafe(nil), St module RuboCop::Cop::HashTransformMethod extend ::RuboCop::AST::NodePattern::Macros - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#13 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#87 def array_receiver?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#17 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#91 def on_block(node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#34 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#108 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#27 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#101 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#108 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#182 def execute_correction(corrector, node, correction); end # @abstract # @raise [NotImplementedError] # @return [Captures] # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#83 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#157 def extract_captures(_match); end - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#60 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#134 def handle_possible_offense(node, match, match_desc); end # @abstract # @raise [NotImplementedError] # @return [String] # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#90 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#164 def new_method_name; end # @abstract Implemented with `def_node_matcher` # @raise [NotImplementedError] # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#41 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#115 def on_bad_each_with_object(_node); end # @abstract Implemented with `def_node_matcher` # @raise [NotImplementedError] # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#46 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#120 def on_bad_hash_brackets_map(_node); end # @abstract Implemented with `def_node_matcher` # @raise [NotImplementedError] # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#51 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#125 def on_bad_map_to_h(_node); end # @abstract Implemented with `def_node_matcher` # @raise [NotImplementedError] # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#56 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#130 def on_bad_to_h(_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#94 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#168 def prepare_correction(node); end end # Internal helper class to hold autocorrect data # -# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#136 +# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#31 class RuboCop::Cop::HashTransformMethod::Autocorrection < ::Struct # Returns the value of attribute block_node # @@ -7074,16 +7254,16 @@ class RuboCop::Cop::HashTransformMethod::Autocorrection < ::Struct # @return [Object] the newly set value def match=(_); end - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#177 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#72 def set_new_arg_name(transformed_argname, corrector); end - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#181 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#76 def set_new_body_expression(transforming_body_expr, corrector); end - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#167 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#62 def set_new_method_name(new_method_name, corrector); end - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#161 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#56 def strip_prefix_and_suffix(node, corrector); end # Returns the value of attribute trailing @@ -7100,16 +7280,16 @@ class RuboCop::Cop::HashTransformMethod::Autocorrection < ::Struct class << self def [](*_arg0); end - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#137 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#32 def from_each_with_object(node, match); end - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#141 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#36 def from_hash_brackets_map(node, match); end - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#145 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#40 def from_map_to_h(node, match); end - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#157 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#52 def from_to_h(node, match); end def inspect; end @@ -7121,16 +7301,16 @@ end # Internal helper class to hold match data # -# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#118 +# source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#13 class RuboCop::Cop::HashTransformMethod::Captures < ::Struct # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#119 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#14 def noop_transformation?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#124 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#19 def transformation_uses_both_args?; end # Returns the value of attribute transformed_argname @@ -7168,7 +7348,7 @@ class RuboCop::Cop::HashTransformMethod::Captures < ::Struct # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#128 + # source://rubocop//lib/rubocop/cop/mixin/hash_transform_method.rb#23 def use_transformed_argname?; end class << self @@ -7409,7 +7589,7 @@ end module RuboCop::Cop::Layout; end # Bare access modifiers (those not applying to specific methods) should be -# indented as deep as method definitions, or as deep as the class/module +# indented as deep as method definitions, or as deep as the `class`/`module` # keyword, depending on configuration. # # @example EnforcedStyle: indent (default) @@ -7483,7 +7663,7 @@ end # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#41 RuboCop::Cop::Layout::AccessModifierIndentation::MSG = T.let(T.unsafe(nil), String) -# Check that the arguments on a multi-line method definition are aligned. +# Check that the arguments on a multi-line method call are aligned. # # @example EnforcedStyle: with_first_argument (default) # # good @@ -7818,73 +7998,73 @@ class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#74 def block_end_align_target?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#83 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#85 def on_block(node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#83 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#85 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#89 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#91 def style_parameter_name; end private - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#245 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#247 def add_space_before(corrector, loc, delta); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#222 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#224 def alt_start_msg(start_loc, source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#144 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#146 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#95 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#97 def block_end_align_target(node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#113 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#115 def check_block_alignment(start_node, block_node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#195 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#197 def compute_do_source_line_column(node, end_loc); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#237 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#239 def compute_start_col(ancestor_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#109 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#111 def disqualified_parent?(parent, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#105 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#107 def end_align_target?(node, parent); end # In offense message, we want to show the assignment LHS rather than # the entire assignment. # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#190 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#192 def find_lhs_node(node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#161 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#163 def format_message(start_loc, end_loc, do_source_line_column, error_source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#232 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#234 def format_source_line_column(source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#214 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#216 def loc_to_source_line_column(loc); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#126 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#128 def register_offense(block_node, start_loc, end_loc, do_source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#249 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#251 def remove_space_before(corrector, end_pos, delta); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#171 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#173 def start_for_block_node(block_node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#178 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#180 def start_for_line_node(block_node); end end @@ -8102,23 +8282,23 @@ end # source://rubocop//lib/rubocop/cop/layout/case_indentation.rb#118 RuboCop::Cop::Layout::CaseIndentation::MSG = T.let(T.unsafe(nil), String) -# Checks if the code style follows the ExpectedOrder configuration: +# Checks if the code style follows the `ExpectedOrder` configuration: # # `Categories` allows us to map macro names into a category. # # Consider an example of code style that covers the following order: # -# * Module inclusion (include, prepend, extend) +# * Module inclusion (`include`, `prepend`, `extend`) # * Constants -# * Associations (has_one, has_many) -# * Public attribute macros (attr_accessor, attr_writer, attr_reader) -# * Other macros (validates, validate) +# * Associations (`has_one`, `has_many`) +# * Public attribute macros (`attr_accessor`, `attr_writer`, `attr_reader`) +# * Other macros (`validates`, `validate`) # * Public class methods # * Initializer # * Public instance methods -# * Protected attribute macros (attr_accessor, attr_writer, attr_reader) +# * Protected attribute macros (`attr_accessor`, `attr_writer`, `attr_reader`) # * Protected instance methods -# * Private attribute macros (attr_accessor, attr_writer, attr_reader) +# * Private attribute macros (`attr_accessor`, `attr_writer`, `attr_reader`) # * Private instance methods # # You can configure the following order: @@ -9342,20 +9522,14 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil # `AllowAdjacentOneLineDefs` configures whether adjacent # one-line definitions are considered an offense. # -# @example AllowAdjacentOneLineDefs: false +# @example EmptyLineBetweenMethodDefs: true (default) +# # checks for empty lines between method definitions. # # # bad -# class ErrorA < BaseError; end -# class ErrorB < BaseError; end -# class ErrorC < BaseError; end -# -# # good -# class ErrorA < BaseError; end -# -# class ErrorB < BaseError; end -# -# class ErrorC < BaseError; end -# @example +# def a +# end +# def b +# end # # # good # def a @@ -9373,7 +9547,6 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil # end # def b # end -# @example # # # good # class A @@ -9394,7 +9567,6 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil # end # def b # end -# @example # # # good # module A @@ -9418,24 +9590,29 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil # class ErrorB < BaseError; end # # class ErrorC < BaseError; end -# @example EmptyLineBetweenMethodDefs: true (default) -# # checks for empty lines between method definitions. +# @example AllowAdjacentOneLineDefs: false # # # bad -# def a -# end -# def b -# end +# class ErrorA < BaseError; end +# class ErrorB < BaseError; end +# class ErrorC < BaseError; end # -# source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#108 +# # good +# class ErrorA < BaseError; end +# +# class ErrorB < BaseError; end +# +# class ErrorC < BaseError; end +# +# source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#102 class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#145 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#139 def autocorrect(corrector, prev_def, node, count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#130 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#124 def check_defs(nodes); end # We operate on `begin` nodes, instead of using `OnMethodDef`, @@ -9444,100 +9621,100 @@ class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base # doing a linear scan over siblings, so we don't want to call # it on each def. # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#123 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#117 def on_begin(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#291 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#287 def allowance_range?; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#275 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#269 def autocorrect_insert_lines(corrector, newline_pos, count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#268 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#262 def autocorrect_remove_lines(corrector, newline_pos, count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#228 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#222 def blank_lines_count_between(first_def_node, second_def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#172 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#166 def candidate?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#192 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#186 def class_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#256 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#250 def def_end(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#164 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#158 def def_location(correction_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#248 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#242 def def_start(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#179 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#173 def empty_line_between_macros; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#260 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#254 def end_loc(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#206 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#200 def expected_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#224 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#218 def line_count_allowed?(count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#240 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#234 def lines_between_defs(first_def_node, second_def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#183 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#177 def macro_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#236 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#230 def maximum_empty_lines; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#200 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#194 def message(node, count: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#188 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#182 def method_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#232 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#226 def minimum_empty_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#196 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#190 def module_candidate?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#215 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#209 def multiple_blank_lines_groups?(first_def_node, second_def_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#282 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#276 def node_type(node); end class << self - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#114 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#108 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#112 +# source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#106 RuboCop::Cop::Layout::EmptyLineBetweenDefs::MSG = T.let(T.unsafe(nil), String) # Checks for two or more consecutive blank lines. @@ -10140,7 +10317,7 @@ RuboCop::Cop::Layout::EmptyLinesAroundClassBody::KIND = T.let(T.unsafe(nil), Str # Checks if empty lines exist around the bodies of `begin` # sections. This cop doesn't check empty lines at `begin` body # beginning/end and around method definition body. -# `Style/EmptyLinesAroundBeginBody` or `Style/EmptyLinesAroundMethodBody` +# `Layout/EmptyLinesAroundBeginBody` or `Layout/EmptyLinesAroundMethodBody` # can be used for this purpose. # # @example @@ -10277,7 +10454,15 @@ class RuboCop::Cop::Layout::EmptyLinesAroundMethodBody < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#38 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#47 + def offending_endless_method?(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#52 + def register_offense_for_endless_method(node); end + + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_method_body.rb#43 def style; end end @@ -11034,7 +11219,7 @@ RuboCop::Cop::Layout::FirstArrayElementLineBreak::MSG = T.let(T.unsafe(nil), Str # where the opening brace and the first key are on separate lines. The # other keys' indentations are handled by the HashAlignment cop. # -# By default, Hash literals that are arguments in a method call with +# By default, `Hash` literals that are arguments in a method call with # parentheses, and where the opening curly brace of the hash is on the # same line as the opening parenthesis of the method call, shall have # their first key indented one step (two spaces) more than the position @@ -11411,10 +11596,10 @@ RuboCop::Cop::Layout::FirstMethodParameterLineBreak::MSG = T.let(T.unsafe(nil), # Checks the indentation of the first parameter in a method # definition. Parameters after the first one are checked by -# Layout/ParameterAlignment, not by this cop. +# `Layout/ParameterAlignment`, not by this cop. # # For indenting the first argument of method _calls_, check out -# Layout/FirstArgumentIndentation, which supports options related to +# `Layout/FirstArgumentIndentation`, which supports options related to # nesting that are irrelevant for method _definitions_. # # @example @@ -13866,6 +14051,9 @@ class RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks < ::RuboCop::Cop:: include ::RuboCop::Cop::MultilineElementLineBreaks extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#86 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#86 def on_send(node); end @@ -13873,7 +14061,7 @@ class RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks < ::RuboCop::Cop:: # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#105 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb#106 def ignore_last_element?; end end @@ -13970,22 +14158,25 @@ class RuboCop::Cop::Layout::MultilineMethodCallBraceLayout < ::RuboCop::Cop::Bas include ::RuboCop::Cop::MultilineLiteralBraceLayout extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#109 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#109 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#115 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#116 def children(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#119 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#120 def ignored_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#123 + # source://rubocop//lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb#124 def single_line_ignoring_receiver?(node); end end @@ -14773,9 +14964,9 @@ end # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#26 RuboCop::Cop::Layout::SingleLineBlockChain::MSG = T.let(T.unsafe(nil), String) -# Checks for colon (:) not followed by some kind of space. +# Checks for colon (`:`) not followed by some kind of space. # N.B. this cop does not handle spaces after a ternary operator, which are -# instead handled by Layout/SpaceAroundOperators. +# instead handled by `Layout/SpaceAroundOperators`. # # @example # # bad @@ -14808,7 +14999,7 @@ end # source://rubocop//lib/rubocop/cop/layout/space_after_colon.rb#19 RuboCop::Cop::Layout::SpaceAfterColon::MSG = T.let(T.unsafe(nil), String) -# Checks for comma (,) not followed by some kind of space. +# Checks for comma (`,`) not followed by some kind of space. # # @example # @@ -14897,7 +15088,7 @@ RuboCop::Cop::Layout::SpaceAfterNot::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/layout/space_after_not.rb#19 RuboCop::Cop::Layout::SpaceAfterNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Checks for semicolon (;) not followed by some kind of space. +# Checks for semicolon (`;`) not followed by some kind of space. # # @example # # bad @@ -15083,161 +15274,161 @@ RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault::MSG = T.let(T.unsafe( class RuboCop::Cop::Layout::SpaceAroundKeyword < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#40 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#41 def on_and(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#44 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#45 def on_block(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#48 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#49 def on_break(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#52 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#53 def on_case(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#56 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#57 def on_case_match(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#156 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#157 def on_defined?(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#60 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#61 def on_ensure(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#64 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#65 def on_for(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#68 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#69 def on_if(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#72 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#73 def on_if_guard(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#76 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#77 def on_in_pattern(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#80 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#81 def on_kwbegin(node); end # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby27`. # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#85 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#86 def on_match_pattern(node); end # Handle one-line pattern matching syntax (`in`) with `Parser::Ruby30`. # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#92 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#93 def on_match_pattern_p(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#96 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#97 def on_next(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#100 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#101 def on_or(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#104 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#105 def on_postexe(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#108 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#109 def on_preexe(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#112 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#113 def on_resbody(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#116 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#117 def on_rescue(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#120 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#121 def on_return(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#124 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#125 def on_send(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#128 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#129 def on_super(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#136 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#137 def on_unless_guard(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#140 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#141 def on_until(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#144 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#145 def on_when(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#148 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#149 def on_while(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#152 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#153 def on_yield(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#132 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#133 def on_zsuper(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#235 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#236 def accept_left_parenthesis?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#239 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#240 def accept_left_square_bracket?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#243 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#244 def accept_namespace_operator?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#228 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#229 def accepted_opening_delimiter?(range, char); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#162 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#163 def check(node, locations, begin_keyword = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#177 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#178 def check_begin(node, range, begin_keyword); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#183 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#184 def check_end(node, range, begin_keyword); end - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#196 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#197 def check_keyword(node, range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#192 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#193 def do?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#251 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#252 def namespace_operator?(range, pos); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#255 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#256 def preceded_by_operator?(node, _range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#247 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#248 def safe_navigation_call?(range, pos); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#217 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#218 def space_after_missing?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#210 + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#211 def space_before_missing?(range); end end @@ -15262,6 +15453,9 @@ RuboCop::Cop::Layout::SpaceAroundKeyword::MSG_BEFORE = T.let(T.unsafe(nil), Stri # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#35 RuboCop::Cop::Layout::SpaceAroundKeyword::NAMESPACE_OPERATOR = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#39 +RuboCop::Cop::Layout::SpaceAroundKeyword::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # source://rubocop//lib/rubocop/cop/layout/space_around_keyword.rb#34 RuboCop::Cop::Layout::SpaceAroundKeyword::SAFE_NAVIGATION = T.let(T.unsafe(nil), String) @@ -15679,7 +15873,7 @@ RuboCop::Cop::Layout::SpaceBeforeBrackets::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/layout/space_before_brackets.rb#22 RuboCop::Cop::Layout::SpaceBeforeBrackets::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Checks for comma (,) preceded by space. +# Checks for comma (`,`) preceded by space. # # @example # # bad @@ -15779,7 +15973,7 @@ end # source://rubocop//lib/rubocop/cop/layout/space_before_first_arg.rb#29 RuboCop::Cop::Layout::SpaceBeforeFirstArg::MSG = T.let(T.unsafe(nil), String) -# Checks for semicolon (;) preceded by space. +# Checks for semicolon (`;`) preceded by space. # # @example # # bad @@ -17311,6 +17505,88 @@ end # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#25 RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) +# Checks for an array literal interpolated inside a regexp. +# +# When interpolating an array literal, it is converted to a string. This means +# that when inside a regexp, it acts as a character class but with additional +# quotes, spaces and commas that are likely not intended. For example, +# `/#{%w[a b c]}/` parses as `/["a", "b", "c"]/` (or `/["a, bc]/` without +# repeated characters). +# +# The cop can autocorrect to a character class (if all items in the array are a +# single character) or alternation (if the array contains longer items). +# +# NOTE: This only considers interpolated arrays that contain only strings, symbols, +# integers, and floats. Any other type is not easily convertible to a character class +# or regexp alternation. +# +# @example +# # bad +# /#{%w[a b c]}/ +# +# # good +# /[abc]/ +# +# # bad +# /#{%w[foo bar baz]}/ +# +# # good +# /(?:foo|bar|baz)/ +# +# # bad - construct a regexp rather than interpolate an array of identifiers +# /#{[foo, bar]}/ +# +# source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#41 +class RuboCop::Cop::Lint::ArrayLiteralInRegexp < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Interpolation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#53 + def on_interpolation(begin_node); end + + private + + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#107 + def alternation_for(values); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#68 + def array_of_literal_values?(node); end + + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#93 + def array_values(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#99 + def character_class?(values); end + + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#103 + def character_class_for(values); end + + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#111 + def escape_values(values); end + + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#72 + def register_array_of_literal_values(begin_node, node); end + + # source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#88 + def register_array_of_nonliteral_values(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#45 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::LITERAL_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#49 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_ALTERNATION = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#48 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_CHARACTER_CLASS = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/array_literal_in_regexp.rb#50 +RuboCop::Cop::Lint::ArrayLiteralInRegexp::MSG_UNKNOWN = T.let(T.unsafe(nil), String) + # Checks for assignments in the conditions of # if/while/until. # @@ -17358,23 +17634,23 @@ class RuboCop::Cop::Lint::AssignmentInCondition < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#82 + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#80 def allowed_construct?(asgn_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#86 + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#84 def conditional_assignment?(asgn_node); end - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#74 + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#72 def message(_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#90 + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#88 def skip_children?(asgn_node); end - # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#96 + # source://rubocop//lib/rubocop/cop/lint/assignment_in_condition.rb#94 def traverse_node(node, &block); end end @@ -17426,7 +17702,7 @@ RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # Although these can be rewritten in a different way, it should not be necessary to # do so. Operations such as `-` or `/` where the result will always be the same # (`x - x` will always be 0; `x / x` will always be 1) are offenses, but these -# are covered by Lint/NumericOperationWithConstantResult instead. +# are covered by `Lint/NumericOperationWithConstantResult` instead. # # @example # # bad @@ -17748,13 +18024,13 @@ class RuboCop::Cop::Lint::ConstantReassignment < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#139 + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#135 def ancestor_namespaces(node); end - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#146 + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#142 def constant_names; end - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#135 + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#131 def constant_namespaces(node); end # @return [Boolean] @@ -17764,20 +18040,15 @@ class RuboCop::Cop::Lint::ConstantReassignment < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#115 + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#111 def freeze_method?(node); end - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#119 + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#115 def fully_qualified_constant_name(node); end - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#131 + # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#127 def fully_qualified_name_for(namespaces, constant); end - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#111 - def namespace_definition?(node); end - # @return [Boolean] # # source://rubocop//lib/rubocop/cop/lint/constant_reassignment.rb#102 @@ -17869,6 +18140,62 @@ end # source://rubocop//lib/rubocop/cop/lint/constant_resolution.rb#63 RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) +# are strictly formatted. +# +# A comment can be added to the directive by prefixing it with `--`. +# +# @example +# # bad +# # rubocop:disable Layout/LineLength Style/Encoding +# # ^ missing comma +# +# # bad +# # rubocop:disable +# +# # bad +# # rubocop:disable Layout/LineLength # rubocop:disable Style/Encoding +# +# # bad +# # rubocop:wrongmode Layout/LineLength +# +# # good +# # rubocop:disable Layout/LineLength +# +# # good +# # rubocop:disable Layout/LineLength, Style/Encoding +# +# # good +# # rubocop:disable all +# +# # good +# # rubocop:disable Layout/LineLength -- This is a good comment. +# +# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#39 +class RuboCop::Cop::Lint::CopDirectiveSyntax < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#48 + def on_new_investigation; end + + private + + # source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#62 + def offense_message(directive_comment); end +end + +# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#40 +RuboCop::Cop::Lint::CopDirectiveSyntax::COMMON_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#43 +RuboCop::Cop::Lint::CopDirectiveSyntax::INVALID_MODE_NAME_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#45 +RuboCop::Cop::Lint::CopDirectiveSyntax::MALFORMED_COP_NAMES_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#44 +RuboCop::Cop::Lint::CopDirectiveSyntax::MISSING_COP_NAME_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/cop_directive_syntax.rb#42 +RuboCop::Cop::Lint::CopDirectiveSyntax::MISSING_MODE_NAME_MSG = T.let(T.unsafe(nil), String) + # Checks for debug calls (such as `debugger` or `binding.pry`) that should # not be kept for production code. # @@ -18738,7 +19065,7 @@ RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#44 RuboCop::Cop::Lint::DuplicateMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Checks for duplicate elements in Regexp character classes. +# Checks for duplicate elements in `Regexp` character classes. # # @example # @@ -18883,7 +19210,7 @@ end # source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#31 RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) -# Checks for duplicate literal, constant, or variable elements in Set and SortedSet. +# Checks for duplicate literal, constant, or variable elements in `Set` and `SortedSet`. # # @example # @@ -19362,7 +19689,6 @@ RuboCop::Cop::Lint::EmptyEnsure::MSG = T.let(T.unsafe(nil), String) # if () # bar # end -# @example # # # good # @@ -19371,20 +19697,20 @@ RuboCop::Cop::Lint::EmptyEnsure::MSG = T.let(T.unsafe(nil), String) # bar # end # -# source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#25 +# source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#23 class RuboCop::Cop::Lint::EmptyExpression < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#28 + # source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#26 def on_begin(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#36 + # source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#34 def empty_expression?(begin_node); end end -# source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#26 +# source://rubocop//lib/rubocop/cop/lint/empty_expression.rb#24 RuboCop::Cop::Lint::EmptyExpression::MSG = T.let(T.unsafe(nil), String) # Enforces that Ruby source files are not empty. @@ -19761,44 +20087,50 @@ RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#38 class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#47 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#48 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#48 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#97 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#100 def check_numeric_returning_method(node); end - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#82 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#85 def check_send(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#60 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#63 def float?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#75 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#78 def literal_safe?(node); end end -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#41 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#42 RuboCop::Cop::Lint::FloatComparison::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#43 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#44 RuboCop::Cop::Lint::FloatComparison::FLOAT_INSTANCE_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#42 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#43 RuboCop::Cop::Lint::FloatComparison::FLOAT_RETURNING_METHODS = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#39 -RuboCop::Cop::Lint::FloatComparison::MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Lint::FloatComparison::MSG_EQUALITY = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#45 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#40 +RuboCop::Cop::Lint::FloatComparison::MSG_INEQUALITY = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#46 RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Identifies Float literals which are, like, really really really +# Identifies `Float` literals which are, like, really really really # really really really really really big. Too big. No-one needs Floats # that big. If you need a float that big, something is wrong with you. # @@ -19823,7 +20155,7 @@ RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) # expected fields for format/sprintf/#% and what is actually # passed as arguments. # -# In addition it checks whether different formats are used in the same +# In addition, it checks whether different formats are used in the same # format string. Do not mix numbered, unnumbered, and named formats in # the same format string. # @@ -20708,6 +21040,9 @@ RuboCop::Cop::Lint::LiteralAssignmentInCondition::MSG = T.let(T.unsafe(nil), Str # Checks for interpolated literals. # +# NOTE: Array literals interpolated in regexps are not handled by this cop, but +# by `Lint/ArrayLiteralInRegexp` instead. +# # @example # # # bad @@ -20716,79 +21051,84 @@ RuboCop::Cop::Lint::LiteralAssignmentInCondition::MSG = T.let(T.unsafe(nil), Str # # good # "result is 10" # -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#15 +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#18 class RuboCop::Cop::Lint::LiteralInInterpolation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Interpolation include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::PercentLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#25 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#28 def on_interpolation(begin_node); end private - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#68 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#72 + def array_in_regexp?(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#78 def autocorrected_value(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#135 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#145 def autocorrected_value_for_array(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#141 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#151 def autocorrected_value_for_hash(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#111 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#121 def autocorrected_value_for_string(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#119 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#129 def autocorrected_value_for_symbol(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#152 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#162 def autocorrected_value_in_hash(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#126 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#136 def autocorrected_value_in_hash_for_symbol(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#182 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#192 def ends_heredoc_line?(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#90 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#100 def handle_special_regexp_chars(begin_node, value); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#190 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#200 def in_array_percent_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#54 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#57 def offending?(node); end # Does node print its own source when converted to a string? # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#173 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#183 def prints_as_self?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#178 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#188 def space_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#62 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#67 def special_keyword?(node); end end -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#22 +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#25 RuboCop::Cop::Lint::LiteralInInterpolation::COMPOSITE = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#21 +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#24 RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) # Checks for uses of `begin...end while/until something`. @@ -21063,7 +21403,7 @@ RuboCop::Cop::Lint::MissingSuper::STATELESS_CLASSES = T.let(T.unsafe(nil), Array # Offenses are registered for regexp character classes like `/[A-z]/` # as well as range objects like `('A'..'z')`. # -# NOTE: Range objects cannot be autocorrected. +# NOTE: `Range` objects cannot be autocorrected. # # @example # @@ -21126,7 +21466,7 @@ RuboCop::Cop::Lint::MixedCaseRange::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#35 RuboCop::Cop::Lint::MixedCaseRange::RANGES = T.let(T.unsafe(nil), Array) -# Do not mix named captures and numbered captures in a Regexp literal +# Do not mix named captures and numbered captures in a `Regexp` literal # because numbered capture is ignored if they're mixed. # Replace numbered captures with non-capturing groupings or # named captures. @@ -21931,10 +22271,10 @@ RuboCop::Cop::Lint::NumberedParameterAssignment::NUM_PARAM_MSG = T.let(T.unsafe( # As such, they can be replaced with that result. # These are probably leftover from debugging, or are mistakes. # Other numeric operations that are similarly leftover from debugging or mistakes -# are handled by Lint/UselessNumericOperation. +# are handled by `Lint/UselessNumericOperation`. # # NOTE: This cop doesn't detect offenses for the `-` and `%` operator because it -# can't determine the type of `x`. If `x` is an Array or String, it doesn't perform +# can't determine the type of `x`. If `x` is an `Array` or `String`, it doesn't perform # a numeric operation. # # @example @@ -21972,7 +22312,10 @@ class RuboCop::Cop::Lint::NumericOperationWithConstantResult < ::RuboCop::Cop::B # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#56 def abbreviated_assignment_with_constant_result?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#71 + # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#59 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#69 def on_op_asgn(node); end # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#59 @@ -21985,8 +22328,8 @@ class RuboCop::Cop::Lint::NumericOperationWithConstantResult < ::RuboCop::Cop::B # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#85 - def constant_result?(variable, operation, number); end + # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#80 + def constant_result?(lhs, operation, rhs); end end # source://rubocop//lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb#48 @@ -22063,7 +22406,7 @@ end # source://rubocop//lib/rubocop/cop/lint/ordered_magic_comments.rb#36 RuboCop::Cop::Lint::OrderedMagicComments::MSG = T.let(T.unsafe(nil), String) -# Looks for references of Regexp captures that are out of range +# Looks for references of `Regexp` captures that are out of range # and thus always returns nil. # # @example @@ -22080,10 +22423,13 @@ RuboCop::Cop::Lint::OrderedMagicComments::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#38 class RuboCop::Cop::Lint::OutOfRangeRegexpRef < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#55 + def after_csend(node); end + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#55 def after_send(node); end - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#71 + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#72 def on_in_pattern(node); end # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#51 @@ -22092,33 +22438,33 @@ class RuboCop::Cop::Lint::OutOfRangeRegexpRef < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#47 def on_new_investigation; end - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#77 + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#78 def on_nth_ref(node); end - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#65 + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#66 def on_when(node); end private - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#102 + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#103 def check_regexp(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#122 + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#123 def nth_ref_receiver?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#113 + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#114 def regexp_first_argument?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#93 + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#94 def regexp_patterns(in_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#118 + # source://rubocop//lib/rubocop/cop/lint/out_of_range_regexp_ref.rb#119 def regexp_receiver?(send_node); end end @@ -22165,28 +22511,23 @@ class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#60 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#56 def chained_calls?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#56 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#52 def compound_range?(first_arg); end - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#47 - def first_argument_block_type?(first_arg); end - - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#85 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#81 def space_range(expr, space_length); end - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#69 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#65 def spaces_before_left_parenthesis(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#65 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#61 def ternary_expression?(node); end # @return [Boolean] @@ -22196,7 +22537,7 @@ class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#51 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#47 def valid_first_argument?(first_arg); end end @@ -22678,7 +23019,7 @@ RuboCop::Cop::Lint::RedundantDirGlobSort::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/lint/redundant_dir_glob_sort.rb#37 RuboCop::Cop::Lint::RedundantDirGlobSort::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Checks for redundant quantifiers inside Regexp literals. +# Checks for redundant quantifiers inside `Regexp` literals. # # It is always allowed when interpolation is used in a regexp literal, # because it's unknown what kind of string will be expanded as a result: @@ -23131,6 +23472,161 @@ RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), Str # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#29 RuboCop::Cop::Lint::RedundantStringCoercion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Checks for redundant uses of `to_s`, `to_sym`, `to_i`, `to_f`, `to_r`, `to_c`, +# `to_a`, `to_h`, and `to_set`. +# +# When one of these methods is called on an object of the same type, that object +# is returned, making the call unnecessary. The cop detects conversion methods called +# on object literals, class constructors, class `[]` methods, and the `Kernel` methods +# `String()`, `Integer()`, `Float()`, `Rational()`, `Complex()` and `Array()`. +# +# Specifically, these cases are detected for each conversion method: +# +# * `to_s` when called on a string literal, interpolated string, heredoc, +# or with `String.new` or `String()`. +# * `to_sym` when called on a symbol literal or interpolated symbol. +# * `to_i` when called on an integer literal or with `Integer()`. +# * `to_f` when called on a float literal of with `Float()`. +# * `to_r` when called on a rational literal or with `Rational()`. +# * `to_c` when called on a complex literal of with `Complex()`. +# * `to_a` when called on an array literal, or with `Array.new`, `Array()` or `Array[]`. +# * `to_h` when called on a hash literal, or with `Hash.new`, `Hash()` or `Hash[]`. +# * `to_set` when called on `Set.new` or `Set[]`. +# +# In all cases, chaining one same `to_*` conversion methods listed above is redundant. +# +# The cop can also register an offense for chaining conversion methods on methods that are +# expected to return a specific type regardless of receiver (eg. `foo.inspect.to_s`). +# +# @example +# # bad +# "text".to_s +# :sym.to_sym +# 42.to_i +# 8.5.to_f +# 12r.to_r +# 1i.to_c +# [].to_a +# {}.to_h +# Set.new.to_s +# +# # good +# "text" +# :sym +# 42 +# 8.5 +# 12r +# 1i +# [] +# {} +# Set.new +# +# # bad - chaining the same conversion +# foo.to_s.to_s +# +# # good +# foo.to_s +# +# # bad - chaining a conversion to a method that is expected to return the same type +# inspect.to_s +# +# # good +# inspect +# +# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#67 +class RuboCop::Cop::Lint::RedundantTypeConversion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#141 + def array_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#136 + def complex_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#126 + def float_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#149 + def hash_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#121 + def integer_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#165 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#165 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#131 + def rational_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#158 + def set_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#113 + def string_constructor?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#108 + def type_constructor?(param0 = T.unsafe(nil), param1); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#217 + def chained_conversion?(node, receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#223 + def chained_to_typed_method?(node, receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#210 + def constructor?(node, receiver); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#191 + def find_receiver(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#185 + def hash_or_set_with_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#204 + def literal_receiver?(node, receiver); end +end + +# Maps each conversion method to the pattern matcher for that type's constructors +# Not every type has a constructor, for instance Symbol. +# +# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#87 +RuboCop::Cop::Lint::RedundantTypeConversion::CONSTRUCTOR_MAPPING = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#102 +RuboCop::Cop::Lint::RedundantTypeConversion::CONVERSION_METHODS = T.let(T.unsafe(nil), Set) + +# Maps conversion methods to the node types for the literals of that type +# +# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#73 +RuboCop::Cop::Lint::RedundantTypeConversion::LITERAL_NODE_TYPES = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#70 +RuboCop::Cop::Lint::RedundantTypeConversion::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#103 +RuboCop::Cop::Lint::RedundantTypeConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Methods that already are expected to return a given type, which makes a further +# conversion redundant. +# +# source://rubocop//lib/rubocop/cop/lint/redundant_type_conversion.rb#100 +RuboCop::Cop::Lint::RedundantTypeConversion::TYPED_METHODS = T.let(T.unsafe(nil), Hash) + # Checks for redundant `with_index`. # # @example @@ -23425,7 +23921,7 @@ RuboCop::Cop::Lint::RequireRelativeSelfPath::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/lint/require_relative_self_path.rb#26 RuboCop::Cop::Lint::RequireRelativeSelfPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Checks for `rescue` blocks targeting the Exception class. +# Checks for `rescue` blocks targeting the `Exception` class. # # @example # @@ -23609,6 +24105,11 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#95 def brackets?(send_node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#108 + def operator_inside_hash?(send_node); end + # @return [Boolean] # # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#99 @@ -24227,11 +24728,11 @@ end # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#42 RuboCop::Cop::Lint::ShadowingOuterLocalVariable::MSG = T.let(T.unsafe(nil), String) -# Checks for Hash creation with a mutable default value. -# Creating a Hash in such a way will share the default value +# Checks for `Hash` creation with a mutable default value. +# Creating a `Hash` in such a way will share the default value # across all keys, causing unexpected behavior when modifying it. # -# For example, when the Hash was created with an Array as the argument, +# For example, when the `Hash` was created with an `Array` as the argument, # calling `hash[:foo] << 'bar'` will also change the value of all # other keys that have not been explicitly assigned to. # @@ -24440,6 +24941,64 @@ end # source://rubocop//lib/rubocop/cop/lint/suppressed_exception.rb#106 RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) +# Checks for cases where exceptions unrelated to the numeric constructors `Integer()`, +# `Float()`, `BigDecimal()`, `Complex()`, and `Rational()` may be unintentionally swallowed. +# +# @example +# +# # bad +# Integer(arg) rescue nil +# +# # bad +# begin +# Integer(arg) +# rescue +# nil +# end +# +# # bad +# begin +# Integer(arg) +# rescue +# end +# +# # good +# Integer(arg, exception: false) +# +# source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#41 +class RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#56 + def begin_numeric_constructor_rescue_nil(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#75 + def constructor_receiver?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#49 + def numeric_constructor_rescue_nil(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#65 + def numeric_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#82 + def on_rescue(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#103 + def expected_exception_classes_only?(exception_classes); end +end + +# source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#46 +RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion::EXPECTED_EXCEPTION_CLASSES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb#45 +RuboCop::Cop::Lint::SuppressedExceptionInNumberConversion::MSG = T.let(T.unsafe(nil), String) + # Checks for uses of literal strings converted to # a symbol where a literal symbol could be used instead. # @@ -25926,7 +26485,7 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) # rescue, ensure, etc. # # This cop's autocorrection avoids cases like `a ||= 1` because removing assignment from -# operator assignment can cause NameError if this assignment has been used to declare +# operator assignment can cause `NameError` if this assignment has been used to declare # a local variable. For example, replacing `a ||= 1` with `a || 1` may cause # "undefined local variable or method `a' for main:Object (NameError)". # @@ -26026,6 +26585,64 @@ end # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) +# Checks for useless constant scoping. Private constants must be defined using +# `private_constant` or `class << self`. Even if `private` access modifier is used, +# it is public scope despite its appearance. +# +# It does not support autocorrection due to behavior change and multiple ways to fix it. +# Or a public constant may be intended. +# +# @example +# +# # bad +# class Foo +# private +# PRIVATE_CONST = 42 +# end +# +# # good +# class Foo +# PRIVATE_CONST = 42 +# private_constant :PRIVATE_CONST +# end +# +# # good +# class Foo +# class << self +# private +# PRIVATE_CONST = 42 +# end +# end +# +# # good +# class Foo +# PUBLIC_CONST = 42 # If private scope is not intended. +# end +# +# source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#40 +class RuboCop::Cop::Lint::UselessConstantScoping < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#48 + def on_casgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#44 + def private_constants(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#58 + def after_private_modifier?(left_siblings); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#68 + def private_constantize?(right_siblings, const_value); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_constant_scoping.rb#41 +RuboCop::Cop::Lint::UselessConstantScoping::MSG = T.let(T.unsafe(nil), String) + # Checks for calls to `defined?` with strings or symbols as the argument. # Such calls will always return `'expression'`, you probably meant to # check for the existence of a constant, method, or variable instead. @@ -26199,7 +26816,10 @@ RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Lint::UselessNumericOperation < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#54 + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#43 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#55 def on_op_asgn(node); end # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#43 @@ -26215,7 +26835,7 @@ class RuboCop::Cop::Lint::UselessNumericOperation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#67 + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#68 def useless?(operation, number); end end @@ -26605,21 +27225,21 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#260 + # source://rubocop//lib/rubocop/cop/lint/void.rb#255 def all_keys_entirely_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#264 + # source://rubocop//lib/rubocop/cop/lint/void.rb#259 def all_values_entirely_literal?(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#238 + # source://rubocop//lib/rubocop/cop/lint/void.rb#233 def autocorrect_nonmutating_send(corrector, node, suggestion); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#232 + # source://rubocop//lib/rubocop/cop/lint/void.rb#227 def autocorrect_void_expression(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#219 + # source://rubocop//lib/rubocop/cop/lint/void.rb#214 def autocorrect_void_op(corrector, node); end # source://rubocop//lib/rubocop/cop/lint/void.rb#101 @@ -26651,12 +27271,12 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#247 + # source://rubocop//lib/rubocop/cop/lint/void.rb#242 def entirely_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#212 + # source://rubocop//lib/rubocop/cop/lint/void.rb#207 def in_void_context?(node); end end @@ -27171,21 +27791,24 @@ end # # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#50 class RuboCop::Cop::Metrics::CollectionLiteralLength < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#55 + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#60 def on_array(node); end - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#55 + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#60 def on_hash(node); end - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#60 + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#65 def on_index(node); end - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#64 + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#71 def on_send(node); end + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#56 + def set_const?(param0 = T.unsafe(nil)); end + private - # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#70 + # source://rubocop//lib/rubocop/cop/metrics/collection_literal_length.rb#77 def collection_threshold; end end @@ -27535,13 +28158,13 @@ class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator # @return [AbcSizeCalculator] a new instance of AbcSizeCalculator # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#30 + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#37 def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#42 def calculate; end - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#53 + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#60 def calculate_node(node); end # @return [Boolean] @@ -27549,7 +28172,7 @@ class RuboCop::Cop::Metrics::Utils::AbcSizeCalculator # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#65 def else_branch?(node); end - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#47 + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#54 def evaluate_branch_nodes(node); end # source://rubocop//lib/rubocop/cop/metrics/utils/abc_size_calculator.rb#60 @@ -27773,29 +28396,29 @@ module RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount # # @api private # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#30 + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#37 def initialize(node, discount_repeated_attributes: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#61 + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#68 def attribute_call?(param0 = T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#53 + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#60 def calculate_node(node); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#43 + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#50 def discount_repeated_attributes?; end # @api private # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#47 + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#54 def evaluate_branch_nodes(node); end - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#92 + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#99 def root_node?(param0 = T.unsafe(nil)); end private @@ -27803,7 +28426,7 @@ module RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#66 + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#73 def discount_repeated_attribute?(send_node); end # Returns the "known_attributes" for the `node` by walking the receiver tree @@ -27814,7 +28437,7 @@ module RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount # # @api private # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#103 + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#110 def find_attributes(node, &block); end # or `nil` if it is not a setter. @@ -27826,13 +28449,13 @@ module RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount # @api private # - # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#80 + # source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#87 def update_repeated_attribute(node); end end # @api private # -# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#117 +# source://rubocop//lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb#29 RuboCop::Cop::Metrics::Utils::RepeatedAttributeDiscount::VAR_SETTER_TO_GETTER = T.let(T.unsafe(nil), Hash) # Identifies repetitions `&.` on the same variable: @@ -28503,6 +29126,20 @@ RuboCop::Cop::Naming::BinaryOperatorParameterName::OP_LIKE_METHODS = T.let(T.uns # The default variable name is `block`. If the name is already in use, it will not be # autocorrected. # +# [NOTE] +# ==== +# Because of a bug in Ruby 3.3.0, when a block is referenced inside of another block, +# no offense will be registered until Ruby 3.4: +# +# [source,ruby] +# ---- +# def foo(&block) +# # Using an anonymous block would be a syntax error on Ruby 3.3.0 +# block_method { bar(&block) } +# end +# ---- +# ==== +# # @example EnforcedStyle: anonymous (default) # # # bad @@ -28526,82 +29163,73 @@ RuboCop::Cop::Naming::BinaryOperatorParameterName::OP_LIKE_METHODS = T.let(T.uns # bar(&block) # end # -# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#40 +# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#68 def on_def(node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#68 def on_defs(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#114 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#118 def anonymous_block_argument?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#87 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#101 def block_argument_name_matched?(block_pass_node, last_argument); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#146 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#150 def block_forwarding_name; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#77 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#91 def expected_block_forwarding_style?(node, last_argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#118 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#122 def explicit_block_argument?(node); end - # Prevents the following syntax error: - # - # # foo.rb - # def foo(&) - # block_method do - # bar(&) - # end - # end - # - # $ ruby -vc foo.rb - # ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22] - # foo.rb: foo.rb:4: anonymous block parameter is also used within block (SyntaxError) + # Ruby 3.3.0 had a bug where accessing an anonymous block argument inside of a block + # was a syntax error in unambiguous cases: https://bugs.ruby-lang.org/issues/20090 + # We disallow this also for earlier Ruby versions so that code is forwards compatible. # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#106 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#110 def invalidates_syntax?(block_pass_node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#122 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#126 def register_offense(block_argument, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#138 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#142 def use_block_argument_as_local_variable?(node, last_argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#110 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#114 def use_kwarg_in_method_definition?(node); end class << self - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#50 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#64 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#48 +# source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#62 RuboCop::Cop::Naming::BlockForwarding::MSG = T.let(T.unsafe(nil), String) # Checks block parameter names for how descriptive they @@ -29482,20 +30110,16 @@ end # they end with a `?`. These methods should be changed to remove the # prefix. # -# @example NamePrefix: ['is_', 'has_', 'have_'] (default) -# # bad -# def is_even(value) -# end +# When `UseSorbetSigs` set to true (optional), the cop will only report +# offenses if the method has a Sorbet `sig` with a return type of +# `T::Boolean`. Dynamic methods are not supported with this configuration. # -# # When ForbiddenPrefixes: ['is_', 'has_', 'have_'] (default) -# # good -# def even?(value) -# end +# @example MethodDefinitionMacros: ['def_node_matcher'] +# # bad +# def_node_matcher(:is_even) { |value| } # -# # When ForbiddenPrefixes: [] # # good -# def is_even?(value) -# end +# def_node_matcher(:even?) { |value| } # @example NamePrefix: ['seems_to_be_'] # # bad # def seems_to_be_even(value) @@ -29519,59 +30143,102 @@ end # # good # def is_even?(value) # end +# @example UseSorbetSigs: false (default) +# # bad +# sig { returns(String) } +# def is_this_thing_on +# "yes" +# end +# +# # good - Sorbet signature is not evaluated +# sig { returns(String) } +# def is_this_thing_on? +# "yes" +# end +# @example UseSorbetSigs: true +# # bad +# sig { returns(T::Boolean) } +# def odd(value) +# end +# +# # good +# sig { returns(T::Boolean) } +# def odd?(value) +# end # @example MethodDefinitionMacros: ['define_method', 'define_singleton_method'] (default) # # bad # define_method(:is_even) { |value| } # # # good # define_method(:even?) { |value| } -# @example MethodDefinitionMacros: ['def_node_matcher'] +# @example NamePrefix: ['is_', 'has_', 'have_'] (default) # # bad -# def_node_matcher(:is_even) { |value| } +# def is_even(value) +# end +# +# # When ForbiddenPrefixes: ['is_', 'has_', 'have_'] (default) +# # good +# def even?(value) +# end # +# # When ForbiddenPrefixes: [] # # good -# def_node_matcher(:even?) { |value| } +# def is_even?(value) +# end # -# source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#75 +# source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#103 class RuboCop::Cop::Naming::PredicateName < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#79 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#107 def dynamic_method_define(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#126 def on_def(node); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#126 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#85 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#113 def on_send(node); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#112 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#154 + def sorbet_return_type(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#141 def validate_config; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#124 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#164 def allowed_method_name?(method_name, prefix); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#132 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#172 def expected_name(method_name, prefix); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#146 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#186 def forbidden_prefixes; end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#142 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#182 def message(method_name, new_name); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#154 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#198 def method_definition_macros(macro_name); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#150 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#190 def predicate_prefixes; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#158 + def sorbet_sig?(node, return_type: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#194 + def use_sorbet_sigs?; end end # Makes sure that rescued exceptions variables are named as @@ -30510,115 +31177,115 @@ end # Common functionality for checking whether an AST node/token is aligned # with something on a preceding or following line # -# source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#7 +# source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#8 module RuboCop::Cop::PrecedingFollowingAlignment private - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#78 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#79 def aligned_comment_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#101 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#102 def aligned_equals_operator?(range, lineno); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#132 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#133 def aligned_identical?(range, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#89 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#90 def aligned_operator?(range, line, lineno); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#85 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#86 def aligned_token?(range, line, lineno); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#42 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#43 def aligned_with_adjacent_line?(range, predicate); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#60 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#61 def aligned_with_any_line?(line_ranges, range, indent = T.unsafe(nil), &predicate); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#50 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#51 def aligned_with_any_line_range?(line_ranges, range, &predicate); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#124 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#125 def aligned_with_append_operator?(range, token); end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#136 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#137 def aligned_with_equals_sign(token, line_range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#64 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#65 def aligned_with_line?(line_nos, range, indent = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#22 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#23 def aligned_with_operator?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#118 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#119 def aligned_with_preceding_equals?(range, token); end # Allows alignment with a preceding operator that ends with an `=`, # including assignment and comparison operators. # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#28 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#29 def aligned_with_preceding_equals_operator(token); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#18 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#19 def aligned_with_something?(range); end # Allows alignment with a subsequent operator that ends with an `=`, # including assignment and comparison operators. # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#36 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#37 def aligned_with_subsequent_equals_operator(token); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#93 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#94 def aligned_words?(range, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#14 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#15 def allow_for_alignment?; end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#151 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#152 def assignment_lines; end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#155 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#156 def assignment_tokens; end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#171 + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#176 def relevant_assignment_lines(line_range); end - # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#198 - def remove_optarg_equals(asgn_tokens, processed_source); end + # source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#203 + def remove_equals_in_def(asgn_tokens, processed_source); end end # Tokens that end with an `=`, as well as `<<`, that can be aligned together: # `=`, `==`, `===`, `!=`, `<=`, `>=`, `<<` and operator assignment (`+=`, etc). # -# source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#10 +# source://rubocop//lib/rubocop/cop/mixin/preceding_following_alignment.rb#11 RuboCop::Cop::PrecedingFollowingAlignment::ASSIGNMENT_OR_COMPARISON_TOKENS = T.let(T.unsafe(nil), Array) # Common functionality for handling percent literal delimiters. @@ -30679,36 +31346,36 @@ end module RuboCop::Cop::RSpec; end class RuboCop::Cop::RSpec::MultipleExpectations < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_expectations.rb#78 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_expectations.rb#78 def aggregate_failures?(param0 = T.unsafe(nil), param1); end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_expectations.rb#89 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_expectations.rb#89 def aggregate_failures_block?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_expectations.rb#86 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_expectations.rb#86 def expect?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 def max=(value); end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_expectations.rb#93 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_expectations.rb#93 def on_block(node); end private - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_expectations.rb#109 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_expectations.rb#109 def example_with_aggregate_failures?(example_node); end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_expectations.rb#116 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_expectations.rb#116 def find_aggregate_failures(example_node); end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_expectations.rb#121 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_expectations.rb#121 def find_expectation(node, &block); end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_expectations.rb#132 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_expectations.rb#132 def flag_example(node, expectation_count:); end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_expectations.rb#143 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_expectations.rb#143 def max_expectations; end end @@ -30716,30 +31383,30 @@ class RuboCop::Cop::RSpec::MultipleMemoizedHelpers < ::RuboCop::Cop::RSpec::Base # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 def max=(value); end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#91 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#91 def on_block(node); end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#102 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#102 def on_new_investigation; end private - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#111 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#111 def all_helpers(node); end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#141 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#141 def allow_subject?; end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#109 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#109 def example_group_memoized_helpers; end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#116 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#116 def helpers(node); end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#137 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#137 def max; end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#127 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#127 def variable_nodes(node); end end @@ -30747,27 +31414,27 @@ class RuboCop::Cop::RSpec::NestedGroups < ::RuboCop::Cop::RSpec::Base # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 def max=(value); end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/nested_groups.rb#107 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/nested_groups.rb#107 def on_top_level_group(node); end private - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/nested_groups.rb#157 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/nested_groups.rb#157 def allowed_groups; end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/nested_groups.rb#134 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/nested_groups.rb#134 def count_up_nesting?(node, example_group); end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/nested_groups.rb#119 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/nested_groups.rb#119 def find_nested_example_groups(node, nesting: T.unsafe(nil), &block); end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/nested_groups.rb#144 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/nested_groups.rb#144 def max_nesting; end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/nested_groups.rb#148 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/nested_groups.rb#148 def max_nesting_config; end - # source://rubocop-rspec/3.4.0/lib/rubocop/cop/rspec/nested_groups.rb#140 + # source://rubocop-rspec/3.5.0/lib/rubocop/cop/rspec/nested_groups.rb#140 def message(nesting); end end @@ -30786,7 +31453,7 @@ module RuboCop::Cop::RangeHelp # A range containing only the contents of a literal with delimiters (e.g. in # `%i{1 2 3}` this will be the range covering `1 2 3` only). # - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#32 + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#33 def contents_range(node); end # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#99 @@ -30809,7 +31476,7 @@ module RuboCop::Cop::RangeHelp # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#122 def move_pos_str(src, pos, step, condition, needle); end - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#36 + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#37 def range_between(start_pos, end_pos); end # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#72 @@ -30821,22 +31488,22 @@ module RuboCop::Cop::RangeHelp # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#129 def range_with_comments_and_lines(node); end - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#40 + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#41 def range_with_surrounding_comma(range, side = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#55 def range_with_surrounding_space(range_positional = T.unsafe(nil), range: T.unsafe(nil), side: T.unsafe(nil), newlines: T.unsafe(nil), whitespace: T.unsafe(nil), continuations: T.unsafe(nil), buffer: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#11 + # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#12 def source_range(source_buffer, line_number, column, length = T.unsafe(nil)); end end # The Unicode codepoint # -# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#9 +# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#7 RuboCop::Cop::RangeHelp::BYTE_ORDER_MARK = T.let(T.unsafe(nil), Integer) -# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#54 +# source://rubocop//lib/rubocop/cop/mixin/range_help.rb#8 module RuboCop::Cop::RangeHelp::NOT_GIVEN; end # Common functionality for handling Rational literals. @@ -31184,6 +31851,9 @@ class RuboCop::Cop::Security::CompoundHash < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#64 def monuple_hash?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#88 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/security/compound_hash.rb#88 def on_op_asgn(node); end @@ -31601,15 +32271,15 @@ module RuboCop::Cop::StatementModifier private - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#80 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#85 def code_after(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#104 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#109 def comment_disables_cop?(comment); end - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#72 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#77 def first_line_comment(node); end # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#57 @@ -31618,10 +32288,10 @@ module RuboCop::Cop::StatementModifier # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#43 def length_in_modifier_form(node); end - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#98 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#103 def max_line_length; end - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#66 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#71 def method_source(if_body); end # @return [Boolean] @@ -31646,7 +32316,12 @@ module RuboCop::Cop::StatementModifier # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#86 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#65 + def omitted_value_in_last_hash_arg?(if_body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#91 def parenthesize?(node); end # @return [Boolean] @@ -31842,111 +32517,108 @@ class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#169 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#167 def access_modifier_with_alias_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#163 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#161 def access_modifier_with_attr?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#156 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#154 def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#174 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#172 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#249 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#247 def access_modifier_is_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#253 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#251 def access_modifier_is_not_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#224 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#222 def allow_modifiers_on_alias_method?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#220 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#218 def allow_modifiers_on_attrs?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#216 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#214 def allow_modifiers_on_symbols?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#189 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#187 def allowed?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#197 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#195 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#234 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#232 def correctable_group_offense?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#336 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#334 def def_source(node, def_nodes); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#296 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#294 def find_argument_less_modifier_node(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#277 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#275 def find_corresponding_def_nodes(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#241 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#239 def group_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#245 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#243 def inline_style?; end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#326 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#324 def insert_inline_modifier(corrector, node, modifier_name); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#267 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#265 def message(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#228 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#226 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#212 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#210 def percent_symbol_array?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#330 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#328 def remove_nodes(corrector, *nodes); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#310 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#308 def replace_defs(corrector, node, def_nodes); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#257 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#255 def right_siblings_same_inline_method?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#304 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#302 def select_grouped_def_nodes(node); end end -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#153 -RuboCop::Cop::Style::AccessModifierDeclarations::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#141 RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) @@ -32346,6 +33018,20 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # # This cop handles not only method forwarding but also forwarding to `super`. # +# [NOTE] +# ==== +# Because of a bug in Ruby 3.3.0, when a block is referenced inside of another block, +# no offense will be registered until Ruby 3.4: +# +# [source,ruby] +# ---- +# def foo(&block) +# # Using an anonymous block would be a syntax error on Ruby 3.3.0 +# block_method { bar(&block) } +# end +# ---- +# ==== +# # @example RedundantBlockArgumentNames: ['blk', 'block', 'proc'] (default) # # bad - But it is good with `EnforcedStyle: explicit` set for `Naming/BlockForwarding`. # def foo(&block) @@ -32433,245 +33119,253 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # bar(...) # end # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#127 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#141 class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#146 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#160 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#146 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#160 def on_defs(node); end private - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#188 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#202 def add_forward_all_offenses(node, send_classifications, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#366 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#385 def add_parens_if_missing(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#215 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#227 def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end + # Checks if forwarding is uses both in blocks and outside of blocks. + # On Ruby 3.3.0, anonymous block forwarding in blocks can be is a syntax + # error, so we only want to register an offense if we can change all occurrences. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#309 + def all_forwarding_offenses_correctable?(send_classifications); end + + # Ruby 3.3.0 had a bug where accessing an anonymous block argument inside of a block + # was a syntax error in unambiguous cases: https://bugs.ruby-lang.org/issues/20090 + # We disallow this also for earlier Ruby versions so that code is forwards compatible. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#320 + def allow_anonymous_forwarding_in_block?(node); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#352 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#377 def allow_only_rest_arguments?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#340 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#365 def arguments_range(node, first_node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#267 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#277 def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#252 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#262 def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#542 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#561 def explicit_block_name?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#170 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#184 def extract_forwardable_args(args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#242 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#252 def non_splat_or_block_pass_lvar_references(body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#182 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#196 def only_forwards_all?(send_classifications); end - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#296 - def outside_block?(node); end - - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#174 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#188 def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#286 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#296 def redundant_named_arg(arg, config_name, keyword); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#329 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#354 def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#302 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#327 def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#318 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#343 def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#310 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#335 def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#360 - def send_inside_block?(send_classifications); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#356 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#381 def use_anonymous_forwarding?; end class << self - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#142 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#156 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#135 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#149 RuboCop::Cop::Style::ArgumentsForwarding::ADDITIONAL_ARG_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#138 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#152 RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#140 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#154 RuboCop::Cop::Style::ArgumentsForwarding::BLOCK_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#134 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#148 RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#137 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#151 RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#139 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#153 RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), String) # Classifies send nodes for possible rest/kwrest/all (including block) forwarding. # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#374 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#393 class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier extend ::RuboCop::AST::NodePattern::Macros # @return [SendNodeClassifier] a new instance of SendNodeClassifier # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#403 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#422 def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#431 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#450 def classification; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#387 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#406 def def_all_anonymous_args?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#381 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#400 def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#425 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#444 def forwarded_block_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#384 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#403 def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#419 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#438 def forwarded_kwrest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#413 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#432 def forwarded_rest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#378 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#397 def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#396 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#415 def send_all_anonymous_args?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#513 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#532 def additional_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#509 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#528 def additional_kwargs_or_forwarded_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#523 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#542 def allow_offense_for_no_block?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#494 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#513 def any_arg_referenced?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#478 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#497 def arguments; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#446 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#465 def can_forward_all?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#517 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#536 def forward_additional_kwargs?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#474 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#493 def forwarded_rest_and_kwrest_args; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#536 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#555 def missing_rest_arg_or_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#527 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#546 def no_additional_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#502 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#521 def no_post_splat_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#470 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#489 def offensive_block_forwarding?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#490 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#509 def referenced_block_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#486 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#505 def referenced_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#482 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#501 def referenced_rest_arg?; end # def foo(a = 41, ...) is a syntax error in 3.0. # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#458 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#477 def ruby_30_or_lower_optarg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#462 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#481 def ruby_32_only_anonymous_forwarding?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#466 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#485 def ruby_32_or_higher_missing_rest_or_kwest?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#498 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#517 def target_ruby_version; end end @@ -32733,6 +33427,9 @@ RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::ArrayFirstLast < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#35 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#35 def on_send(node); end @@ -32740,11 +33437,17 @@ class RuboCop::Cop::Style::ArrayFirstLast < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#58 + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#74 def brace_method?(node); end - # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#53 + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#61 + def find_offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#69 def innermost_braces_node(node); end + + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#56 + def preferred_value(node, value); end end # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#31 @@ -33464,10 +34167,13 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#199 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#200 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#199 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#183 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#200 def on_numblock(node); end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#183 @@ -33477,89 +34183,84 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#496 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#483 def array_or_range?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#213 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#214 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#500 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#487 def begin_required?(block_node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#241 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#242 def braces_for_chaining_message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#437 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#428 def braces_for_chaining_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#253 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#254 def braces_required_message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#414 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#405 def braces_required_method?(method_name); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#418 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#409 def braces_required_methods; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#447 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#438 def braces_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#492 - def conditional?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#451 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#442 def correction_would_break_code?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#329 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#330 def end_of_chain(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#461 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#452 def functional_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#457 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#448 def functional_method?(method_name); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#347 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#348 def get_blocks(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#422 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#413 def line_count_based_block_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#223 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#224 def line_count_based_message(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#257 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#258 def message(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#305 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#306 def move_comment_before_block(corrector, comment, block_node, closing_brace); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#469 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#460 def procedural_method?(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#465 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#456 def procedural_oneliners_may_have_braces?; end # @return [Boolean] @@ -33567,74 +34268,69 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#373 def proper_block_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#336 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#337 def remove_trailing_whitespace(corrector, range, comment); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#268 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#269 def replace_braces_with_do_end(corrector, loc); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#284 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#285 def replace_do_end_with_braces(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#386 - def require_braces?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#394 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#385 def require_do_end?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#485 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#476 def return_value_of_scope?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#473 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#464 def return_value_used?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#426 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#417 def semantic_block_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#231 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#232 def semantic_message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#506 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#493 def single_argument_operator_method?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#319 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#320 def source_range_before_comment(range, comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#401 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#392 def special_method?(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#407 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#398 def special_method_proper_block_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#301 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#302 def whitespace_after?(range, length = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#297 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#298 def whitespace_before?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#342 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#343 def with_block?(node); end class << self @@ -33651,27 +34347,27 @@ RuboCop::Cop::Style::BlockDelimiters::BRACES_REQUIRED_MESSAGE = T.let(T.unsafe(n # Corrector to correct conditional assignment in `case` statements. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#602 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#604 class RuboCop::Cop::Style::CaseCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#607 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#609 def correct(corrector, cop, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#617 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#619 def move_assignment_inside_condition(corrector, node); end private - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#637 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#639 def extract_branches(case_node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#631 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#633 def extract_tail_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#647 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#649 def move_branch_inside_condition(corrector, branch, condition, assignment, column); end end end @@ -34457,10 +35153,13 @@ class RuboCop::Cop::Style::CollectionMethods < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49 def on_block(node); end + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#54 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#49 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#55 + # source://rubocop//lib/rubocop/cop/style/collection_methods.rb#54 def on_send(node); end private @@ -35479,22 +36178,22 @@ RuboCop::Cop::Style::ConditionalAssignmentHelper::KEYWORD = T.let(T.unsafe(nil), # # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#438 module RuboCop::Cop::Style::ConditionalCorrectorHelper - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#459 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#461 def assignment(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#488 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#490 def correct_branches(corrector, branches); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#465 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#467 def correct_if_branches(corrector, cop, node); end # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#439 def remove_whitespace_in_branches(corrector, branch, condition, column); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#475 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#477 def replace_branch_assignment(corrector, branch); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#452 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#454 def white_space_range(node, column); end end @@ -36499,7 +37198,7 @@ RuboCop::Cop::Style::DoubleNegation::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Style::DoubleNegation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for loops which iterate a constant number of times, -# using a Range literal and `#each`. This can be done more readably using +# using a `Range` literal and `#each`. This can be done more readably using # `Integer#times`. # # This check only applies if the block takes no parameters. @@ -36582,34 +37281,34 @@ class RuboCop::Cop::Style::EachWithObject < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#102 + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#101 def accumulator_param_assigned_to?(body, args); end # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#69 def autocorrect_block(corrector, node, return_value); end - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#84 + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#83 def autocorrect_numblock(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#121 + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#120 def first_argument_returned?(args, return_value); end - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#114 + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#113 def return_value(body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#129 + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#128 def return_value_occupies_whole_line?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#96 + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#95 def simple_method_arg?(method_arg); end - # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#133 + # source://rubocop//lib/rubocop/cop/style/each_with_object.rb#132 def whole_line_expression(node); end end @@ -37500,7 +38199,7 @@ RuboCop::Cop::Style::EvenOdd::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/even_odd.rb#22 RuboCop::Cop::Style::EvenOdd::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Checks for exact regexp match inside Regexp literals. +# Checks for exact regexp match inside `Regexp` literals. # # @example # @@ -37703,9 +38402,12 @@ class RuboCop::Cop::Style::ExplicitBlockArgument < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#108 def add_block_argument(node, corrector, block_name); end - # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#147 + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#160 def block_body_range(block_node, send_node); end + # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#153 + def build_new_arguments_for_zsuper(node); end + # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/explicit_block_argument.rb#125 @@ -37828,7 +38530,7 @@ RuboCop::Cop::Style::ExponentialNotation::MESSAGES = T.let(T.unsafe(nil), Hash) # Suggests `ENV.fetch` for the replacement of `ENV[]`. # `ENV[]` silently fails and returns `nil` when the environment variable is unset, # which may cause unexpected behaviors when the developer forgets to set it. -# On the other hand, `ENV.fetch` raises KeyError or returns the explicitly +# On the other hand, `ENV.fetch` raises `KeyError` or returns the explicitly # specified default value. # # @example @@ -39220,7 +39922,7 @@ RuboCop::Cop::Style::HashConversion::MSG_TO_H = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/hash_conversion.rb#51 RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Checks for uses of `each_key` and `each_value` Hash methods. +# Checks for uses of `each_key` and `each_value` `Hash` methods. # # NOTE: If you have an array of two-element arrays, you can put # parentheses around the block arguments to indicate that you're not @@ -39277,19 +39979,19 @@ class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#186 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#183 def check_argument(variable); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#210 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#207 def correct_args(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#196 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#193 def correct_implicit(node, corrector, method_name); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#201 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#198 def correct_key_value_each(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#182 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#179 def format_message(method_name, current); end # @return [Boolean] @@ -39297,7 +39999,7 @@ class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#108 def handleable?(node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#217 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#214 def kv_range(outer_node); end # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#139 @@ -39312,7 +40014,7 @@ class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#152 def register_kv_with_block_pass_offense(node, target, method); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#173 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#170 def root_receiver(node); end # @return [Boolean] @@ -39327,7 +40029,7 @@ class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#192 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#189 def used?(arg); end end @@ -39365,6 +40067,19 @@ RuboCop::Cop::Style::HashEachMethods::UNUSED_BLOCK_ARG_MSG = T.let(T.unsafe(nil) # {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[bar].include?(k) } # {foo: 1, bar: 2, baz: 3}.filter {|k, v| !%i[bar].include?(k) } # +# # good +# {foo: 1, bar: 2, baz: 3}.except(:bar) +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# +# # good +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| !%i[bar].exclude?(k) } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| %i[bar].exclude?(k) } +# +# # good +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k.in?(%i[bar]) } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| !k.in?(%i[bar]) } +# @example AllCops:ActiveSupportExtensionsEnabled: true +# # # bad # {foo: 1, bar: 2, baz: 3}.reject {|k, v| !%i[bar].exclude?(k) } # {foo: 1, bar: 2, baz: 3}.select {|k, v| %i[bar].exclude?(k) } @@ -39376,81 +40091,24 @@ RuboCop::Cop::Style::HashEachMethods::UNUSED_BLOCK_ARG_MSG = T.let(T.unsafe(nil) # # good # {foo: 1, bar: 2, baz: 3}.except(:bar) # -# source://rubocop//lib/rubocop/cop/style/hash_except.rb#46 +# source://rubocop//lib/rubocop/cop/style/hash_except.rb#61 class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::HashSubset extend ::RuboCop::Cop::TargetRubyVersion extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#60 - def block_with_first_arg_check?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#75 - def on_csend(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#75 - def on_send(node); end - private - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#169 - def decorate_source(value); end - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#177 - def except_key(node); end - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#156 - def except_key_source(key); end - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#148 - def extract_body_if_negated(body); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#93 - def extracts_hash_subset?(block); end + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#74 + def preferred_method_name; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#126 - def included?(body, negated); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#134 - def not_included?(body, negated); end - - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#185 - def offense_range(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#138 - def safe_to_register_offense?(block, except_key); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#116 - def semantically_except_method?(node, block); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#108 - def supported_subset_method?(method); end + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#70 + def semantically_subset_method?(node); end end -# source://rubocop//lib/rubocop/cop/style/hash_except.rb#57 -RuboCop::Cop::Style::HashExcept::ACTIVE_SUPPORT_SUBSET_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/hash_except.rb#53 -RuboCop::Cop::Style::HashExcept::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/style/hash_except.rb#54 -RuboCop::Cop::Style::HashExcept::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop//lib/rubocop/cop/style/hash_except.rb#56 -RuboCop::Cop::Style::HashExcept::SUBSET_METHODS = T.let(T.unsafe(nil), Array) - # Checks for places where `case-when` represents a simple 1:1 # mapping and can be replaced with a hash lookup. # @@ -39504,6 +40162,73 @@ end # source://rubocop//lib/rubocop/cop/style/hash_like_case.rb#42 RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) +# Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods +# that can be replaced with `Hash#slice` method. +# +# This cop should only be enabled on Ruby version 2.5 or higher. +# (`Hash#slice` was added in Ruby 2.5.) +# +# For safe detection, it is limited to commonly used string and symbol comparisons +# when using `==` or `!=`. +# +# This cop doesn't check for `Hash#delete_if` and `Hash#keep_if` because they +# modify the receiver. +# +# @example +# +# # bad +# {foo: 1, bar: 2, baz: 3}.select {|k, v| k == :bar } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| k != :bar } +# {foo: 1, bar: 2, baz: 3}.filter {|k, v| k == :bar } +# {foo: 1, bar: 2, baz: 3}.select {|k, v| k.eql?(:bar) } +# +# # bad +# {foo: 1, bar: 2, baz: 3}.select {|k, v| %i[bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| !%i[bar].include?(k) } +# {foo: 1, bar: 2, baz: 3}.filter {|k, v| %i[bar].include?(k) } +# +# # good +# {foo: 1, bar: 2, baz: 3}.slice(:bar) +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# +# # good +# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[bar].exclude?(k) } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[bar].exclude?(k) } +# +# # good +# {foo: 1, bar: 2, baz: 3}.select {|k, v| k.in?(%i[bar]) } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| !k.in?(%i[bar]) } +# @example AllCops:ActiveSupportExtensionsEnabled: true +# +# # bad +# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[bar].exclude?(k) } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| %i[bar].exclude?(k) } +# +# # bad +# {foo: 1, bar: 2, baz: 3}.select {|k, v| k.in?(%i[bar]) } +# {foo: 1, bar: 2, baz: 3}.reject {|k, v| !k.in?(%i[bar]) } +# +# # good +# {foo: 1, bar: 2, baz: 3}.slice(:bar) +# +# source://rubocop//lib/rubocop/cop/style/hash_slice.rb#61 +class RuboCop::Cop::Style::HashSlice < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::HashSubset + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::AutoCorrector + + private + + # source://rubocop//lib/rubocop/cop/style/hash_slice.rb#74 + def preferred_method_name; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_slice.rb#70 + def semantically_subset_method?(node); end +end + # Checks hash literal syntax. # # It can enforce either the use of the class hash rocket syntax or @@ -39905,6 +40630,12 @@ class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#193 def check_expressions(node, expressions, insert_position); end + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#218 + def correct_assignment(corrector, node, expression, insert_position); end + + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#228 + def correct_no_assignment(corrector, node, expression, insert_position); end + # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#173 @@ -39913,26 +40644,26 @@ class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base # `elsif` branches show up in the if node as nested `else` branches. We # need to recursively iterate over all `else` branches. # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#233 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#252 def expand_elses(branch); end - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#248 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#267 def head(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#217 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#236 def last_child_of_parent?(node); end - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#227 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#246 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#223 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#242 def single_child_branch?(branch_node); end - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#244 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#263 def tail(node); end end @@ -39941,24 +40672,24 @@ RuboCop::Cop::Style::IdenticalConditionalBranches::MSG = T.let(T.unsafe(nil), St # Corrector to correct conditional assignment in `if` statements. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#557 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#559 class RuboCop::Cop::Style::IfCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#562 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#564 def correct(corrector, cop, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#566 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#568 def move_assignment_inside_condition(corrector, node); end private - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#580 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#582 def extract_tail_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#587 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#589 def move_branch_inside_condition(corrector, branch, condition, assignment, column); end end end @@ -41423,10 +42154,10 @@ class RuboCop::Cop::Style::MagicCommentFormat::CommentRange # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#125 def directives; end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def loc(*_arg0, **_arg1, &_arg2); end - # source://rubocop-ast/1.37.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + # source://rubocop-ast/1.38.0/lib/rubocop/ast/utilities/simple_forwardable.rb#9 def text(*_arg0, **_arg1, &_arg2); end # A magic comment can contain one value (normal style) or @@ -41749,12 +42480,15 @@ class RuboCop::Cop::Style::MapToSet < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#34 def map_to_set?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#41 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#41 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#55 + # source://rubocop//lib/rubocop/cop/style/map_to_set.rb#56 def autocorrect(corrector, to_set, map); end end @@ -42005,12 +42739,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#194 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#191 def allowed_chained_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#190 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#187 def allowed_multiline_call_with_parentheses?(node); end # @return [Boolean] @@ -42020,22 +42754,22 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#203 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#200 def ambiguous_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#183 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#180 def ambiguous_range_argument?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#232 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#229 def assigned_before?(node, target); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#240 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#237 def assignment_in_condition?(node); end # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#34 @@ -42043,12 +42777,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#164 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#162 def call_as_argument_or_chain?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#157 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#155 def call_in_argument_with_block?(node); end # @return [Boolean] @@ -42058,47 +42792,47 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#121 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#119 def call_in_logical_operators?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#170 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#167 def call_in_match_pattern?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#130 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#128 def call_in_optional_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#134 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#132 def call_in_single_line_inheritance?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#139 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#137 def call_with_ambiguous_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#153 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#151 def call_with_braced_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#250 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#247 def forwards_anonymous_rest_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#219 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#216 def hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#176 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#173 def hash_literal_in_arguments?(node); end # @return [Boolean] @@ -42108,7 +42842,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#236 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#233 def inside_string_interpolation?(node); end # Require hash value omission be enclosed in parentheses to prevent the following issue: @@ -42126,7 +42860,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#215 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#212 def logical_operator?(node); end # @return [Boolean] @@ -42147,7 +42881,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#223 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#220 def regexp_slash_literal?(node); end # @return [Boolean] @@ -42157,7 +42891,7 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#207 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#204 def splat?(node); end # @return [Boolean] @@ -42172,12 +42906,12 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#211 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#208 def ternary_if?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#227 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#224 def unary_literal?(node); end end @@ -42245,6 +42979,9 @@ class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses < ::RuboCop::Cop::Ba include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#37 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#37 def on_send(node); end @@ -42252,25 +42989,25 @@ class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses < ::RuboCop::Cop::Ba # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#66 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#67 def allowed_method_name?(name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#96 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#97 def any_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#62 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#63 def default_argument?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#58 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#59 def ineligible_node?(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#113 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#114 def offense_range(node); end # Respects `Lint/ItWithoutArgumentsInBlock` cop and the following Ruby 3.3's warning: @@ -42281,20 +43018,20 @@ class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses < ::RuboCop::Cop::Ba # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#88 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#89 def parenthesized_it_method_in_block?(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#51 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#52 def register_offense(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#70 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#71 def same_name_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#109 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#110 def variable_in_mass_assignment?(variable_name, node); end end @@ -43564,7 +44301,7 @@ RuboCop::Cop::Style::MultipleComparison::MSG = T.let(T.unsafe(nil), String) # acceptable value other than none, it will suppress the offenses # raised by this cop. It enforces frozen state. # -# NOTE: Regexp and Range literals are frozen objects since Ruby 3.0. +# NOTE: `Regexp` and `Range` literals are frozen objects since Ruby 3.0. # # NOTE: From Ruby 3.0, interpolated strings are not frozen when # `# frozen-string-literal: true` is used, so this cop enforces explicit @@ -43624,7 +44361,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet/0.8.7/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 + # source://rubocop-sorbet/0.8.9/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 def on_assignment(value); end # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#127 @@ -43642,7 +44379,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#216 def splat_value(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet/0.8.7/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 + # source://rubocop-sorbet/0.8.9/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 def t_let(param0 = T.unsafe(nil)); end private @@ -45162,7 +45899,7 @@ end # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#58 RuboCop::Cop::Style::OneLineConditional::MSG = T.let(T.unsafe(nil), String) -# Flags uses of OpenStruct, as it is now officially discouraged +# Flags uses of `OpenStruct`, as it is now officially discouraged # to be used for performance, version compatibility, and potential security issues. # # @example @@ -45463,7 +46200,7 @@ class RuboCop::Cop::Style::ParallelAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::RescueNode extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#119 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#115 def implicit_self_getter?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#31 @@ -45475,7 +46212,7 @@ class RuboCop::Cop::Style::ParallelAssignment < ::RuboCop::Cop::Base # This makes the sorting algorithm work for expressions such as # `self.a, self.b = b, a`. # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#112 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#108 def add_self_to_getters(right_elements); end # @return [Boolean] @@ -45493,37 +46230,32 @@ class RuboCop::Cop::Style::ParallelAssignment < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#67 def allowed_rhs?(node); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#79 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#75 def assignment_corrector(node, rhs, order); end # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#48 def autocorrect(corrector, node, rhs); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#95 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#91 def find_valid_order(left_elements, right_elements); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#178 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#174 def modifier_statement?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#75 - def return_of_method_call?(node); end end # Helper class necessitated by silly design of TSort prior to Ruby 2.1 # Newer versions have a better API, but that doesn't help us # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#123 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#119 class RuboCop::Cop::Style::ParallelAssignment::AssignmentSorter include ::TSort extend ::RuboCop::AST::NodePattern::Macros # @return [AssignmentSorter] a new instance of AssignmentSorter # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#136 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#132 def initialize(assignments); end # `lhs` is an assignment method call like `obj.attr=` or `ary[idx]=`. @@ -45531,81 +46263,81 @@ class RuboCop::Cop::Style::ParallelAssignment::AssignmentSorter # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#165 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#161 def accesses?(rhs, lhs); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#158 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#154 def dependency?(lhs, rhs); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#134 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#130 def matching_calls(param0, param1, param2); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#144 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#140 def tsort_each_child(assignment); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#140 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#136 def tsort_each_node(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#131 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#127 def uses_var?(param0, param1); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#128 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#124 def var_name(param0 = T.unsafe(nil)); end end # An internal class for correcting parallel assignment # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#185 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#181 class RuboCop::Cop::Style::ParallelAssignment::GenericCorrector include ::RuboCop::Cop::Alignment # @return [GenericCorrector] a new instance of GenericCorrector # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#190 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#186 def initialize(node, rhs, modifier, config, new_elements); end # Returns the value of attribute config. # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#188 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#184 def config; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#198 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#194 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#202 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#198 def correction_range; end # Returns the value of attribute node. # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#188 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#184 def node; end # Returns the value of attribute rescue_result. # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#188 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#184 def rescue_result; end # Returns the value of attribute rhs. # - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#188 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#184 def rhs; end protected - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#208 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#204 def assignment; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#229 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#225 def cop_config; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#225 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#221 def extract_sources(node); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#214 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#210 def source(node, loc); end end @@ -45615,37 +46347,37 @@ RuboCop::Cop::Style::ParallelAssignment::MSG = T.let(T.unsafe(nil), String) # An internal class for correcting parallel assignment # guarded by if, unless, while, or until # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#271 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#267 class RuboCop::Cop::Style::ParallelAssignment::ModifierCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#272 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#268 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#281 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#277 def correction_range; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#287 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#283 def modifier_range(node); end end # An internal class for correcting parallel assignment # protected by rescue # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#236 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#232 class RuboCop::Cop::Style::ParallelAssignment::RescueCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#237 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#233 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#248 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#244 def correction_range; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#259 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#255 def begin_correction(rescue_result); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#254 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#250 def def_correction(rescue_result); end end @@ -46036,10 +46768,10 @@ RuboCop::Cop::Style::PreferredHashMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil class RuboCop::Cop::Style::Proc < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/proc.rb#25 + # source://rubocop//lib/rubocop/cop/style/proc.rb#24 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/proc.rb#25 + # source://rubocop//lib/rubocop/cop/style/proc.rb#24 def on_numblock(node); end # source://rubocop//lib/rubocop/cop/style/proc.rb#22 @@ -46138,7 +46870,7 @@ RuboCop::Cop::Style::QuotedSymbols::MSG_SINGLE = T.let(T.unsafe(nil), String) # passed multiple arguments. # # The exploded style has an `AllowedCompactTypes` configuration -# option that takes an Array of exception name Strings. +# option that takes an `Array` of exception name Strings. # # @example EnforcedStyle: exploded (default) # # bad @@ -47042,15 +47774,12 @@ class RuboCop::Cop::Style::RedundantDoubleSplatHashBraces < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#85 def closing_brace(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#111 - def convert_to_new_arguments(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#107 - def extract_send_methods(kwsplat); end + def convert_to_new_arguments(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#123 + # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#119 def mergeable?(node); end # source://rubocop//lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb#81 @@ -47133,7 +47862,7 @@ RuboCop::Cop::Style::RedundantEach::MSG_WITH_OBJECT = T.let(T.unsafe(nil), Strin # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#41 RuboCop::Cop::Style::RedundantEach::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Checks for RuntimeError as the argument of raise/fail. +# Checks for `RuntimeError` as the argument of `raise`/`fail`. # # @example # # bad @@ -47398,9 +48127,126 @@ RuboCop::Cop::Style::RedundantFilterChain::REPLACEMENT_METHODS = T.let(T.unsafe( # source://rubocop//lib/rubocop/cop/style/redundant_filter_chain.rb#59 RuboCop::Cop::Style::RedundantFilterChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Checks for calls to `Kernel#format` or `Kernel#sprintf` that are redundant. +# +# Calling `format` with only a single string argument is redundant, as it can be +# replaced by the string itself. +# +# Also looks for `format` calls where the arguments are literals that can be +# inlined into a string easily. This applies to the `%s`, `%d`, `%i`, `%u`, and +# `%f` format specifiers. +# +# @example +# +# # bad +# format('the quick brown fox jumps over the lazy dog.') +# sprintf('the quick brown fox jumps over the lazy dog.') +# +# # good +# 'the quick brown fox jumps over the lazy dog.' +# +# # bad +# format('%s %s', 'foo', 'bar') +# sprintf('%s %s', 'foo', 'bar') +# +# # good +# 'foo bar' +# +# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#47 +class RuboCop::Cop::Style::RedundantFormat < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#66 + def complex_number?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#71 + def find_hash_value_node(param0, param1); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#56 + def format_without_additional_args?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#75 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#61 + def rational_number?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#113 + def all_fields_literal?(string, arguments); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#200 + def argument_value(argument); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#196 + def argument_values(arguments); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#232 + def complex_value(complex_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#92 + def detect_unnecessary_fields(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#218 + def dsym_value(dsym_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#131 + def find_argument(sequence, arguments, hash); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#172 + def float?(argument); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#222 + def hash_value(hash_node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#168 + def integer?(argument); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#144 + def matching_argument?(sequence, argument); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#88 + def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#162 + def numeric?(argument); end + + # Add correct quotes to the formatted string, preferring retaining the existing + # quotes if possible. + # + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#178 + def quote(string, node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#228 + def rational_value(rational_node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_format.rb#104 + def register_all_fields_literal(node, string, arguments); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#53 +RuboCop::Cop::Style::RedundantFormat::ACCEPTABLE_LITERAL_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#50 +RuboCop::Cop::Style::RedundantFormat::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_format.rb#52 +RuboCop::Cop::Style::RedundantFormat::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + # Check for uses of `Object#freeze` on immutable objects. # -# NOTE: Regexp and Range literals are frozen objects since Ruby 3.0. +# NOTE: `Regexp` and `Range` literals are frozen objects since Ruby 3.0. # # NOTE: From Ruby 3.0, this cop allows explicit freezing of interpolated # string literals when `# frozen-string-literal: true` is used. @@ -47796,50 +48642,55 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base include ::RuboCop::Cop::MatchRange extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#81 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#86 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#205 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#221 def argument_is_method?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#169 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#185 def argument_newline?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#106 - def ends_with_backslash_without_comment?(source_line); end + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#163 + def code_ends_with_continuation?(last_line); end - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#185 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#111 + def ends_with_uncommented_backslash?(range); end + + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#201 def find_node_for_line(last_line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#153 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#169 def inside_string_literal?(range, token); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#114 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#124 def inside_string_literal_or_method_with_argument?(range); end - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#141 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#151 def inspect_end_of_ruby_code_line_continuation; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#135 def leading_dot_method_chain_with_blank_line?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#212 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#228 def method_call_with_arguments?(node); end # A method call without parentheses such as the following cannot remove `\`: @@ -47849,44 +48700,47 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#161 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#177 def method_with_argument?(line_range, current_token, next_token); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#131 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#141 def redundant_line_continuation?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#98 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#103 def require_line_continuation?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#191 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#207 def same_line?(node, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#216 - def start_with_arithmetic_operator?(source_line); end + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#232 + def start_with_arithmetic_operator?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#110 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#120 def string_concatenation?(source_line); end end # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#74 RuboCop::Cop::Style::RedundantLineContinuation::ALLOWED_STRING_TOKENS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#79 +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#81 RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TAKING_FLOW_TOKEN_TYPES = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#75 RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#84 +RuboCop::Cop::Style::RedundantLineContinuation::ARITHMETIC_OPERATOR_TOKENS = T.let(T.unsafe(nil), Array) + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#72 RuboCop::Cop::Style::RedundantLineContinuation::LINE_CONTINUATION = T.let(T.unsafe(nil), String) @@ -47911,28 +48765,28 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base include ::RuboCop::Cop::Parentheses extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#32 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#34 def allowed_pin_operator?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#258 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#275 def first_send_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#263 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#280 def first_super_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#268 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#285 def first_yield_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#166 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#177 def interpolation?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#26 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#28 def method_node_and_args(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#34 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#36 def on_begin(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#29 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#31 def rescue?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#23 @@ -47942,131 +48796,136 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#168 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#179 def allow_in_multiline_conditions?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#64 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#70 def allowed_ancestor?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#57 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#63 def allowed_expression?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#69 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#75 def allowed_multiple_expression?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#78 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#84 def allowed_ternary?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#272 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#289 def call_chain_starts_with_int?(begin_node, send_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#127 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#133 def check(begin_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#172 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#183 def check_send(begin_node, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#182 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#193 def check_unary(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#206 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#217 def disallowed_literal?(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#278 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#295 def do_end_block_in_method_chain?(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#105 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#111 def empty_parentheses?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#138 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#146 def find_offense_message(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#110 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#116 def first_arg_begins_with_hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#247 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#264 def first_argument?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#50 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#56 def ignore_syntax?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#202 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#213 def keyword_ancestor?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#221 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#238 def keyword_with_redundant_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#91 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#97 def like_method_argument_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#234 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#251 def method_call_with_redundant_parentheses?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#119 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#125 def method_chain_begins_with_hash_literal(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#98 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#104 def multiline_control_flow_statements?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#192 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#203 def offense(node, msg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#243 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#260 def only_begin_arg?(args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#42 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#48 def parens_allowed?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#210 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#227 def raised_to_power_negative_numeric?(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#198 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#209 def suspect_unary?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#84 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#90 def ternary_parentheses_required?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#44 + def variable?(node); end end # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#20 @@ -48229,7 +49088,7 @@ RuboCop::Cop::Style::RedundantRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe( # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#44 RuboCop::Cop::Style::RedundantRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) -# Checks for unnecessary single-element Regexp character classes. +# Checks for unnecessary single-element `Regexp` character classes. # # @example # @@ -48340,7 +49199,7 @@ RuboCop::Cop::Style::RedundantRegexpConstructor::MSG = T.let(T.unsafe(nil), Stri # source://rubocop//lib/rubocop/cop/style/redundant_regexp_constructor.rb#24 RuboCop::Cop::Style::RedundantRegexpConstructor::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Checks for redundant escapes inside Regexp literals. +# Checks for redundant escapes inside `Regexp` literals. # # @example # # bad @@ -48713,65 +49572,58 @@ RuboCop::Cop::Style::RedundantSelf::MSG = T.let(T.unsafe(nil), String) # args += foo # hash.merge!(other) # -# # bad -# self.foo = foo.concat(ary) -# # # good # foo.concat(ary) -# self.foo += ary # -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#31 +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#27 class RuboCop::Cop::Style::RedundantSelfAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#71 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#77 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#53 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#59 def on_cvasgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#53 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#59 def on_gvasgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#53 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#59 def on_ivasgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#53 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#59 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#71 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#77 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#99 - def redundant_nonself_assignment?(param0 = T.unsafe(nil), param1, param2); end - - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#89 - def redundant_self_assignment?(param0 = T.unsafe(nil), param1); end + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#49 + def redundant_self_assignment?(param0 = T.unsafe(nil), param1, param2); end private - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#115 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#100 def correction_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#84 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#90 def method_returning_self?(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#108 + # source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#94 def redundant_assignment?(node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#45 +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#41 RuboCop::Cop::Style::RedundantSelfAssignment::ASSIGNMENT_TYPE_TO_RECEIVER_TYPE = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#38 +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#34 RuboCop::Cop::Style::RedundantSelfAssignment::METHODS_RETURNING_SELF = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#35 +# source://rubocop//lib/rubocop/cop/style/redundant_self_assignment.rb#31 RuboCop::Cop::Style::RedundantSelfAssignment::MSG = T.let(T.unsafe(nil), String) # Checks for places where conditional branch makes redundant self-assignment. @@ -50615,7 +51467,7 @@ RuboCop::Cop::Style::SingleArgumentDig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # parameters. # # Configuration option: Methods -# Should be set to use this cop. Array of hashes, where each key is the +# Should be set to use this cop. `Array` of hashes, where each key is the # method name and value - array of argument names. # # @example Methods: [{reduce: %w[a b]}] @@ -51702,7 +52554,7 @@ class RuboCop::Cop::Style::StringLiteralsInInterpolation < ::RuboCop::Cop::Base end # Enforces the use of consistent method names -# from the String class. +# from the `String` class. # # @example # # bad @@ -52315,38 +53167,38 @@ RuboCop::Cop::Style::SymbolProc::SUPER_TYPES = T.let(T.unsafe(nil), Array) # Corrector to correct conditional assignment in ternary conditions. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#497 +# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#499 class RuboCop::Cop::Style::TernaryCorrector extend ::RuboCop::Cop::Style::ConditionalAssignmentHelper extend ::RuboCop::Cop::Style::ConditionalCorrectorHelper class << self - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#502 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#504 def correct(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#506 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#508 def move_assignment_inside_condition(corrector, node); end private - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#520 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#522 def correction(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#533 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#535 def element_assignment?(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#537 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#539 def extract_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#550 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#552 def move_branch_inside_condition(corrector, branch, assignment); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#545 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#547 def remove_parentheses(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#524 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#526 def ternary(node); end end end @@ -52697,12 +53549,15 @@ RuboCop::Cop::Style::TrailingBodyOnModule::MSG = T.let(T.unsafe(nil), String) # The supported styles are: # # * `consistent_comma`: Requires a comma after the last argument, -# for all parenthesized method calls with arguments. +# for all parenthesized multi-line method calls with arguments. # * `comma`: Requires a comma after the last argument, but only for # parenthesized method calls where each argument is on its own line. # * `no_comma`: Requires that there is no comma after the last # argument. # +# Regardless of style, trailing commas are not allowed in +# single-line method calls. +# # @example EnforcedStyleForMultiline: consistent_comma # # bad # method(1, 2,) @@ -52773,21 +53628,21 @@ RuboCop::Cop::Style::TrailingBodyOnModule::MSG = T.let(T.unsafe(nil), String) # 2 # ) # -# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#87 +# source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#90 class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::TrailingComma extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#98 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#98 def on_send(node); end class << self - # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#91 + # source://rubocop//lib/rubocop/cop/style/trailing_comma_in_arguments.rb#94 def autocorrect_incompatible_with; end end end @@ -53646,7 +54501,7 @@ RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) # # # good # x += 1 until x > 10 -# @example +# # # bad # x += 100 while x < 500 # a long comment that makes code too long if it were a single line # @@ -53655,21 +54510,21 @@ RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) # x += 100 # end # -# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#35 +# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#34 class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#41 + # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#40 def on_until(node); end - # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#41 + # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#40 def on_while(node); end end -# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#39 +# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#38 RuboCop::Cop::Style::WhileUntilModifier::MSG = T.let(T.unsafe(nil), String) # Checks for array literals made up of word-like @@ -54410,8 +55265,8 @@ module RuboCop::Cop::TrailingBody def trailing_body?(node); end end -# Common methods shared by Style/TrailingCommaInArguments and -# Style/TrailingCommaInLiteral +# Common methods shared by Style/TrailingCommaInArguments, +# Style/TrailingCommaInArrayLiteral and Style/TrailingCommaInHashLiteral # # source://rubocop//lib/rubocop/cop/mixin/trailing_comma.rb#7 module RuboCop::Cop::TrailingComma @@ -54819,40 +55674,40 @@ module RuboCop::Cop::Utils; end class RuboCop::Cop::Utils::FormatString # @return [FormatString] a new instance of FormatString # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#89 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#91 def initialize(string); end - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#93 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#95 def format_sequences; end - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#105 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#107 def max_digit_dollar_num; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#101 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#103 def named_interpolation?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#97 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#99 def valid?; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#117 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#119 def mixed_formats?; end - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#111 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#113 def parse; end end # source://rubocop//lib/rubocop/cop/utils/format_string.rb#8 RuboCop::Cop::Utils::FormatString::DIGIT_DOLLAR = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#9 +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#10 RuboCop::Cop::Utils::FormatString::FLAG = T.let(T.unsafe(nil), Regexp) # The syntax of a format sequence is as follows. @@ -54869,97 +55724,105 @@ RuboCop::Cop::Utils::FormatString::FLAG = T.let(T.unsafe(nil), Regexp) # # @see https://ruby-doc.org/core-2.6.3/Kernel.html#method-i-format # -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#43 +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 class RuboCop::Cop::Utils::FormatString::FormatSequence # @return [FormatSequence] a new instance of FormatSequence # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#46 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#47 def initialize(match); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#61 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#63 def annotated?; end + # Returns the value of attribute arg_number. + # + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#45 + def arg_number; end + # Number of arguments required for the format sequence # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#70 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#72 def arity; end # Returns the value of attribute begin_pos. # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#45 def begin_pos; end # Returns the value of attribute end_pos. # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#45 def end_pos; end # Returns the value of attribute flags. # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#45 def flags; end - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#74 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#76 def max_digit_dollar_num; end # Returns the value of attribute name. # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#45 def name; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#57 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#59 def percent?; end # Returns the value of attribute precision. # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#45 def precision; end - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#78 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#80 def style; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#65 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#67 def template?; end # Returns the value of attribute type. # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#45 def type; end # Returns the value of attribute width. # - # source://rubocop//lib/rubocop/cop/utils/format_string.rb#44 + # source://rubocop//lib/rubocop/cop/utils/format_string.rb#45 def width; end end -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#15 +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#9 +RuboCop::Cop::Utils::FormatString::INTERPOLATION = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#16 RuboCop::Cop::Utils::FormatString::NAME = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#11 +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#12 RuboCop::Cop::Utils::FormatString::NUMBER = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#10 +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#11 RuboCop::Cop::Utils::FormatString::NUMBER_ARG = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#13 +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#14 RuboCop::Cop::Utils::FormatString::PRECISION = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#18 +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#19 RuboCop::Cop::Utils::FormatString::SEQUENCE = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#16 +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#17 RuboCop::Cop::Utils::FormatString::TEMPLATE_NAME = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#14 +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#15 RuboCop::Cop::Utils::FormatString::TYPE = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/utils/format_string.rb#12 +# source://rubocop//lib/rubocop/cop/utils/format_string.rb#13 RuboCop::Cop::Utils::FormatString::WIDTH = T.let(T.unsafe(nil), Regexp) # Helper to abstract complexity of building range pairs @@ -55975,93 +56838,101 @@ RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symb # # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#8 class RuboCop::Cop::VariableForce::Variable + extend ::RuboCop::AST::NodePattern::Macros + # @return [Variable] a new instance of Variable # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#15 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#17 def initialize(name, declaration_node, scope); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#98 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#110 def argument?; end - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#31 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#33 def assign(node); end # Returns the value of attribute assignments. # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 def assignments; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#106 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#118 def block_argument?; end - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#78 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#49 + def candidate_condition?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#90 def capture_with_block!; end # Returns the value of attribute captured_by_block. # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 def captured_by_block; end # Returns the value of attribute captured_by_block. # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 def captured_by_block?; end # Returns the value of attribute declaration_node. # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 def declaration_node; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#114 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#126 def explicit_block_local_variable?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#70 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#82 def in_modifier_conditional?(assignment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#110 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#122 def keyword_argument?; end + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#41 + def mark_last_as_reassigned!(assignment); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#102 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#114 def method_argument?; end # Returns the value of attribute name. # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 def name; end - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#44 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#56 def reference!(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#39 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#51 def referenced?; end # Returns the value of attribute references. # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 def references; end # Returns the value of attribute scope. # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#13 def scope; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#94 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#106 def should_be_unused?; end # This is a convenient way to check whether the variable is used @@ -56075,11 +56946,11 @@ class RuboCop::Cop::VariableForce::Variable # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#90 + # source://rubocop//lib/rubocop/cop/variable_force/variable.rb#102 def used?; end end -# source://rubocop//lib/rubocop/cop/variable_force/variable.rb#9 +# source://rubocop//lib/rubocop/cop/variable_force/variable.rb#11 RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) # @api private @@ -56225,147 +57096,171 @@ RuboCop::Cop::VisibilityHelp::VISIBILITY_SCOPES = T.let(T.unsafe(nil), Set) class RuboCop::DirectiveComment # @return [DirectiveComment] a new instance of DirectiveComment # - # source://rubocop//lib/rubocop/directive_comment.rb#32 + # source://rubocop//lib/rubocop/directive_comment.rb#46 def initialize(comment, cop_registry = T.unsafe(nil)); end # Checks if all cops specified in this directive # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#82 + # source://rubocop//lib/rubocop/directive_comment.rb#115 def all_cops?; end # Returns the value of attribute comment. # - # source://rubocop//lib/rubocop/directive_comment.rb#30 + # source://rubocop//lib/rubocop/directive_comment.rb#44 def comment; end # Returns array of specified in this directive cop names # - # source://rubocop//lib/rubocop/directive_comment.rb#87 + # source://rubocop//lib/rubocop/directive_comment.rb#120 def cop_names; end # Returns the value of attribute cop_registry. # - # source://rubocop//lib/rubocop/directive_comment.rb#30 + # source://rubocop//lib/rubocop/directive_comment.rb#44 def cop_registry; end # Returns the value of attribute cops. # - # source://rubocop//lib/rubocop/directive_comment.rb#30 + # source://rubocop//lib/rubocop/directive_comment.rb#44 def cops; end # Returns array of specified in this directive department names # when all department disabled # - # source://rubocop//lib/rubocop/directive_comment.rb#93 + # source://rubocop//lib/rubocop/directive_comment.rb#131 def department_names; end - # source://rubocop//lib/rubocop/directive_comment.rb#107 + # source://rubocop//lib/rubocop/directive_comment.rb#145 def directive_count; end # Checks if this directive disables cops # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#62 + # source://rubocop//lib/rubocop/directive_comment.rb#95 def disabled?; end # Checks if this directive disables all cops # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#77 + # source://rubocop//lib/rubocop/directive_comment.rb#110 def disabled_all?; end # Checks if this directive enables cops # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#67 + # source://rubocop//lib/rubocop/directive_comment.rb#100 def enabled?; end # Checks if this directive enables all cops # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#72 + # source://rubocop//lib/rubocop/directive_comment.rb#105 def enabled_all?; end # Checks if directive departments include cop # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#98 + # source://rubocop//lib/rubocop/directive_comment.rb#136 def in_directive_department?(cop); end # Returns line number for directive # - # source://rubocop//lib/rubocop/directive_comment.rb#112 + # source://rubocop//lib/rubocop/directive_comment.rb#150 def line_number; end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#59 + def malformed?; end + # Checks if this directive contains all the given cop names # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#44 + # source://rubocop//lib/rubocop/directive_comment.rb#77 def match?(cop_names); end # Returns match captures to directive comment pattern # - # source://rubocop//lib/rubocop/directive_comment.rb#57 + # source://rubocop//lib/rubocop/directive_comment.rb#90 def match_captures; end + # Checks if the directive comment is missing a cop name + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#67 + def missing_cop_name?; end + # Returns the value of attribute mode. # - # source://rubocop//lib/rubocop/directive_comment.rb#30 + # source://rubocop//lib/rubocop/directive_comment.rb#44 def mode; end # Checks if cop department has already used in directive comment # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#103 + # source://rubocop//lib/rubocop/directive_comment.rb#141 def overridden_by_department?(cop); end - # source://rubocop//lib/rubocop/directive_comment.rb#48 + # source://rubocop//lib/rubocop/directive_comment.rb#81 def range; end + # Returns an array of cops for this directive comment, without resolving departments + # + # source://rubocop//lib/rubocop/directive_comment.rb#125 + def raw_cop_names; end + # Checks if this directive relates to single line # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#39 + # source://rubocop//lib/rubocop/directive_comment.rb#72 def single_line?; end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/directive_comment.rb#54 + def start_with_marker?; end + private - # source://rubocop//lib/rubocop/directive_comment.rb#133 + # source://rubocop//lib/rubocop/directive_comment.rb#167 def all_cop_names; end - # source://rubocop//lib/rubocop/directive_comment.rb#137 + # source://rubocop//lib/rubocop/directive_comment.rb#171 def cop_names_for_department(department); end # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#129 + # source://rubocop//lib/rubocop/directive_comment.rb#163 def department?(name); end - # source://rubocop//lib/rubocop/directive_comment.rb#142 + # source://rubocop//lib/rubocop/directive_comment.rb#176 def exclude_lint_department_cops(cops); end - # source://rubocop//lib/rubocop/directive_comment.rb#122 + # source://rubocop//lib/rubocop/directive_comment.rb#156 def parsed_cop_names; end - # source://rubocop//lib/rubocop/directive_comment.rb#118 - def splitted_cops_string; end - class << self - # source://rubocop//lib/rubocop/directive_comment.rb#26 + # source://rubocop//lib/rubocop/directive_comment.rb#40 def before_comment(line); end end end +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#21 +RuboCop::DirectiveComment::AVAILABLE_MODES = T.let(T.unsafe(nil), Array) + # @api private # # source://rubocop//lib/rubocop/directive_comment.rb#19 @@ -56383,9 +57278,24 @@ RuboCop::DirectiveComment::COP_NAME_PATTERN = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/directive_comment.rb#21 +# source://rubocop//lib/rubocop/directive_comment.rb#29 RuboCop::DirectiveComment::DIRECTIVE_COMMENT_REGEXP = T.let(T.unsafe(nil), Regexp) +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#27 +RuboCop::DirectiveComment::DIRECTIVE_HEADER_PATTERN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#23 +RuboCop::DirectiveComment::DIRECTIVE_MARKER_PATTERN = T.let(T.unsafe(nil), String) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#25 +RuboCop::DirectiveComment::DIRECTIVE_MARKER_REGEXP = T.let(T.unsafe(nil), Regexp) + # @api private # # source://rubocop//lib/rubocop/directive_comment.rb#9 @@ -56401,6 +57311,16 @@ RuboCop::DirectiveComment::LINT_REDUNDANT_DIRECTIVE_COP = T.let(T.unsafe(nil), S # source://rubocop//lib/rubocop/directive_comment.rb#13 RuboCop::DirectiveComment::LINT_SYNTAX_COP = T.let(T.unsafe(nil), String) +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#36 +RuboCop::DirectiveComment::MALFORMED_DIRECTIVE_WITHOUT_COP_NAME_REGEXP = T.let(T.unsafe(nil), Regexp) + +# @api private +# +# source://rubocop//lib/rubocop/directive_comment.rb#34 +RuboCop::DirectiveComment::TRAILING_COMMENT_MARKER = T.let(T.unsafe(nil), String) + # An Error exception is different from an Offense with severity 'error' # When this exception is raised, it means that RuboCop is unable to perform # a requested action (probably due to misconfiguration) and must stop @@ -58526,7 +59446,7 @@ class RuboCop::Options # @api private # - # source://rubocop//lib/rubocop/options.rb#253 + # source://rubocop//lib/rubocop/options.rb#254 def add_profile_options(opts); end # @api private @@ -58546,7 +59466,7 @@ class RuboCop::Options # @api private # - # source://rubocop//lib/rubocop/options.rb#263 + # source://rubocop//lib/rubocop/options.rb#264 def handle_deprecated_option(old_option, new_option); end # Finds the option in `args` starting with -- and converts it to a symbol, @@ -58554,7 +59474,7 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#297 + # source://rubocop//lib/rubocop/options.rb#298 def long_opt_symbol(args); end # Sets a value in the @options hash, based on the given long option and its @@ -58562,17 +59482,22 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#286 + # source://rubocop//lib/rubocop/options.rb#287 def option(opts, *args); end # @api private # - # source://rubocop//lib/rubocop/options.rb#268 + # source://rubocop//lib/rubocop/options.rb#303 + def plugin_feature(file); end + + # @api private + # + # source://rubocop//lib/rubocop/options.rb#269 def rainbow; end # @api private # - # source://rubocop//lib/rubocop/options.rb#302 + # source://rubocop//lib/rubocop/options.rb#309 def require_feature(file); end # Creates a section of options in order to separate them visually when @@ -58580,7 +59505,7 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#278 + # source://rubocop//lib/rubocop/options.rb#279 def section(opts, heading, &_block); end end @@ -58603,125 +59528,125 @@ RuboCop::Options::E_STDIN_NO_PATH = T.let(T.unsafe(nil), String) # # @api private # -# source://rubocop//lib/rubocop/options.rb#498 +# source://rubocop//lib/rubocop/options.rb#512 module RuboCop::OptionsHelp; end # @api private # -# source://rubocop//lib/rubocop/options.rb#500 +# source://rubocop//lib/rubocop/options.rb#514 RuboCop::OptionsHelp::FORMATTER_OPTION_LIST = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/options.rb#499 +# source://rubocop//lib/rubocop/options.rb#513 RuboCop::OptionsHelp::MAX_EXCL = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/options.rb#502 +# source://rubocop//lib/rubocop/options.rb#516 RuboCop::OptionsHelp::TEXT = T.let(T.unsafe(nil), Hash) # Validates option arguments and the options' compatibility with each other. # # @api private # -# source://rubocop//lib/rubocop/options.rb#312 +# source://rubocop//lib/rubocop/options.rb#327 class RuboCop::OptionsValidator # @api private # @return [OptionsValidator] a new instance of OptionsValidator # - # source://rubocop//lib/rubocop/options.rb#350 + # source://rubocop//lib/rubocop/options.rb#365 def initialize(options); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#472 + # source://rubocop//lib/rubocop/options.rb#486 def boolean_or_empty_cache?; end # @api private # - # source://rubocop//lib/rubocop/options.rb#442 + # source://rubocop//lib/rubocop/options.rb#456 def disable_parallel_when_invalid_option_combo; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#468 + # source://rubocop//lib/rubocop/options.rb#482 def except_syntax?; end # @api private # - # source://rubocop//lib/rubocop/options.rb#476 + # source://rubocop//lib/rubocop/options.rb#490 def incompatible_options; end # @api private # - # source://rubocop//lib/rubocop/options.rb#455 + # source://rubocop//lib/rubocop/options.rb#469 def invalid_arguments_for_parallel; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#463 + # source://rubocop//lib/rubocop/options.rb#477 def only_includes_redundant_disable?; end # @api private # - # source://rubocop//lib/rubocop/options.rb#382 + # source://rubocop//lib/rubocop/options.rb#397 def validate_auto_gen_config; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#428 + # source://rubocop//lib/rubocop/options.rb#442 def validate_autocorrect; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#488 + # source://rubocop//lib/rubocop/options.rb#502 def validate_cache_enabled_for_cache_root; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#359 + # source://rubocop//lib/rubocop/options.rb#374 def validate_compatibility; end # @api private # - # source://rubocop//lib/rubocop/options.rb#354 + # source://rubocop//lib/rubocop/options.rb#369 def validate_cop_options; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#403 + # source://rubocop//lib/rubocop/options.rb#418 def validate_display_only_correctable_and_autocorrect; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#395 + # source://rubocop//lib/rubocop/options.rb#410 def validate_display_only_failed; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#412 + # source://rubocop//lib/rubocop/options.rb#427 def validate_display_only_failed_and_display_only_correctable; end # @api private # @raise [OptionParser::MissingArgument] # - # source://rubocop//lib/rubocop/options.rb#480 + # source://rubocop//lib/rubocop/options.rb#494 def validate_exclude_limit_option; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#421 + # source://rubocop//lib/rubocop/options.rb#436 def validate_lsp_and_editor_mode; end class << self @@ -58730,14 +59655,14 @@ class RuboCop::OptionsValidator # # @api private # - # source://rubocop//lib/rubocop/options.rb#319 + # source://rubocop//lib/rubocop/options.rb#334 def validate_cop_list(names); end private # @api private # - # source://rubocop//lib/rubocop/options.rb#336 + # source://rubocop//lib/rubocop/options.rb#351 def format_message_from(name, cop_names); end end end @@ -58750,35 +59675,38 @@ module RuboCop::PathUtil # Returns true for an absolute Unix or Windows path. # - # source://rubocop//lib/rubocop/path_util.rb#79 + # source://rubocop//lib/rubocop/path_util.rb#83 def absolute?(path); end # Returns true for a glob # - # source://rubocop//lib/rubocop/path_util.rb#84 + # source://rubocop//lib/rubocop/path_util.rb#88 def glob?(path); end - # source://rubocop//lib/rubocop/path_util.rb#114 + # source://rubocop//lib/rubocop/path_util.rb#118 def hidden_dir?(path); end - # source://rubocop//lib/rubocop/path_util.rb#97 + # source://rubocop//lib/rubocop/path_util.rb#101 def hidden_file?(path); end - # source://rubocop//lib/rubocop/path_util.rb#88 + # source://rubocop//lib/rubocop/path_util.rb#92 def hidden_file_in_not_hidden_dir?(pattern, path); end - # source://rubocop//lib/rubocop/path_util.rb#51 + # source://rubocop//lib/rubocop/path_util.rb#55 def match_path?(pattern, path); end # Loose check to reduce memory allocations # - # source://rubocop//lib/rubocop/path_util.rb#104 + # source://rubocop//lib/rubocop/path_util.rb#108 def maybe_hidden_file?(path); end # source://rubocop//lib/rubocop/path_util.rb#13 def relative_path(path, base_dir = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/path_util.rb#34 + # source://rubocop//lib/rubocop/path_util.rb#31 + def remote_file?(uri); end + + # source://rubocop//lib/rubocop/path_util.rb#38 def smart_path(path); end class << self @@ -58786,41 +59714,41 @@ module RuboCop::PathUtil # # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#79 + # source://rubocop//lib/rubocop/path_util.rb#83 def absolute?(path); end # Returns true for a glob # # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#84 + # source://rubocop//lib/rubocop/path_util.rb#88 def glob?(path); end # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#114 + # source://rubocop//lib/rubocop/path_util.rb#118 def hidden_dir?(path); end # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#97 + # source://rubocop//lib/rubocop/path_util.rb#101 def hidden_file?(path); end # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#88 + # source://rubocop//lib/rubocop/path_util.rb#92 def hidden_file_in_not_hidden_dir?(pattern, path); end # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#51 + # source://rubocop//lib/rubocop/path_util.rb#55 def match_path?(pattern, path); end # Loose check to reduce memory allocations # # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#104 + # source://rubocop//lib/rubocop/path_util.rb#108 def maybe_hidden_file?(path); end # source://rubocop//lib/rubocop/path_util.rb#13 @@ -58838,15 +59766,20 @@ module RuboCop::PathUtil # source://rubocop//lib/rubocop/path_util.rb#7 def relative_paths_cache=(_arg0); end - # source://rubocop//lib/rubocop/path_util.rb#34 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/path_util.rb#31 + def remote_file?(uri); end + + # source://rubocop//lib/rubocop/path_util.rb#38 def smart_path(path); end end end -# source://rubocop//lib/rubocop/path_util.rb#101 +# source://rubocop//lib/rubocop/path_util.rb#105 RuboCop::PathUtil::HIDDEN_FILE_PATTERN = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/path_util.rb#31 +# source://rubocop//lib/rubocop/path_util.rb#35 RuboCop::PathUtil::SMART_PATH_CACHE = T.let(T.unsafe(nil), Hash) # This module provides information on the platform that RuboCop is being run @@ -58862,6 +59795,196 @@ module RuboCop::Platform end end +# Provides a plugin for RuboCop extensions that conform to lint_roller. +# https://github.com/standardrb/lint_roller +# +# @api private +# +# source://rubocop//lib/rubocop/plugin/not_supported_error.rb#4 +module RuboCop::Plugin + class << self + # @api private + # + # source://rubocop//lib/rubocop/plugin.rb#30 + def integrate_plugins(rubocop_config, plugins); end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/plugin.rb#22 + def plugin_capable?(feature_name); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/plugin.rb#11 +RuboCop::Plugin::BUILTIN_INTERNAL_PLUGINS = T.let(T.unsafe(nil), Hash) + +# A class for integrating plugin configurations into RuboCop. +# Handles configuration merging, validation, and compatibility for plugins. +# +# @api private +# +# source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#11 +class RuboCop::Plugin::ConfigurationIntegrator + class << self + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#13 + def integrate_plugins_into_rubocop_config(rubocop_config, plugins); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#44 + def combine_rubocop_configs(default_config, runner_context, plugins); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#27 + def create_context(rubocop_config); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#81 + def fake_out_rubocop_default_configuration(default_config); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#92 + def load_plugin_rubocop_config(plugin, runner_context); end + + # This is how we ensure "first-in wins": plugins can override AllCops settings that are + # set by RuboCop's default configuration, but once a plugin sets an AllCop setting, they + # have exclusive first-in-wins rights to that setting. + # + # The one exception to this are array fields, because we don't want to + # overwrite the AllCops defaults but rather munge the arrays (`existing | + # new`) to allow plugins to add to the array, for example Include and + # Exclude paths and patterns. + # + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#118 + def merge_all_cop_settings(existing_all_cops, new_all_cops, already_configured_keys); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#67 + def merge_plugin_config_into_all_cops!(rubocop_config, plugin_config); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#71 + def merge_plugin_config_into_default_config!(default_config, plugin_config); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#137 + def resolver; end + + # @api private + # @raise [Plugin::NotSupportedError] + # + # source://rubocop//lib/rubocop/plugin/configuration_integrator.rb#37 + def validate_plugins!(plugins, runner_context); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/plugin.rb#18 +RuboCop::Plugin::INTERNAL_AFFAIRS_PLUGIN_NAME = T.let(T.unsafe(nil), String) + +# An exception raised when a plugin fails to load. +# +# @api private +# +# source://rubocop//lib/rubocop/plugin/load_error.rb#7 +class RuboCop::Plugin::LoadError < ::RuboCop::Error + # @api private + # @return [LoadError] a new instance of LoadError + # + # source://rubocop//lib/rubocop/plugin/load_error.rb#8 + def initialize(plugin_name); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/load_error.rb#14 + def message; end +end + +# A class for loading and resolving plugins. +# +# @api private +# +# source://rubocop//lib/rubocop/plugin/loader.rb#10 +class RuboCop::Plugin::Loader + class << self + # @api private + # + # source://rubocop//lib/rubocop/plugin/loader.rb#20 + def load(plugins); end + + private + + # @api private + # + # source://rubocop//lib/rubocop/plugin/loader.rb#70 + def constantize(plugin_name, plugin_config); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/loader.rb#61 + def constantize_plugin_from(plugin_name, plugin_config); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/loader.rb#90 + def constantize_plugin_from_gemspec_metadata(plugin_name); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/loader.rb#34 + def normalize(plugin_configs); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/loader.rb#86 + def require_plugin(require_path); end + end +end + +# @api private +# +# source://rubocop//lib/rubocop/plugin/loader.rb#12 +RuboCop::Plugin::Loader::DEFAULT_PLUGIN_CONFIG = T.let(T.unsafe(nil), Hash) + +# An exception raised when a plugin is not supported by the RuboCop engine. +# +# @api private +# +# source://rubocop//lib/rubocop/plugin/not_supported_error.rb#7 +class RuboCop::Plugin::NotSupportedError < ::RuboCop::Error + # @api private + # @return [NotSupportedError] a new instance of NotSupportedError + # + # source://rubocop//lib/rubocop/plugin/not_supported_error.rb#8 + def initialize(unsupported_plugins); end + + # @api private + # + # source://rubocop//lib/rubocop/plugin/not_supported_error.rb#14 + def message; end +end + +# @api private +# +# source://rubocop//lib/rubocop/plugin.rb#19 +RuboCop::Plugin::OBSOLETE_INTERNAL_AFFAIRS_PLUGIN_NAME = T.let(T.unsafe(nil), String) + # source://rubocop//lib/rubocop/ast_aliases.rb#6 RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource @@ -58877,7 +60000,7 @@ RuboCop::ProcessedSource = RuboCop::AST::ProcessedSource class RuboCop::RakeTask < ::Rake::TaskLib # @return [RakeTask] a new instance of RakeTask # - # source://rubocop//lib/rubocop/rake_task.rb#17 + # source://rubocop//lib/rubocop/rake_task.rb#18 def initialize(name = T.unsafe(nil), *args, &task_block); end # Returns the value of attribute fail_on_error. @@ -58940,6 +60063,18 @@ class RuboCop::RakeTask < ::Rake::TaskLib # source://rubocop//lib/rubocop/rake_task.rb#15 def patterns=(_arg0); end + # Returns the value of attribute plugins. + # + # source://rubocop//lib/rubocop/rake_task.rb#15 + def plugins; end + + # Sets the attribute plugins + # + # @param value the value to set the attribute plugins to. + # + # source://rubocop//lib/rubocop/rake_task.rb#15 + def plugins=(_arg0); end + # Returns the value of attribute requires. # # source://rubocop//lib/rubocop/rake_task.rb#15 @@ -58966,19 +60101,19 @@ class RuboCop::RakeTask < ::Rake::TaskLib private - # source://rubocop//lib/rubocop/rake_task.rb#55 + # source://rubocop//lib/rubocop/rake_task.rb#56 def full_options; end - # source://rubocop//lib/rubocop/rake_task.rb#35 + # source://rubocop//lib/rubocop/rake_task.rb#36 def perform(option); end - # source://rubocop//lib/rubocop/rake_task.rb#44 + # source://rubocop//lib/rubocop/rake_task.rb#45 def run_cli(verbose, options); end - # source://rubocop//lib/rubocop/rake_task.rb#62 + # source://rubocop//lib/rubocop/rake_task.rb#64 def setup_ivars(name); end - # source://rubocop//lib/rubocop/rake_task.rb#72 + # source://rubocop//lib/rubocop/rake_task.rb#75 def setup_subtasks(name, *args, &task_block); end end @@ -59071,7 +60206,7 @@ class RuboCop::ResultCache # @return [ResultCache] a new instance of ResultCache # # source://rubocop//lib/rubocop/result_cache.rb#87 - def initialize(file, team, options, config_store, cache_root = T.unsafe(nil)); end + def initialize(file, team, options, config_store, cache_root_override = T.unsafe(nil)); end # @api private # @return [Boolean] @@ -59165,7 +60300,7 @@ class RuboCop::ResultCache # @api private # # source://rubocop//lib/rubocop/result_cache.rb#75 - def cache_root(config_store); end + def cache_root(config_store, cache_root_override = T.unsafe(nil)); end # Remove old files so that the cache doesn't grow too big. When the # threshold MaxFilesInCache has been exceeded, the oldest 50% of all the @@ -59177,7 +60312,7 @@ class RuboCop::ResultCache # @api private # # source://rubocop//lib/rubocop/result_cache.rb#28 - def cleanup(config_store, verbose, cache_root = T.unsafe(nil)); end + def cleanup(config_store, verbose, cache_root_override = T.unsafe(nil)); end # @api private # @@ -59219,7 +60354,7 @@ class RuboCop::ResultCache # @api private # # source://rubocop//lib/rubocop/result_cache.rb#52 - def remove_oldest_files(files, dirs, cache_root, verbose); end + def remove_oldest_files(files, dirs, rubocop_cache_dir, verbose); end # @api private # @return [Boolean] @@ -59554,42 +60689,42 @@ class RuboCop::TargetFinder # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#172 + # source://rubocop//lib/rubocop/target_finder.rb#173 def configured_include?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#208 + # source://rubocop//lib/rubocop/target_finder.rb#209 def debug?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#212 + # source://rubocop//lib/rubocop/target_finder.rb#213 def fail_fast?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#200 + # source://rubocop//lib/rubocop/target_finder.rb#201 def force_exclusion?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#204 + # source://rubocop//lib/rubocop/target_finder.rb#205 def ignore_parent_exclusion?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#145 + # source://rubocop//lib/rubocop/target_finder.rb#146 def included_file?(file); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#191 + # source://rubocop//lib/rubocop/target_finder.rb#192 def order; end # @api private @@ -59600,30 +60735,30 @@ class RuboCop::TargetFinder # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#176 + # source://rubocop//lib/rubocop/target_finder.rb#177 def ruby_executable?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#157 + # source://rubocop//lib/rubocop/target_finder.rb#158 def ruby_extension?(file); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#161 + # source://rubocop//lib/rubocop/target_finder.rb#162 def ruby_extensions; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#149 + # source://rubocop//lib/rubocop/target_finder.rb#150 def ruby_file?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#168 + # source://rubocop//lib/rubocop/target_finder.rb#169 def ruby_filename?(file); end # @api private @@ -59633,13 +60768,13 @@ class RuboCop::TargetFinder # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#187 + # source://rubocop//lib/rubocop/target_finder.rb#188 def ruby_interpreters(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#153 + # source://rubocop//lib/rubocop/target_finder.rb#154 def stdin?; end # @api private @@ -59661,7 +60796,7 @@ class RuboCop::TargetFinder # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#134 + # source://rubocop//lib/rubocop/target_finder.rb#135 def without_excluded(files); end end @@ -59995,17 +61130,17 @@ module RuboCop::Version class << self # @api private # - # source://rubocop//lib/rubocop/version.rb#99 + # source://rubocop//lib/rubocop/version.rb#114 def config_for_pwd(env); end # @api private # - # source://rubocop//lib/rubocop/version.rb#129 + # source://rubocop//lib/rubocop/version.rb#144 def document_version; end # @api private # - # source://rubocop//lib/rubocop/version.rb#66 + # source://rubocop//lib/rubocop/version.rb#67 def extension_versions(env); end # Returns feature version in one of two ways: @@ -60015,7 +61150,7 @@ module RuboCop::Version # # @api private # - # source://rubocop//lib/rubocop/version.rb#113 + # source://rubocop//lib/rubocop/version.rb#128 def feature_version(feature); end # @api private @@ -60025,12 +61160,12 @@ module RuboCop::Version # @api private # - # source://rubocop//lib/rubocop/version.rb#134 + # source://rubocop//lib/rubocop/version.rb#149 def server_mode; end # @api private # - # source://rubocop//lib/rubocop/version.rb#90 + # source://rubocop//lib/rubocop/version.rb#105 def target_ruby_version(env); end # @api private diff --git a/sorbet/rbi/gems/ruby-lsp@0.23.10.rbi b/sorbet/rbi/gems/ruby-lsp@0.23.11.rbi similarity index 96% rename from sorbet/rbi/gems/ruby-lsp@0.23.10.rbi rename to sorbet/rbi/gems/ruby-lsp@0.23.11.rbi index 698a17dcc..dbb4252b6 100644 --- a/sorbet/rbi/gems/ruby-lsp@0.23.10.rbi +++ b/sorbet/rbi/gems/ruby-lsp@0.23.11.rbi @@ -447,7 +447,7 @@ class RubyIndexer::Entry # @return [RubyIndexer::Location] # - # source://sorbet-runtime/0.5.11813/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11856/lib/types/private/methods/_methods.rb#257 def name_location(*args, **_arg1, &blk); end # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/entry.rb#57 @@ -820,7 +820,7 @@ class RubyIndexer::Entry::Parameter # # @return [Symbol] # - # source://sorbet-runtime/0.5.11813/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11856/lib/types/private/methods/_methods.rb#257 def decorated_name(*args, **_arg1, &blk); end # Name includes just the name of the parameter, excluding symbols like splats @@ -999,19 +999,19 @@ end # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#5 class RubyIndexer::Index - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#58 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#65 sig { void } def initialize; end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#140 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#147 sig { params(fully_qualified_name: ::String).returns(T.nilable(T::Array[::RubyIndexer::Entry])) } def [](fully_qualified_name); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#131 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#138 sig { params(entry: ::RubyIndexer::Entry, skip_prefix_tree: T::Boolean).void } def add(entry, skip_prefix_tree: T.unsafe(nil)); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#683 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#690 sig { params(name: ::String, owner_name: ::String).returns(T::Array[::RubyIndexer::Entry::ClassVariable]) } def class_variable_completion_candidates(name, owner_name); end @@ -1019,7 +1019,7 @@ class RubyIndexer::Index sig { returns(::RubyIndexer::Configuration) } def configuration; end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#300 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#307 sig do params( name: ::String, @@ -1028,15 +1028,15 @@ class RubyIndexer::Index end def constant_completion_candidates(name, nesting); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#101 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#108 sig { params(uri: ::URI::Generic, skip_require_paths_tree: T::Boolean).void } def delete(uri, skip_require_paths_tree: T.unsafe(nil)); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#733 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#740 sig { returns(T::Boolean) } def empty?; end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#781 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#788 sig do type_parameters(:T) .params( @@ -1046,14 +1046,14 @@ class RubyIndexer::Index end def entries_for(uri, type = T.unsafe(nil)); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#753 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#760 sig { params(name: ::String).returns(::RubyIndexer::Entry::SingletonClass) } def existing_or_new_singleton_class(name); end # Searches for a constant based on an unqualified name and returns the first possible match regardless of whether # there are more possible matching entries # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#161 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#168 sig do params( name: ::String @@ -1072,13 +1072,13 @@ class RubyIndexer::Index # `Something::Else`, then we first discover `Something::Else::Baz`. But `Something::Else::Baz` might contain other # aliases, so we have to invoke `follow_aliased_namespace` again to check until we only return a real name # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#472 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#479 sig { params(name: ::String, seen_names: T::Array[::String]).returns(::String) } def follow_aliased_namespace(name, seen_names = T.unsafe(nil)); end # Fuzzy searches index entries based on Jaro-Winkler similarity. If no query is provided, all entries are returned # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#218 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#225 sig { params(query: T.nilable(::String)).returns(T::Array[::RubyIndexer::Entry]) } def fuzzy_search(query); end @@ -1087,7 +1087,7 @@ class RubyIndexer::Index # consumer of this API has to handle deleting and inserting/updating entries in the index instead of passing the # document's source (used to handle unsaved changes to files) # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#701 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#708 sig do params( uri: ::URI::Generic, @@ -1101,7 +1101,7 @@ class RubyIndexer::Index # indexing progress. That block is invoked with the current progress percentage and should return `true` to continue # indexing or `false` to stop indexing. # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#406 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#413 sig do params( uris: T::Array[::URI::Generic], @@ -1112,22 +1112,22 @@ class RubyIndexer::Index # Indexes a File URI by reading the contents from disk # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#454 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#461 sig { params(uri: ::URI::Generic, collect_comments: T::Boolean).void } def index_file(uri, collect_comments: T.unsafe(nil)); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#432 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#439 sig { params(uri: ::URI::Generic, source: ::String, collect_comments: T::Boolean).void } def index_single(uri, source, collect_comments: T.unsafe(nil)); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#743 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#750 sig { params(name: ::String).returns(T::Boolean) } def indexed?(name); end # Returns a list of possible candidates for completion of instance variables for a given owner name. The name must # include the `@` prefix # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#654 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#661 sig do params( name: ::String, @@ -1136,7 +1136,7 @@ class RubyIndexer::Index end def instance_variable_completion_candidates(name, owner_name); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#748 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#755 sig { returns(::Integer) } def length; end @@ -1151,11 +1151,11 @@ class RubyIndexer::Index # # @raise [NonExistingNamespaceError] # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#550 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#557 sig { params(fully_qualified_name: ::String).returns(T::Array[::String]) } def linearized_ancestors_of(fully_qualified_name); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#247 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#254 sig do params( name: T.nilable(::String), @@ -1164,7 +1164,7 @@ class RubyIndexer::Index end def method_completion_candidates(name, receiver_name); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#738 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#745 sig { returns(T::Array[::String]) } def names; end @@ -1182,7 +1182,7 @@ class RubyIndexer::Index # ] # ``` # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#199 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#206 sig do params( query: ::String, @@ -1193,7 +1193,7 @@ class RubyIndexer::Index # Register an included `hook` that will be executed when `module_name` is included into any namespace # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#96 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#103 sig do params( module_name: ::String, @@ -1210,7 +1210,7 @@ class RubyIndexer::Index # seen_names: this parameter should not be used by consumers of the api. It is used to avoid infinite recursion when # resolving circular references # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#365 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#372 sig do params( name: ::String, @@ -1220,7 +1220,7 @@ class RubyIndexer::Index end def resolve(name, nesting, seen_names = T.unsafe(nil)); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#639 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#646 sig do params( variable_name: ::String, @@ -1232,7 +1232,7 @@ class RubyIndexer::Index # Resolves an instance variable name for a given owner name. This method will linearize the ancestors of the owner # and find inherited instance variables as well # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#628 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#635 sig do params( variable_name: ::String, @@ -1245,7 +1245,7 @@ class RubyIndexer::Index # as it is used only internally to prevent infinite loops when resolving circular aliases # Returns `nil` if the method does not exist on that receiver # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#512 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#519 sig do params( method_name: ::String, @@ -1256,7 +1256,7 @@ class RubyIndexer::Index end def resolve_method(method_name, receiver_name, seen_names = T.unsafe(nil), inherited_only: T.unsafe(nil)); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#145 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#152 sig { params(query: ::String).returns(T::Array[::URI::Generic]) } def search_require_paths(query); end @@ -1267,11 +1267,11 @@ class RubyIndexer::Index # with `A::B::A::B::Foo`. This method will remove any redundant parts from the final name based on the reference and # the nesting # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#1095 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#1102 sig { params(name: ::String, nesting: T::Array[::String]).returns(::String) } def build_non_redundant_full_name(name, nesting); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#1127 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#1134 sig do params( full_name: ::String, @@ -1280,7 +1280,7 @@ class RubyIndexer::Index end def direct_or_aliased_constant(full_name, seen_names); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#1056 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#1063 sig do params( name: T.nilable(::String), @@ -1292,7 +1292,7 @@ class RubyIndexer::Index # Linearize mixins for an array of namespace entries. This method will mutate the `ancestors` array with the # linearized ancestors of the mixins # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#841 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#848 sig do params( ancestors: T::Array[::String], @@ -1305,7 +1305,7 @@ class RubyIndexer::Index # Linearize the superclass of a given namespace (including modules with the implicit `Module` superclass). This # method will mutate the `ancestors` array with the linearized ancestors of the superclass # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#891 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#898 sig do params( ancestors: T::Array[::String], @@ -1321,11 +1321,11 @@ class RubyIndexer::Index # Always returns the linearized ancestors for the attached class, regardless of whether `name` refers to a singleton # or attached namespace # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#793 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#800 sig { params(name: ::String).returns(T::Array[::String]) } def linearized_attached_ancestors(name); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#1026 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#1033 sig do params( name: ::String, @@ -1335,7 +1335,7 @@ class RubyIndexer::Index end def lookup_ancestor_chain(name, nesting, seen_names); end - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#997 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#1004 sig do params( name: ::String, @@ -1348,7 +1348,7 @@ class RubyIndexer::Index # Attempts to resolve an UnresolvedAlias into a resolved Alias. If the unresolved alias is pointing to a constant # that doesn't exist, then we return the same UnresolvedAlias # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#964 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#971 sig do params( entry: ::RubyIndexer::Entry::UnresolvedConstantAlias, @@ -1360,7 +1360,7 @@ class RubyIndexer::Index # Attempt to resolve a given unresolved method alias. This method returns the resolved alias if we managed to # identify the target or the same unresolved alias entry if we couldn't # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#1149 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#1156 sig do params( entry: ::RubyIndexer::Entry::UnresolvedMethodAlias, @@ -1372,7 +1372,7 @@ class RubyIndexer::Index # Runs the registered included hooks # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#806 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#813 sig { params(fully_qualified_name: ::String, nesting: T::Array[::String]).void } def run_included_hooks(fully_qualified_name, nesting); end @@ -1382,16 +1382,16 @@ class RubyIndexer::Index # constant was found # # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#25 - sig { params(stack: T::Array[::String], name: ::String).returns(T::Array[::String]) } + sig { params(stack: T::Array[::String], name: T.nilable(::String)).returns(T::Array[::String]) } def actual_nesting(stack, name); end # Returns the unresolved name for a constant reference including all parts of a constant path, or `nil` if the # constant contains dynamic or incomplete parts # - # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#49 + # source://ruby-lsp//lib/ruby_indexer/lib/ruby_indexer/index.rb#51 sig do params( - node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantReadNode) + node: T.any(::Prism::CallNode, ::Prism::ConstantPathNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantReadNode, ::Prism::MissingNode) ).returns(T.nilable(::String)) end def constant_name(node); end @@ -2192,51 +2192,51 @@ class RubyLsp::BaseServer sig { params(options: T.untyped).void } def initialize(**options); end - # source://ruby-lsp//lib/ruby_lsp/base_server.rb#142 + # source://ruby-lsp//lib/ruby_lsp/base_server.rb#143 sig { params(id: ::Integer, message: ::String, type: ::Integer).void } def fail_request_and_notify(id, message, type: T.unsafe(nil)); end - # source://ruby-lsp//lib/ruby_lsp/base_server.rb#148 + # source://ruby-lsp//lib/ruby_lsp/base_server.rb#149 sig { returns(::Thread) } def new_worker; end # This method is only intended to be used in tests! Pops the latest response that would be sent to the client # - # source://ruby-lsp//lib/ruby_lsp/base_server.rb#125 + # source://ruby-lsp//lib/ruby_lsp/base_server.rb#126 sig { returns(T.untyped) } def pop_response; end # @abstract # - # source://ruby-lsp//lib/ruby_lsp/base_server.rb#136 + # source://ruby-lsp//lib/ruby_lsp/base_server.rb#137 sig { abstract.params(message: T::Hash[::Symbol, T.untyped]).void } def process_message(message); end # This method is only intended to be used in tests! Pushes a message to the incoming queue directly # - # source://ruby-lsp//lib/ruby_lsp/base_server.rb#131 + # source://ruby-lsp//lib/ruby_lsp/base_server.rb#132 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def push_message(message); end - # source://ruby-lsp//lib/ruby_lsp/base_server.rb#111 + # source://ruby-lsp//lib/ruby_lsp/base_server.rb#112 sig { void } def run_shutdown; end - # source://ruby-lsp//lib/ruby_lsp/base_server.rb#179 + # source://ruby-lsp//lib/ruby_lsp/base_server.rb#180 sig { params(id: ::Integer).void } def send_empty_response(id); end - # source://ruby-lsp//lib/ruby_lsp/base_server.rb#184 + # source://ruby-lsp//lib/ruby_lsp/base_server.rb#185 sig { params(message: ::String, type: ::Integer).void } def send_log_message(message, type: T.unsafe(nil)); end - # source://ruby-lsp//lib/ruby_lsp/base_server.rb#168 + # source://ruby-lsp//lib/ruby_lsp/base_server.rb#169 sig { params(message: T.any(::RubyLsp::Error, ::RubyLsp::Notification, ::RubyLsp::Request, ::RubyLsp::Result)).void } def send_message(message); end # @abstract # - # source://ruby-lsp//lib/ruby_lsp/base_server.rb#139 + # source://ruby-lsp//lib/ruby_lsp/base_server.rb#140 sig { abstract.void } def shutdown; end @@ -4186,6 +4186,70 @@ class RubyLsp::Listeners::SignatureHelp def generate_signatures(signatures, method_name, methods, title, extra_links); end end +# source://ruby-lsp//lib/ruby_lsp/listeners/test_style.rb#6 +class RubyLsp::Listeners::TestStyle + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp//lib/ruby_lsp/listeners/test_style.rb#21 + sig do + params( + response_builder: RubyLsp::ResponseBuilders::TestCollection, + global_state: ::RubyLsp::GlobalState, + dispatcher: ::Prism::Dispatcher, + uri: ::URI::Generic + ).void + end + def initialize(response_builder, global_state, dispatcher, uri); end + + # source://ruby-lsp//lib/ruby_lsp/listeners/test_style.rb#116 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp//lib/ruby_lsp/listeners/test_style.rb#124 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_leave(node); end + + # source://ruby-lsp//lib/ruby_lsp/listeners/test_style.rb#41 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_enter(node); end + + # source://ruby-lsp//lib/ruby_lsp/listeners/test_style.rb#87 + sig { params(node: ::Prism::ClassNode).void } + def on_class_node_leave(node); end + + # source://ruby-lsp//lib/ruby_lsp/listeners/test_style.rb#93 + sig { params(node: ::Prism::DefNode).void } + def on_def_node_enter(node); end + + # source://ruby-lsp//lib/ruby_lsp/listeners/test_style.rb#71 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_enter(node); end + + # source://ruby-lsp//lib/ruby_lsp/listeners/test_style.rb#81 + sig { params(node: ::Prism::ModuleNode).void } + def on_module_node_leave(node); end + + private + + # source://ruby-lsp//lib/ruby_lsp/listeners/test_style.rb#158 + sig do + params( + node: T.any(::Prism::CallNode, ::Prism::ConstantPathNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantReadNode, ::Prism::MissingNode) + ).returns(::String) + end + def name_with_dynamic_reference(node); end + + # source://ruby-lsp//lib/ruby_lsp/listeners/test_style.rb#135 + sig { params(attached_ancestors: T::Array[::String], fully_qualified_name: ::String).returns(T::Boolean) } + def non_declarative_minitest?(attached_ancestors, fully_qualified_name); end +end + +# source://ruby-lsp//lib/ruby_lsp/listeners/test_style.rb#10 +RubyLsp::Listeners::TestStyle::ACCESS_MODIFIERS = T.let(T.unsafe(nil), Array) + +# source://ruby-lsp//lib/ruby_lsp/listeners/test_style.rb#11 +RubyLsp::Listeners::TestStyle::DYNAMIC_REFERENCE_MARKER = T.let(T.unsafe(nil), String) + # A notification to be sent to the client # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. @@ -4686,6 +4750,28 @@ class RubyLsp::Requests::Diagnostics < ::RubyLsp::Requests::Request end end +# This is a custom request to ask the server to parse a test file and discover all available examples in it. Add-ons +# can augment the behavior through listeners, allowing them to handle discovery for different frameworks +# +# source://ruby-lsp//lib/ruby_lsp/requests/discover_tests.rb#10 +class RubyLsp::Requests::DiscoverTests < ::RubyLsp::Requests::Request + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp//lib/ruby_lsp/requests/discover_tests.rb#15 + sig do + params( + global_state: ::RubyLsp::GlobalState, + document: RubyLsp::RubyDocument, + dispatcher: ::Prism::Dispatcher + ).void + end + def initialize(global_state, document, dispatcher); end + + # source://ruby-lsp//lib/ruby_lsp/requests/discover_tests.rb#25 + sig { override.returns(T::Array[::RubyLsp::Requests::Support::TestItem]) } + def perform; end +end + # The [document highlight](https://microsoft.github.io/language-server-protocol/specification#textDocument_documentHighlight) # informs the editor all relevant elements of the currently pointed item for highlighting. For example, when # the cursor is on the `F` of the constant `FOO`, the editor should identify other occurrences of `FOO` @@ -5375,10 +5461,10 @@ module RubyLsp::Requests::Support::Common end def categorized_markdown_from_index_entries(title, entries, max_entries = T.unsafe(nil)); end - # source://ruby-lsp//lib/ruby_lsp/requests/support/common.rb#147 + # source://ruby-lsp//lib/ruby_lsp/requests/support/common.rb#149 sig do params( - node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantReadNode) + node: T.any(::Prism::CallNode, ::Prism::ConstantPathNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantReadNode, ::Prism::MissingNode) ).returns(T.nilable(::String)) end def constant_name(node); end @@ -5399,11 +5485,11 @@ module RubyLsp::Requests::Support::Common # name. For example, for `Foo::Bar::Baz`, this method will invoke the block with `Foo`, then `Bar` and finally # `Baz`. # - # source://ruby-lsp//lib/ruby_lsp/requests/support/common.rb#169 + # source://ruby-lsp//lib/ruby_lsp/requests/support/common.rb#171 sig { params(node: ::Prism::Node, block: T.proc.params(part: ::Prism::Node).void).void } def each_constant_path_part(node, &block); end - # source://ruby-lsp//lib/ruby_lsp/requests/support/common.rb#179 + # source://ruby-lsp//lib/ruby_lsp/requests/support/common.rb#181 sig { params(entry: ::RubyIndexer::Entry).returns(T.nilable(::Integer)) } def kind_for_entry(entry); end @@ -5418,7 +5504,7 @@ module RubyLsp::Requests::Support::Common end def markdown_from_index_entries(title, entries, max_entries = T.unsafe(nil), extra_links: T.unsafe(nil)); end - # source://ruby-lsp//lib/ruby_lsp/requests/support/common.rb#152 + # source://ruby-lsp//lib/ruby_lsp/requests/support/common.rb#154 sig { params(node: T.any(::Prism::ClassNode, ::Prism::ModuleNode)).returns(T.nilable(::String)) } def namespace_constant_name(node); end @@ -5442,7 +5528,7 @@ module RubyLsp::Requests::Support::Common sig { params(node: ::Prism::CallNode).returns(T::Boolean) } def self_receiver?(node); end - # source://ruby-lsp//lib/ruby_lsp/requests/support/common.rb#197 + # source://ruby-lsp//lib/ruby_lsp/requests/support/common.rb#199 sig { params(sorbet_level: ::RubyLsp::RubyDocument::SorbetLevel).returns(T::Boolean) } def sorbet_level_true_or_higher?(sorbet_level); end end @@ -5660,6 +5746,51 @@ class RubyLsp::Requests::Support::Sorbet end end +# Represents a test item as defined by the VS Code interface to be used in the test explorer +# See https://code.visualstudio.com/api/references/vscode-api#TestItem +# +# Note: this test item object can only represent test groups or examples discovered inside files. It cannot be +# used to represent test files, directories or workspaces +# +# source://ruby-lsp//lib/ruby_lsp/requests/support/test_item.rb#12 +class RubyLsp::Requests::Support::TestItem + # source://ruby-lsp//lib/ruby_lsp/requests/support/test_item.rb#19 + sig do + params( + id: ::String, + label: ::String, + uri: ::URI::Generic, + range: ::LanguageServer::Protocol::Interface::Range + ).void + end + def initialize(id, label, uri, range); end + + # source://ruby-lsp//lib/ruby_lsp/requests/support/test_item.rb#37 + sig { params(id: ::String).returns(T.nilable(::RubyLsp::Requests::Support::TestItem)) } + def [](id); end + + # source://ruby-lsp//lib/ruby_lsp/requests/support/test_item.rb#28 + sig { params(item: ::RubyLsp::Requests::Support::TestItem).void } + def add(item); end + + # source://ruby-lsp//lib/ruby_lsp/requests/support/test_item.rb#42 + sig { returns(T::Array[::RubyLsp::Requests::Support::TestItem]) } + def children; end + + # source://ruby-lsp//lib/ruby_lsp/requests/support/test_item.rb#16 + sig { returns(::String) } + def id; end + + # @return [String] + # + # source://ruby-lsp//lib/ruby_lsp/requests/support/test_item.rb#16 + def label; end + + # source://ruby-lsp//lib/ruby_lsp/requests/support/test_item.rb#47 + sig { returns(T::Hash[::Symbol, T.untyped]) } + def to_hash; end +end + # The [type hierarchy supertypes # request](https://microsoft.github.io/language-server-protocol/specification#typeHierarchy_supertypes) # displays the list of ancestors (supertypes) for the selected type. @@ -5735,7 +5866,7 @@ class RubyLsp::ResponseBuilders::DocumentSymbol < ::RubyLsp::ResponseBuilders::R # @param symbol [Interface::DocumentSymbol] # @return [void] # - # source://sorbet-runtime/0.5.11813/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11856/lib/types/private/methods/_methods.rb#257 def <<(*args, **_arg1, &blk); end # source://ruby-lsp//lib/ruby_lsp/response_builders/document_symbol.rb#47 @@ -5939,6 +6070,34 @@ class RubyLsp::ResponseBuilders::SignatureHelp < ::RubyLsp::ResponseBuilders::Re def response; end end +# source://ruby-lsp//lib/ruby_lsp/response_builders/test_collection.rb#6 +class RubyLsp::ResponseBuilders::TestCollection < ::RubyLsp::ResponseBuilders::ResponseBuilder + extend T::Generic + + ResponseType = type_member { { fixed: RubyLsp::Requests::Support::TestItem } } + + # source://ruby-lsp//lib/ruby_lsp/response_builders/test_collection.rb#15 + sig { void } + def initialize; end + + # source://ruby-lsp//lib/ruby_lsp/response_builders/test_collection.rb#28 + sig { params(id: ::String).returns(T.nilable(ResponseType)) } + def [](id); end + + # @raise [DuplicateIdError] + # + # source://ruby-lsp//lib/ruby_lsp/response_builders/test_collection.rb#21 + sig { params(item: ResponseType).void } + def add(item); end + + # source://ruby-lsp//lib/ruby_lsp/response_builders/test_collection.rb#33 + sig { override.returns(T::Array[ResponseType]) } + def response; end +end + +# source://ruby-lsp//lib/ruby_lsp/response_builders/test_collection.rb#7 +class RubyLsp::ResponseBuilders::TestCollection::DuplicateIdError < ::StandardError; end + # The final result of running a request before its IO is finalized # # source://ruby-lsp//lib/ruby_lsp/utils.rb#258 @@ -6095,7 +6254,7 @@ class RubyLsp::Server < ::RubyLsp::BaseServer sig { returns(::RubyLsp::GlobalState) } def global_state; end - # source://ruby-lsp//lib/ruby_lsp/server.rb#169 + # source://ruby-lsp//lib/ruby_lsp/server.rb#173 sig { params(include_project_addons: T::Boolean).void } def load_addons(include_project_addons: T.unsafe(nil)); end @@ -6105,21 +6264,21 @@ class RubyLsp::Server < ::RubyLsp::BaseServer # Process responses to requests that were sent to the client # - # source://ruby-lsp//lib/ruby_lsp/server.rb#161 + # source://ruby-lsp//lib/ruby_lsp/server.rb#165 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def process_response(message); end private - # source://ruby-lsp//lib/ruby_lsp/server.rb#1223 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1227 sig { params(id: ::String, title: ::String, percentage: ::Integer).void } def begin_progress(id, title, percentage: T.unsafe(nil)); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1253 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1257 sig { void } def check_formatter_is_available; end - # source://ruby-lsp//lib/ruby_lsp/server.rb#849 + # source://ruby-lsp//lib/ruby_lsp/server.rb#853 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def code_action_resolve(message); end @@ -6127,195 +6286,208 @@ class RubyLsp::Server < ::RubyLsp::BaseServer # method returns the created thread is to that we can join it in tests and avoid flakiness. The implementation is # not supposed to rely on the return of this method # - # source://ruby-lsp//lib/ruby_lsp/server.rb#1327 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1331 sig { params(message: T::Hash[::Symbol, T.untyped]).returns(T.nilable(::Thread)) } def compose_bundle(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1243 + # Returns internal state information for debugging purposes + # + # source://ruby-lsp//lib/ruby_lsp/server.rb#1378 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def diagnose_state(message); end + + # Discovers all available test groups and examples in a given file taking into consideration the merged response of + # all add-ons + # + # source://ruby-lsp//lib/ruby_lsp/server.rb#1398 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def discover_tests(message); end + + # source://ruby-lsp//lib/ruby_lsp/server.rb#1247 sig { params(id: ::String).void } def end_progress(id); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1071 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1075 sig { params(uri: ::URI::Generic).void } def handle_rubocop_config_change(uri); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1046 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1050 sig { params(index: ::RubyIndexer::Index, file_path: ::String, change_type: ::Integer).void } def handle_ruby_file_change(index, file_path, change_type); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1191 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1195 sig { void } def perform_initial_indexing; end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1271 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1275 sig { params(indexing_options: T.nilable(T::Hash[::Symbol, T.untyped])).void } def process_indexing_configuration(indexing_options); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1236 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1240 sig { params(id: ::String, percentage: ::Integer).void } def progress(id, percentage); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#459 + # source://ruby-lsp//lib/ruby_lsp/server.rb#463 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def run_combined_requests(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#209 + # source://ruby-lsp//lib/ruby_lsp/server.rb#213 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def run_initialize(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#346 + # source://ruby-lsp//lib/ruby_lsp/server.rb#350 sig { void } def run_initialized; end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1186 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1190 sig { override.void } def shutdown; end - # source://ruby-lsp//lib/ruby_lsp/server.rb#785 + # source://ruby-lsp//lib/ruby_lsp/server.rb#789 sig { params(document: RubyLsp::Document[T.untyped]).returns(::RubyLsp::RubyDocument::SorbetLevel) } def sorbet_level(document); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#827 + # source://ruby-lsp//lib/ruby_lsp/server.rb#831 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_code_action(message); end # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11813/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11856/lib/types/private/methods/_methods.rb#257 def text_document_code_lens(*args, **_arg1, &blk); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#914 + # source://ruby-lsp//lib/ruby_lsp/server.rb#918 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_completion(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#939 + # source://ruby-lsp//lib/ruby_lsp/server.rb#943 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_completion_item_resolve(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#984 + # source://ruby-lsp//lib/ruby_lsp/server.rb#988 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_definition(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#874 + # source://ruby-lsp//lib/ruby_lsp/server.rb#878 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_diagnostic(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#423 + # source://ruby-lsp//lib/ruby_lsp/server.rb#427 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_did_change(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#412 + # source://ruby-lsp//lib/ruby_lsp/server.rb#416 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_did_close(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#373 + # source://ruby-lsp//lib/ruby_lsp/server.rb#377 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_did_open(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#665 + # source://ruby-lsp//lib/ruby_lsp/server.rb#669 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_document_highlight(message); end # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11813/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11856/lib/types/private/methods/_methods.rb#257 def text_document_document_link(*args, **_arg1, &blk); end # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11813/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11856/lib/types/private/methods/_methods.rb#257 def text_document_document_symbol(*args, **_arg1, &blk); end # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11813/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11856/lib/types/private/methods/_methods.rb#257 def text_document_folding_range(*args, **_arg1, &blk); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#621 + # source://ruby-lsp//lib/ruby_lsp/server.rb#625 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_formatting(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#704 + # source://ruby-lsp//lib/ruby_lsp/server.rb#708 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_hover(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#793 + # source://ruby-lsp//lib/ruby_lsp/server.rb#797 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_inlay_hint(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#681 + # source://ruby-lsp//lib/ruby_lsp/server.rb#685 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_on_type_formatting(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#749 + # source://ruby-lsp//lib/ruby_lsp/server.rb#753 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_prepare_rename(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1123 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1127 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_prepare_type_hierarchy(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#593 + # source://ruby-lsp//lib/ruby_lsp/server.rb#597 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_range_formatting(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#767 + # source://ruby-lsp//lib/ruby_lsp/server.rb#771 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_references(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#729 + # source://ruby-lsp//lib/ruby_lsp/server.rb#733 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_rename(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#433 + # source://ruby-lsp//lib/ruby_lsp/server.rb#437 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_selection_range(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#539 + # source://ruby-lsp//lib/ruby_lsp/server.rb#543 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_semantic_tokens_delta(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#518 + # source://ruby-lsp//lib/ruby_lsp/server.rb#522 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_semantic_tokens_full(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#564 + # source://ruby-lsp//lib/ruby_lsp/server.rb#568 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_semantic_tokens_range(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1104 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1108 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_show_syntax_tree(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#958 + # source://ruby-lsp//lib/ruby_lsp/server.rb#962 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_signature_help(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1151 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1155 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def type_hierarchy_subtypes(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1142 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1146 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def type_hierarchy_supertypes(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1312 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1316 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def window_show_message_request(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1158 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1162 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def workspace_dependencies(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1009 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1013 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def workspace_did_change_watched_files(message); end - # source://ruby-lsp//lib/ruby_lsp/server.rb#1091 + # source://ruby-lsp//lib/ruby_lsp/server.rb#1095 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def workspace_symbol(message); end end diff --git a/sorbet/rbi/gems/shopify-money@2.2.2.rbi b/sorbet/rbi/gems/shopify-money@2.2.2.rbi deleted file mode 100644 index a16ec5cc2..000000000 --- a/sorbet/rbi/gems/shopify-money@2.2.2.rbi +++ /dev/null @@ -1,1016 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `shopify-money` gem. -# Please instead update this file by running `bin/tapioca gem shopify-money`. - - -# source://shopify-money//lib/money/deprecations.rb#3 -ACTIVE_SUPPORT_DEFINED = T.let(T.unsafe(nil), String) - -# source://shopify-money//lib/money/version.rb#2 -class Money - include ::Comparable - extend ::Forwardable - - # @raise [ArgumentError] - # @return [Money] a new instance of Money - # - # source://shopify-money//lib/money/money.rb#130 - def initialize(value, currency); end - - # @raise [ArgumentError] - # - # source://shopify-money//lib/money/money.rb#187 - def *(numeric); end - - # source://shopify-money//lib/money/money.rb#173 - def +(other); end - - # source://shopify-money//lib/money/money.rb#180 - def -(other); end - - # source://shopify-money//lib/money/money.rb#162 - def -@; end - - # source://shopify-money//lib/money/money.rb#194 - def /(numeric); end - - # source://shopify-money//lib/money/money.rb#166 - def <=>(other); end - - # source://shopify-money//lib/money/money.rb#202 - def ==(other); end - - # source://shopify-money//lib/money/money.rb#278 - def abs; end - - # @see Money::Allocator#allocate - # - # source://shopify-money//lib/money/money.rb#304 - def allocate(splits, strategy = T.unsafe(nil)); end - - # @see Money::Allocator#allocate_max_amounts - # - # source://shopify-money//lib/money/money.rb#309 - def allocate_max_amounts(maximums); end - - # source://shopify-money//lib/money/money.rb#270 - def as_json(options = T.unsafe(nil)); end - - # Calculate the splits evenly without losing pennies. - # Returns the number of high and low splits and the value of the high and low splits. - # Where high represents the Money value with the extra penny - # and low a Money without the extra penny. - # - # @example - # Money.new(100, "USD").calculate_splits(3) #=> {Money.new(34) => 1, Money.new(33) => 2} - # @param number [2] of parties. - # @return [Hash] - # - # source://shopify-money//lib/money/money.rb#336 - def calculate_splits(num); end - - # Clamps the value to be within the specified minimum and maximum. Returns - # self if the value is within bounds, otherwise a new Money object with the - # closest min or max value. - # - # @example - # Money.new(50, "CAD").clamp(1, 100) #=> Money.new(50, "CAD") - # - # Money.new(120, "CAD").clamp(0, 100) #=> Money.new(100, "CAD") - # @raise [ArgumentError] - # - # source://shopify-money//lib/money/money.rb#348 - def clamp(min, max); end - - # @raise [TypeError] - # - # source://shopify-money//lib/money/money.rb#213 - def coerce(other); end - - # Returns the value of attribute currency. - # - # source://shopify-money//lib/money/money.rb#10 - def currency; end - - # source://shopify-money//lib/money/money.rb#141 - def encode_with(coder); end - - # TODO: Remove once cross-currency mathematical operations are no longer allowed - # - # @return [Boolean] - # - # source://shopify-money//lib/money/money.rb#207 - def eql?(other); end - - # source://shopify-money//lib/money/money.rb#284 - def floor; end - - # @raise [ArgumentError] - # - # source://shopify-money//lib/money/money.rb#296 - def fraction(rate); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hash(*args, **_arg1, &block); end - - # source://shopify-money//lib/money/money.rb#137 - def init_with(coder); end - - # source://shopify-money//lib/money/money.rb#198 - def inspect; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def negative?(*args, **_arg1, &block); end - - # @return [Boolean] - # - # source://shopify-money//lib/money/money.rb#158 - def no_currency?; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def nonzero?(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def positive?(*args, **_arg1, &block); end - - # source://shopify-money//lib/money/money.rb#290 - def round(ndigits = T.unsafe(nil)); end - - # Split money amongst parties evenly without losing pennies. - # - # @example - # Money.new(100, "USD").split(3) #=> Enumerable[Money.new(34), Money.new(33), Money.new(33)] - # @param number [2] of parties. - # @return [Enumerable] - # - # source://shopify-money//lib/money/money.rb#321 - def split(num); end - - # source://shopify-money//lib/money/money.rb#146 - def subunits(format: T.unsafe(nil)); end - - # source://shopify-money//lib/money/money.rb#233 - def to_d; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def to_f(*args, **_arg1, &block); end - - # source://shopify-money//lib/money/money.rb#237 - def to_formatted_s(style = T.unsafe(nil)); end - - # source://shopify-money//lib/money/money.rb#237 - def to_fs(style = T.unsafe(nil)); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def to_i(*args, **_arg1, &block); end - - # source://shopify-money//lib/money/money.rb#262 - def to_json(options = T.unsafe(nil)); end - - # source://shopify-money//lib/money/money.rb#218 - def to_money(new_currency = T.unsafe(nil)); end - - # source://shopify-money//lib/money/money.rb#237 - def to_s(style = T.unsafe(nil)); end - - # Returns the value of attribute value. - # - # source://shopify-money//lib/money/money.rb#10 - def value; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def zero?(*args, **_arg1, &block); end - - private - - # source://shopify-money//lib/money/money.rb#363 - def arithmetic(other); end - - # source://shopify-money//lib/money/money.rb#393 - def calculated_currency(other); end - - # source://shopify-money//lib/money/money.rb#383 - def ensure_compatible_currency(other_currency, msg); end - - class << self - # source://shopify-money//lib/money/deprecations.rb#5 - def active_support_deprecator; end - - # Returns the value of attribute config. - # - # source://shopify-money//lib/money/money.rb#39 - def config; end - - # Sets the attribute config - # - # @param value the value to set the attribute config to. - # - # source://shopify-money//lib/money/money.rb#39 - def config=(_arg0); end - - # @yield [config] - # - # source://shopify-money//lib/money/money.rb#42 - def configure; end - - # source://shopify-money//lib/money/money.rb#84 - def current_currency; end - - # source://shopify-money//lib/money/money.rb#88 - def current_currency=(currency); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def default_currency(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def default_currency=(*args, **_arg1, &block); end - - # source://shopify-money//lib/money/deprecations.rb#12 - def deprecate(message); end - - # source://shopify-money//lib/money/money.rb#47 - def from_amount(value = T.unsafe(nil), currency = T.unsafe(nil)); end - - # source://shopify-money//lib/money/money.rb#62 - def from_subunits(subunits, currency_iso, format: T.unsafe(nil)); end - - # source://shopify-money//lib/money/money.rb#47 - def new(value = T.unsafe(nil), currency = T.unsafe(nil)); end - - # source://shopify-money//lib/money/money.rb#77 - def rational(money1, money2); end - - # Set Money.default_currency inside the supplied block, resets it to - # the previous value when done to prevent leaking state. Similar to - # I18n.with_locale and ActiveSupport's Time.use_zone. This won't affect - # instances being created with explicitly set currency. - # - # source://shopify-money//lib/money/money.rb#96 - def with_currency(new_currency); end - - private - - # source://shopify-money//lib/money/money.rb#108 - def new_from_money(amount, currency); end - end -end - -# source://shopify-money//lib/money/allocator.rb#5 -class Money::Allocator < ::SimpleDelegator - # @return [Allocator] a new instance of Allocator - # - # source://shopify-money//lib/money/allocator.rb#6 - def initialize(money); end - - # source://shopify-money//lib/money/allocator.rb#58 - def allocate(splits, strategy = T.unsafe(nil)); end - - # Allocates money between different parties up to the maximum amounts specified. - # Left over subunits will be assigned round-robin up to the maximum specified. - # Subunits are dropped when the maximums are attained. - # - # @example - # Money.new(30.75).allocate_max_amounts([Money.new(26), Money.new(4.75)]) - # #=> [Money.new(26), Money.new(4.75)] - # - # Money.new(30.75).allocate_max_amounts([Money.new(26), Money.new(4.74)] - # #=> [Money.new(26), Money.new(4.74)] - # - # Money.new(30).allocate_max_amounts([Money.new(15), Money.new(15)] - # #=> [Money.new(15), Money.new(15)] - # - # Money.new(1).allocate_max_amounts([Money.new(33), Money.new(33), Money.new(33)]) - # #=> [Money.new(0.34), Money.new(0.33), Money.new(0.33)] - # - # Money.new(100).allocate_max_amounts([Money.new(5), Money.new(2)]) - # #=> [Money.new(5), Money.new(2)] - # - # source://shopify-money//lib/money/allocator.rb#109 - def allocate_max_amounts(maximums); end - - private - - # @return [Boolean] - # - # source://shopify-money//lib/money/allocator.rb#165 - def all_rational?(splits); end - - # @raise [ArgumentError] - # - # source://shopify-money//lib/money/allocator.rb#147 - def amounts_from_splits(allocations, splits, subunits_to_split = T.unsafe(nil)); end - - # source://shopify-money//lib/money/allocator.rb#139 - def extract_currency(money_array); end - - # Given a list of decimal numbers, return a list ordered by which is nearest to the next whole number. - # For instance, given inputs [1.1, 1.5, 1.9] the correct ranking is 2, 1, 0. This is because 1.9 is nearly 2. - # Note that we are not ranking by absolute size, we only care about the distance between our input number and - # the next whole number. Similarly, given the input [9.1, 5.5, 3.9] the correct ranking is *still* 2, 1, 0. This - # is because 3.9 is nearer to 4 than 9.1 is to 10. - # - # source://shopify-money//lib/money/allocator.rb#174 - def rank_by_nearest(amounts); end -end - -# source://shopify-money//lib/money/allocator.rb#10 -Money::Allocator::ONE = T.let(T.unsafe(nil), BigDecimal) - -# source://shopify-money//lib/money/config.rb#4 -class Money::Config - # @return [Config] a new instance of Config - # - # source://shopify-money//lib/money/config.rb#19 - def initialize; end - - # Returns the value of attribute default_currency. - # - # source://shopify-money//lib/money/config.rb#5 - def default_currency; end - - # Sets the attribute default_currency - # - # @param value the value to set the attribute default_currency to. - # - # source://shopify-money//lib/money/config.rb#5 - def default_currency=(_arg0); end - - # source://shopify-money//lib/money/config.rb#7 - def legacy_default_currency!; end - - # Returns the value of attribute legacy_deprecations. - # - # source://shopify-money//lib/money/config.rb#5 - def legacy_deprecations; end - - # source://shopify-money//lib/money/config.rb#11 - def legacy_deprecations!; end - - # Sets the attribute legacy_deprecations - # - # @param value the value to set the attribute legacy_deprecations to. - # - # source://shopify-money//lib/money/config.rb#5 - def legacy_deprecations=(_arg0); end - - # Returns the value of attribute legacy_json_format. - # - # source://shopify-money//lib/money/config.rb#5 - def legacy_json_format; end - - # source://shopify-money//lib/money/config.rb#15 - def legacy_json_format!; end - - # Sets the attribute legacy_json_format - # - # @param value the value to set the attribute legacy_json_format to. - # - # source://shopify-money//lib/money/config.rb#5 - def legacy_json_format=(_arg0); end -end - -# source://shopify-money//lib/money/currency/loader.rb#5 -class Money::Currency - # @raise [UnknownCurrency] - # @return [Currency] a new instance of Currency - # - # source://shopify-money//lib/money/currency.rb#33 - def initialize(currency_iso); end - - # @return [Boolean] - # - # source://shopify-money//lib/money/currency.rb#49 - def ==(other); end - - # @return [Boolean] - # - # source://shopify-money//lib/money/currency.rb#57 - def compatible?(other); end - - # Returns the value of attribute decimal_mark. - # - # source://shopify-money//lib/money/currency.rb#30 - def decimal_mark; end - - # Returns the value of attribute disambiguate_symbol. - # - # source://shopify-money//lib/money/currency.rb#30 - def disambiguate_symbol; end - - # @return [Boolean] - # - # source://shopify-money//lib/money/currency.rb#49 - def eql?(other); end - - # source://shopify-money//lib/money/currency.rb#53 - def hash; end - - # Returns the value of attribute iso_code. - # - # source://shopify-money//lib/money/currency.rb#30 - def iso_code; end - - # Returns the value of attribute iso_numeric. - # - # source://shopify-money//lib/money/currency.rb#30 - def iso_numeric; end - - # Returns the value of attribute minor_units. - # - # source://shopify-money//lib/money/currency.rb#30 - def minor_units; end - - # Returns the value of attribute name. - # - # source://shopify-money//lib/money/currency.rb#30 - def name; end - - # Returns the value of attribute smallest_denomination. - # - # source://shopify-money//lib/money/currency.rb#30 - def smallest_denomination; end - - # Returns the value of attribute subunit_symbol. - # - # source://shopify-money//lib/money/currency.rb#30 - def subunit_symbol; end - - # Returns the value of attribute subunit_to_unit. - # - # source://shopify-money//lib/money/currency.rb#30 - def subunit_to_unit; end - - # Returns the value of attribute symbol. - # - # source://shopify-money//lib/money/currency.rb#30 - def symbol; end - - # Returns the value of attribute iso_code. - # - # source://shopify-money//lib/money/currency.rb#30 - def to_s; end - - class << self - # source://shopify-money//lib/money/currency.rb#25 - def currencies; end - - # source://shopify-money//lib/money/currency.rb#19 - def find(currency_iso); end - - # @raise [UnknownCurrency] - # - # source://shopify-money//lib/money/currency.rb#12 - def find!(currency_iso); end - - # @raise [UnknownCurrency] - # - # source://shopify-money//lib/money/currency.rb#12 - def new(currency_iso); end - end -end - -# source://shopify-money//lib/money/currency/loader.rb#6 -module Money::Currency::Loader - class << self - # source://shopify-money//lib/money/currency/loader.rb#8 - def load_currencies; end - - private - - # source://shopify-money//lib/money/currency/loader.rb#20 - def deep_deduplicate!(data); end - end -end - -# source://shopify-money//lib/money/currency.rb#9 -class Money::Currency::UnknownCurrency < ::ArgumentError; end - -# source://shopify-money//lib/money/errors.rb#3 -class Money::Error < ::StandardError; end - -# source://shopify-money//lib/money/helpers.rb#5 -module Money::Helpers - private - - # source://shopify-money//lib/money/helpers.rb#44 - def value_to_currency(currency); end - - # source://shopify-money//lib/money/helpers.rb#16 - def value_to_decimal(num); end - - class << self - # source://shopify-money//lib/money/helpers.rb#44 - def value_to_currency(currency); end - - # source://shopify-money//lib/money/helpers.rb#16 - def value_to_decimal(num); end - end -end - -# source://shopify-money//lib/money/helpers.rb#8 -Money::Helpers::DECIMAL_ZERO = T.let(T.unsafe(nil), BigDecimal) - -# source://shopify-money//lib/money/helpers.rb#9 -Money::Helpers::MAX_DECIMAL = T.let(T.unsafe(nil), Integer) - -# source://shopify-money//lib/money/helpers.rb#11 -Money::Helpers::STRIPE_SUBUNIT_OVERRIDE = T.let(T.unsafe(nil), Hash) - -# source://shopify-money//lib/money/errors.rb#6 -class Money::IncompatibleCurrencyError < ::Money::Error; end - -# source://shopify-money//lib/money/money.rb#8 -Money::NULL_CURRENCY = T.let(T.unsafe(nil), Money::NullCurrency) - -# A placeholder currency for instances where no actual currency is available, -# as defined by ISO4217. You should rarely, if ever, need to use this -# directly. It's here mostly for backwards compatibility and for that reason -# behaves like a dollar, which is how this gem worked before the introduction -# of currency. -# -# Here follows a list of preferred alternatives over using Money with -# NullCurrency: -# -# For comparisons where you don't know the currency beforehand, you can use -# Numeric predicate methods like #positive?/#negative?/#zero?/#nonzero?. -# Comparison operators with Numeric (==, !=, <=, =>, <, >) work as well. -# -# Money with NullCurrency has behaviour that may surprise you, such as -# database validations or GraphQL enum not allowing the string representation -# of NullCurrency. Prefer using Money.new(0, currency) where possible, as -# this sidesteps these issues and provides additional currency check -# safeties. -# -# Unlike other currencies, it is allowed to calculate a Money object with -# NullCurrency with another currency. The resulting Money object will have -# the other currency. -# -# @example -# Money.new(1, 'CAD').positive? #=> true -# Money.new(2, 'CAD') >= 0 #=> true -# @example -# Money.new(0, Money::NULL_CURRENCY) + Money.new(5, 'CAD') -# #=> # -# -# source://shopify-money//lib/money/null_currency.rb#34 -class Money::NullCurrency - # @return [NullCurrency] a new instance of NullCurrency - # - # source://shopify-money//lib/money/null_currency.rb#39 - def initialize; end - - # @return [Boolean] - # - # source://shopify-money//lib/money/null_currency.rb#57 - def ==(other); end - - # @return [Boolean] - # - # source://shopify-money//lib/money/null_currency.rb#53 - def compatible?(other); end - - # Returns the value of attribute decimal_mark. - # - # source://shopify-money//lib/money/null_currency.rb#36 - def decimal_mark; end - - # Returns the value of attribute disambiguate_symbol. - # - # source://shopify-money//lib/money/null_currency.rb#36 - def disambiguate_symbol; end - - # @return [Boolean] - # - # source://shopify-money//lib/money/null_currency.rb#57 - def eql?(other); end - - # Returns the value of attribute iso_code. - # - # source://shopify-money//lib/money/null_currency.rb#36 - def iso_code; end - - # Returns the value of attribute iso_numeric. - # - # source://shopify-money//lib/money/null_currency.rb#36 - def iso_numeric; end - - # Returns the value of attribute minor_units. - # - # source://shopify-money//lib/money/null_currency.rb#36 - def minor_units; end - - # Returns the value of attribute name. - # - # source://shopify-money//lib/money/null_currency.rb#36 - def name; end - - # Returns the value of attribute smallest_denomination. - # - # source://shopify-money//lib/money/null_currency.rb#36 - def smallest_denomination; end - - # Returns the value of attribute subunit_symbol. - # - # source://shopify-money//lib/money/null_currency.rb#36 - def subunit_symbol; end - - # Returns the value of attribute subunit_to_unit. - # - # source://shopify-money//lib/money/null_currency.rb#36 - def subunit_to_unit; end - - # Returns the value of attribute symbol. - # - # source://shopify-money//lib/money/null_currency.rb#36 - def symbol; end - - # source://shopify-money//lib/money/null_currency.rb#61 - def to_s; end -end - -# source://shopify-money//lib/money/parser/fuzzy.rb#3 -module Money::Parser; end - -# source://shopify-money//lib/money/parser/accounting.rb#4 -class Money::Parser::Accounting < ::Money::Parser::Fuzzy - # source://shopify-money//lib/money/parser/accounting.rb#5 - def parse(input, currency = T.unsafe(nil), **options); end -end - -# source://shopify-money//lib/money/parser/fuzzy.rb#4 -class Money::Parser::Fuzzy - # Parses an input string and attempts to find the decimal separator based on certain heuristics, like the amount - # decimals for the fractional part a currency has or the incorrect notion a currency has a defined decimal - # separator (this is a property of the locale). While these heuristics can lead to the expected result for some - # cases, the other cases can lead to surprising results such as parsed amounts being 1000x larger than intended. - # - # @deprecated Use {LocaleAware.parse} or {Simple.parse} instead. - # @param input [String] - # @param currency [String, Money::Currency, nil] - # @param strict [Boolean] - # @raise [MoneyFormatError] - # @return [Money] - # - # source://shopify-money//lib/money/parser/fuzzy.rb#74 - def parse(input, currency = T.unsafe(nil), strict: T.unsafe(nil)); end - - private - - # source://shopify-money//lib/money/parser/fuzzy.rb#82 - def extract_amount_from_string(input, currency, strict); end - - # @return [Boolean] - # - # source://shopify-money//lib/money/parser/fuzzy.rb#143 - def last_digits_decimals?(digits, marks, currency); end - - # source://shopify-money//lib/money/parser/fuzzy.rb#132 - def normalize_number(number, marks, currency); end - - class << self - # source://shopify-money//lib/money/parser/fuzzy.rb#60 - def parse(input, currency = T.unsafe(nil), **options); end - end -end - -# 1,1123,4567.89 -# -# source://shopify-money//lib/money/parser/fuzzy.rb#51 -Money::Parser::Fuzzy::CHINESE_NUMERIC_REGEX = T.let(T.unsafe(nil), Regexp) - -# 1.234.567,89 -# -# source://shopify-money//lib/money/parser/fuzzy.rb#30 -Money::Parser::Fuzzy::COMMA_DECIMAL_REGEX = T.let(T.unsafe(nil), Regexp) - -# 1,234,567.89 -# -# source://shopify-money//lib/money/parser/fuzzy.rb#20 -Money::Parser::Fuzzy::DOT_DECIMAL_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://shopify-money//lib/money/parser/fuzzy.rb#9 -Money::Parser::Fuzzy::ESCAPED_MARKS = T.let(T.unsafe(nil), String) - -# source://shopify-money//lib/money/parser/fuzzy.rb#12 -Money::Parser::Fuzzy::ESCAPED_NON_COMMA_MARKS = T.let(T.unsafe(nil), String) - -# source://shopify-money//lib/money/parser/fuzzy.rb#11 -Money::Parser::Fuzzy::ESCAPED_NON_DOT_MARKS = T.let(T.unsafe(nil), String) - -# source://shopify-money//lib/money/parser/fuzzy.rb#10 -Money::Parser::Fuzzy::ESCAPED_NON_SPACE_MARKS = T.let(T.unsafe(nil), String) - -# 12,34,567.89 -# -# source://shopify-money//lib/money/parser/fuzzy.rb#40 -Money::Parser::Fuzzy::INDIAN_NUMERIC_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://shopify-money//lib/money/parser/fuzzy.rb#7 -Money::Parser::Fuzzy::MARKS = T.let(T.unsafe(nil), Array) - -# source://shopify-money//lib/money/parser/fuzzy.rb#5 -class Money::Parser::Fuzzy::MoneyFormatError < ::ArgumentError; end - -# source://shopify-money//lib/money/parser/fuzzy.rb#14 -Money::Parser::Fuzzy::NUMERIC_REGEX = T.let(T.unsafe(nil), Regexp) - -# source://shopify-money//lib/money/parser/locale_aware.rb#4 -class Money::Parser::LocaleAware - class << self - # The +Proc+ called to get the current locale decimal separator. In Rails apps this defaults to the same lookup - # ActionView's +number_to_currency+ helper will use to format the monetary amount for display. - # - # source://shopify-money//lib/money/parser/locale_aware.rb#10 - def decimal_separator_resolver; end - - # Set the default +Proc+ to determine the current locale decimal separator. - # - # @example - # Money::Parser::LocaleAware.decimal_separator_resolver = - # ->() { MyFormattingLibrary.current_locale.decimal.separator } - # - # source://shopify-money//lib/money/parser/locale_aware.rb#19 - def decimal_separator_resolver=(proc); end - - # Parses an input string, normalizing some non-ASCII characters to their equivalent ASCII, then discarding any - # character that is not a digit, hyphen-minus or the decimal separator. To prevent user confusion, make sure - # that formatted Money strings can be parsed back into equivalent Money objects. - # - # @param input [String] - # @param currency [String, Money::Currency] - # @param strict [Boolean] - # @param decimal_separator [String] - # @raise [ArgumentError] - # @return [Money, nil] - # - # source://shopify-money//lib/money/parser/locale_aware.rb#32 - def parse(input, currency, strict: T.unsafe(nil), decimal_separator: T.unsafe(nil)); end - end -end - -# source://shopify-money//lib/money/parser/simple.rb#4 -class Money::Parser::Simple - class << self - # Parses an input string using BigDecimal, it always expects a dot character as a decimal separator and - # generally does not accept other characters other than minus-hyphen and digits. It is useful for APIs, interop - # with other languages and other use cases where you expect well-formatted input and do not need to take user - # locale into consideration. - # - # @param input [String] - # @param currency [String, Money::Currency] - # @param strict [Boolean] - # @return [Money, nil] - # - # source://shopify-money//lib/money/parser/simple.rb#16 - def parse(input, currency, strict: T.unsafe(nil)); end - end -end - -# source://shopify-money//lib/money/parser/simple.rb#5 -Money::Parser::Simple::SIGNED_DECIMAL_MATCHER = T.let(T.unsafe(nil), Regexp) - -# source://shopify-money//lib/money/railtie.rb#4 -class Money::Railtie < ::Rails::Railtie; end - -# source://shopify-money//lib/money/money.rb#13 -class Money::ReverseOperationProxy - include ::Comparable - - # @return [ReverseOperationProxy] a new instance of ReverseOperationProxy - # - # source://shopify-money//lib/money/money.rb#16 - def initialize(value); end - - # source://shopify-money//lib/money/money.rb#32 - def *(other); end - - # source://shopify-money//lib/money/money.rb#24 - def +(other); end - - # source://shopify-money//lib/money/money.rb#28 - def -(other); end - - # source://shopify-money//lib/money/money.rb#20 - def <=>(other); end -end - -# source://shopify-money//lib/money/splitter.rb#4 -class Money::Splitter - include ::Enumerable - - # @raise [ArgumentError] - # @return [Splitter] a new instance of Splitter - # - # source://shopify-money//lib/money/splitter.rb#7 - def initialize(money, num); end - - # source://shopify-money//lib/money/splitter.rb#76 - def [](index); end - - # source://shopify-money//lib/money/splitter.rb#95 - def each(&block); end - - # source://shopify-money//lib/money/splitter.rb#33 - def first(count = T.unsafe(nil)); end - - # source://shopify-money//lib/money/splitter.rb#54 - def last(count = T.unsafe(nil)); end - - # source://shopify-money//lib/money/splitter.rb#103 - def reverse; end - - # source://shopify-money//lib/money/splitter.rb#87 - def reverse_each(&block); end - - # source://shopify-money//lib/money/splitter.rb#109 - def size; end - - # source://shopify-money//lib/money/splitter.rb#16 - def split; end - - def to_ary(*_arg0); end - - protected - - # Sets the attribute split - # - # @param value the value to set the attribute split to. - # - # source://shopify-money//lib/money/splitter.rb#14 - def split=(_arg0); end -end - -# source://shopify-money//lib/money/version.rb#3 -Money::VERSION = T.let(T.unsafe(nil), String) - -# source://shopify-money//lib/money_column/active_record_hooks.rb#2 -module MoneyColumn; end - -# source://shopify-money//lib/money_column/active_record_hooks.rb#5 -module MoneyColumn::ActiveRecordHooks - mixes_in_class_methods ::MoneyColumn::ActiveRecordHooks::ClassMethods - - # source://shopify-money//lib/money_column/active_record_hooks.rb#10 - def reload(*_arg0); end - - private - - # source://shopify-money//lib/money_column/active_record_hooks.rb#22 - def clear_money_column_cache; end - - # source://shopify-money//lib/money_column/active_record_hooks.rb#26 - def init_internals; end - - # source://shopify-money//lib/money_column/active_record_hooks.rb#15 - def initialize_dup(*_arg0); end - - # source://shopify-money//lib/money_column/active_record_hooks.rb#31 - def read_money_attribute(column); end - - # source://shopify-money//lib/money_column/active_record_hooks.rb#44 - def write_money_attribute(column, money); end - - class << self - # @private - # - # source://shopify-money//lib/money_column/active_record_hooks.rb#6 - def included(base); end - end -end - -# source://shopify-money//lib/money_column/active_record_hooks.rb#75 -module MoneyColumn::ActiveRecordHooks::ClassMethods - # source://shopify-money//lib/money_column/active_record_hooks.rb#78 - def money_column(*columns, currency_column: T.unsafe(nil), currency: T.unsafe(nil), currency_read_only: T.unsafe(nil), coerce_null: T.unsafe(nil)); end - - # Returns the value of attribute money_column_options. - # - # source://shopify-money//lib/money_column/active_record_hooks.rb#76 - def money_column_options; end - - private - - # source://shopify-money//lib/money_column/active_record_hooks.rb#126 - def clear_cache_on_currency_change(currency_column); end - - # source://shopify-money//lib/money_column/active_record_hooks.rb#135 - def inherited(subclass); end - - # @raise [ArgumentError] - # - # source://shopify-money//lib/money_column/active_record_hooks.rb#111 - def normalize_money_column_options(options); end -end - -# source://shopify-money//lib/money_column/active_record_type.rb#2 -class MoneyColumn::ActiveRecordType < ::ActiveModel::Type::Decimal - # source://shopify-money//lib/money_column/active_record_type.rb#3 - def serialize(money); end -end - -# source://shopify-money//lib/money_column/active_record_hooks.rb#3 -class MoneyColumn::CurrencyReadOnlyError < ::StandardError; end - -# source://shopify-money//lib/money_column/railtie.rb#3 -class MoneyColumn::Railtie < ::Rails::Railtie; end - -# Allows Writing of 100.to_money for +Numeric+ types -# 100.to_money => # -# 100.37.to_money => # -# -# source://shopify-money//lib/money/core_extensions.rb#5 -class Numeric - include ::Comparable - - # source://shopify-money//lib/money/core_extensions.rb#6 - def to_money(currency = T.unsafe(nil)); end -end - -# source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#3 -module RuboCop; end - -# source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#4 -module RuboCop::Cop; end - -# source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#5 -module RuboCop::Cop::Money; end - -# source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#6 -class RuboCop::Cop::Money::MissingCurrency < ::RuboCop::Cop::Cop - # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#48 - def autocorrect(node); end - - # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#22 - def money_new(param0 = T.unsafe(nil)); end - - # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#34 - def on_csend(node); end - - # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#34 - def on_send(node); end - - # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#30 - def to_money_block?(param0 = T.unsafe(nil)); end - - # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#26 - def to_money_without_currency?(param0 = T.unsafe(nil)); end - - private - - # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#74 - def replacement_currency; end -end - -# source://shopify-money//lib/rubocop/cop/money/zero_money.rb#6 -class RuboCop::Cop::Money::ZeroMoney < ::RuboCop::Cop::Cop - # source://shopify-money//lib/rubocop/cop/money/zero_money.rb#39 - def autocorrect(node); end - - # source://shopify-money//lib/rubocop/cop/money/zero_money.rb#29 - def money_zero(param0 = T.unsafe(nil)); end - - # source://shopify-money//lib/rubocop/cop/money/zero_money.rb#33 - def on_send(node); end - - private - - # source://shopify-money//lib/rubocop/cop/money/zero_money.rb#56 - def replacement_currency(currency_arg); end -end - -# `Money.zero` and it's alias `empty`, with or without currency -# argument is removed in favour of the more explicit Money.new -# syntax. Supplying it with a real currency is preferred for -# additional currency safety checks. -# -# If no currency was supplied, it defaults to -# Money::NULL_CURRENCY which was the default setting of -# Money.default_currency and should effectively be the same. The cop -# can be configured with a ReplacementCurrency in case that is more -# appropriate for your application. -# -# @example -# -# # bad -# Money.zero -# -# # good when configured with `ReplacementCurrency: CAD` -# Money.new(0, 'CAD') -# -# source://shopify-money//lib/rubocop/cop/money/zero_money.rb#27 -RuboCop::Cop::Money::ZeroMoney::MSG = T.let(T.unsafe(nil), String) - -# Allows Writing of '100'.to_money for +String+ types -# Excess characters will be discarded -# '100'.to_money => # -# '100.37'.to_money => # -# -# source://shopify-money//lib/money/core_extensions.rb#15 -class String - include ::Comparable - - # source://shopify-money//lib/money/core_extensions.rb#16 - def to_money(currency = T.unsafe(nil)); end -end diff --git a/sorbet/rbi/gems/shopify-money@3.0.0.rbi b/sorbet/rbi/gems/shopify-money@3.0.1.rbi similarity index 74% rename from sorbet/rbi/gems/shopify-money@3.0.0.rbi rename to sorbet/rbi/gems/shopify-money@3.0.1.rbi index 7451e77ff..8bcfa61ae 100644 --- a/sorbet/rbi/gems/shopify-money@3.0.0.rbi +++ b/sorbet/rbi/gems/shopify-money@3.0.1.rbi @@ -5,7 +5,7 @@ # Please instead update this file by running `bin/tapioca gem shopify-money`. -# source://shopify-money//lib/money/deprecations.rb#3 +# source://shopify-money//lib/money/deprecations.rb#4 ACTIVE_SUPPORT_DEFINED = T.let(T.unsafe(nil), String) class ActiveRecord::Base @@ -17,7 +17,10 @@ class ActiveRecord::Base extend ::MoneyColumn::ActiveRecordHooks::ClassMethods end -# source://shopify-money//lib/money/version.rb#2 +# source://shopify-money//lib/money/deprecations.rb#5 +DEPRECATION_STACKTRACE_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://shopify-money//lib/money/version.rb#3 class Money include ::Comparable extend ::Forwardable @@ -25,46 +28,46 @@ class Money # @raise [ArgumentError] # @return [Money] a new instance of Money # - # source://shopify-money//lib/money/money.rb#130 + # source://shopify-money//lib/money/money.rb#149 def initialize(value, currency); end # @raise [ArgumentError] # - # source://shopify-money//lib/money/money.rb#187 - def *(numeric); end + # source://shopify-money//lib/money/money.rb#206 + def *(other); end - # source://shopify-money//lib/money/money.rb#173 + # source://shopify-money//lib/money/money.rb#192 def +(other); end - # source://shopify-money//lib/money/money.rb#180 + # source://shopify-money//lib/money/money.rb#199 def -(other); end - # source://shopify-money//lib/money/money.rb#162 + # source://shopify-money//lib/money/money.rb#181 def -@; end - # source://shopify-money//lib/money/money.rb#194 - def /(numeric); end + # source://shopify-money//lib/money/money.rb#213 + def /(other); end - # source://shopify-money//lib/money/money.rb#166 + # source://shopify-money//lib/money/money.rb#185 def <=>(other); end - # source://shopify-money//lib/money/money.rb#202 + # source://shopify-money//lib/money/money.rb#221 def ==(other); end - # source://shopify-money//lib/money/money.rb#282 + # source://shopify-money//lib/money/money.rb#304 def abs; end # @see Money::Allocator#allocate # - # source://shopify-money//lib/money/money.rb#308 + # source://shopify-money//lib/money/money.rb#330 def allocate(splits, strategy = T.unsafe(nil)); end # @see Money::Allocator#allocate_max_amounts # - # source://shopify-money//lib/money/money.rb#313 + # source://shopify-money//lib/money/money.rb#335 def allocate_max_amounts(maximums); end - # source://shopify-money//lib/money/money.rb#274 + # source://shopify-money//lib/money/money.rb#295 def as_json(options = T.unsafe(nil)); end # Calculate the splits evenly without losing pennies. @@ -77,7 +80,7 @@ class Money # @param number [2] of parties. # @return [Hash] # - # source://shopify-money//lib/money/money.rb#340 + # source://shopify-money//lib/money/money.rb#362 def calculate_splits(num); end # Clamps the value to be within the specified minimum and maximum. Returns @@ -90,47 +93,47 @@ class Money # Money.new(120, "CAD").clamp(0, 100) #=> Money.new(100, "CAD") # @raise [ArgumentError] # - # source://shopify-money//lib/money/money.rb#352 + # source://shopify-money//lib/money/money.rb#374 def clamp(min, max); end # @raise [TypeError] # - # source://shopify-money//lib/money/money.rb#213 + # source://shopify-money//lib/money/money.rb#232 def coerce(other); end - # source://shopify-money//lib/money/money.rb#218 + # source://shopify-money//lib/money/money.rb#237 def convert_currency(exchange_rate, new_currency); end # Returns the value of attribute currency. # - # source://shopify-money//lib/money/money.rb#10 + # source://shopify-money//lib/money/money.rb#12 def currency; end - # source://shopify-money//lib/money/money.rb#141 + # source://shopify-money//lib/money/money.rb#160 def encode_with(coder); end # TODO: Remove once cross-currency mathematical operations are no longer allowed # # @return [Boolean] # - # source://shopify-money//lib/money/money.rb#207 + # source://shopify-money//lib/money/money.rb#226 def eql?(other); end - # source://shopify-money//lib/money/money.rb#288 + # source://shopify-money//lib/money/money.rb#310 def floor; end # @raise [ArgumentError] # - # source://shopify-money//lib/money/money.rb#300 + # source://shopify-money//lib/money/money.rb#322 def fraction(rate); end # source://forwardable/1.3.3/forwardable.rb#231 def hash(*args, **_arg1, &block); end - # source://shopify-money//lib/money/money.rb#137 + # source://shopify-money//lib/money/money.rb#156 def init_with(coder); end - # source://shopify-money//lib/money/money.rb#198 + # source://shopify-money//lib/money/money.rb#217 def inspect; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -138,7 +141,7 @@ class Money # @return [Boolean] # - # source://shopify-money//lib/money/money.rb#158 + # source://shopify-money//lib/money/money.rb#177 def no_currency?; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -147,7 +150,7 @@ class Money # source://forwardable/1.3.3/forwardable.rb#231 def positive?(*args, **_arg1, &block); end - # source://shopify-money//lib/money/money.rb#294 + # source://shopify-money//lib/money/money.rb#316 def round(ndigits = T.unsafe(nil)); end # Split money amongst parties evenly without losing pennies. @@ -157,39 +160,42 @@ class Money # @param number [2] of parties. # @return [Enumerable] # - # source://shopify-money//lib/money/money.rb#325 + # source://shopify-money//lib/money/money.rb#347 def split(num); end - # source://shopify-money//lib/money/money.rb#146 + # source://shopify-money//lib/money/money.rb#165 def subunits(format: T.unsafe(nil)); end - # source://shopify-money//lib/money/money.rb#237 + # source://shopify-money//lib/money/money.rb#258 def to_d; end # source://forwardable/1.3.3/forwardable.rb#231 def to_f(*args, **_arg1, &block); end - # source://shopify-money//lib/money/money.rb#241 + # source://shopify-money//lib/money/money.rb#262 def to_formatted_s(style = T.unsafe(nil)); end - # source://shopify-money//lib/money/money.rb#241 + # source://shopify-money//lib/money/money.rb#262 def to_fs(style = T.unsafe(nil)); end + # source://shopify-money//lib/money/money.rb#295 + def to_h(options = T.unsafe(nil)); end + # source://forwardable/1.3.3/forwardable.rb#231 def to_i(*args, **_arg1, &block); end - # source://shopify-money//lib/money/money.rb#266 + # source://shopify-money//lib/money/money.rb#287 def to_json(options = T.unsafe(nil)); end - # source://shopify-money//lib/money/money.rb#222 + # source://shopify-money//lib/money/money.rb#241 def to_money(new_currency = T.unsafe(nil)); end - # source://shopify-money//lib/money/money.rb#241 + # source://shopify-money//lib/money/money.rb#262 def to_s(style = T.unsafe(nil)); end # Returns the value of attribute value. # - # source://shopify-money//lib/money/money.rb#10 + # source://shopify-money//lib/money/money.rb#12 def value; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -197,40 +203,37 @@ class Money private - # source://shopify-money//lib/money/money.rb#367 + # source://shopify-money//lib/money/money.rb#389 def arithmetic(other); end - # source://shopify-money//lib/money/money.rb#392 + # source://shopify-money//lib/money/money.rb#416 def calculated_currency(other); end - # source://shopify-money//lib/money/money.rb#382 + # source://shopify-money//lib/money/money.rb#406 def ensure_compatible_currency(other_currency, msg); end class << self - # source://shopify-money//lib/money/deprecations.rb#5 + # source://shopify-money//lib/money/deprecations.rb#7 def active_support_deprecator; end - # Returns the value of attribute config. - # - # source://shopify-money//lib/money/money.rb#39 + # source://shopify-money//lib/money/deprecations.rb#24 + def caller_stack; end + + # source://shopify-money//lib/money/money.rb#44 def config; end - # Sets the attribute config - # - # @param value the value to set the attribute config to. - # - # source://shopify-money//lib/money/money.rb#39 - def config=(_arg0); end + # source://shopify-money//lib/money/money.rb#48 + def config=(config); end # @yield [config] # - # source://shopify-money//lib/money/money.rb#42 + # source://shopify-money//lib/money/money.rb#52 def configure; end - # source://shopify-money//lib/money/money.rb#84 + # source://shopify-money//lib/money/money.rb#103 def current_currency; end - # source://shopify-money//lib/money/money.rb#88 + # source://shopify-money//lib/money/money.rb#107 def current_currency=(currency); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -239,19 +242,25 @@ class Money # source://forwardable/1.3.3/forwardable.rb#231 def default_currency=(*args, **_arg1, &block); end - # source://shopify-money//lib/money/deprecations.rb#12 + # source://shopify-money//lib/money/deprecations.rb#14 def deprecate(message); end - # source://shopify-money//lib/money/money.rb#47 + # source://shopify-money//lib/money/money.rb#56 def from_amount(value = T.unsafe(nil), currency = T.unsafe(nil)); end - # source://shopify-money//lib/money/money.rb#62 + # source://shopify-money//lib/money/money.rb#91 + def from_hash(hash); end + + # source://shopify-money//lib/money/money.rb#86 + def from_json(string); end + + # source://shopify-money//lib/money/money.rb#71 def from_subunits(subunits, currency_iso, format: T.unsafe(nil)); end - # source://shopify-money//lib/money/money.rb#47 + # source://shopify-money//lib/money/money.rb#56 def new(value = T.unsafe(nil), currency = T.unsafe(nil)); end - # source://shopify-money//lib/money/money.rb#77 + # source://shopify-money//lib/money/money.rb#96 def rational(money1, money2); end # Set Money.default_currency inside the supplied block, resets it to @@ -259,24 +268,27 @@ class Money # I18n.with_locale and ActiveSupport's Time.use_zone. This won't affect # instances being created with explicitly set currency. # - # source://shopify-money//lib/money/money.rb#96 + # source://shopify-money//lib/money/money.rb#115 def with_currency(new_currency); end + # source://forwardable/1.3.3/forwardable.rb#231 + def without_legacy_deprecations(*args, **_arg1, &block); end + private - # source://shopify-money//lib/money/money.rb#108 + # source://shopify-money//lib/money/money.rb#125 def new_from_money(amount, currency); end end end -# source://shopify-money//lib/money/allocator.rb#5 +# source://shopify-money//lib/money/allocator.rb#6 class Money::Allocator < ::SimpleDelegator # @return [Allocator] a new instance of Allocator # - # source://shopify-money//lib/money/allocator.rb#6 + # source://shopify-money//lib/money/allocator.rb#7 def initialize(money); end - # source://shopify-money//lib/money/allocator.rb#58 + # source://shopify-money//lib/money/allocator.rb#59 def allocate(splits, strategy = T.unsafe(nil)); end # Allocates money between different parties up to the maximum amounts specified. @@ -299,22 +311,22 @@ class Money::Allocator < ::SimpleDelegator # Money.new(100).allocate_max_amounts([Money.new(5), Money.new(2)]) # #=> [Money.new(5), Money.new(2)] # - # source://shopify-money//lib/money/allocator.rb#109 + # source://shopify-money//lib/money/allocator.rb#110 def allocate_max_amounts(maximums); end private # @return [Boolean] # - # source://shopify-money//lib/money/allocator.rb#165 + # source://shopify-money//lib/money/allocator.rb#169 def all_rational?(splits); end # @raise [ArgumentError] # - # source://shopify-money//lib/money/allocator.rb#147 + # source://shopify-money//lib/money/allocator.rb#151 def amounts_from_splits(allocations, splits, subunits_to_split = T.unsafe(nil)); end - # source://shopify-money//lib/money/allocator.rb#139 + # source://shopify-money//lib/money/allocator.rb#140 def extract_currency(money_array); end # Given a list of decimal numbers, return a list ordered by which is nearest to the next whole number. @@ -323,11 +335,11 @@ class Money::Allocator < ::SimpleDelegator # the next whole number. Similarly, given the input [9.1, 5.5, 3.9] the correct ranking is *still* 2, 1, 0. This # is because 3.9 is nearer to 4 than 9.1 is to 10. # - # source://shopify-money//lib/money/allocator.rb#174 + # source://shopify-money//lib/money/allocator.rb#178 def rank_by_nearest(amounts); end end -# source://shopify-money//lib/money/allocator.rb#10 +# source://shopify-money//lib/money/allocator.rb#11 Money::Allocator::ONE = T.let(T.unsafe(nil), BigDecimal) # source://shopify-money//lib/money/config.rb#4 @@ -381,159 +393,154 @@ class Money::Config # # source://shopify-money//lib/money/config.rb#5 def legacy_json_format=(_arg0); end + + # source://shopify-money//lib/money/config.rb#25 + def without_legacy_deprecations(&block); end end -# source://shopify-money//lib/money/currency/loader.rb#5 +# source://shopify-money//lib/money/currency/loader.rb#6 class Money::Currency # @raise [UnknownCurrency] # @return [Currency] a new instance of Currency # - # source://shopify-money//lib/money/currency.rb#33 + # source://shopify-money//lib/money/currency.rb#42 def initialize(currency_iso); end # @return [Boolean] # - # source://shopify-money//lib/money/currency.rb#49 + # source://shopify-money//lib/money/currency.rb#58 def ==(other); end # @return [Boolean] # - # source://shopify-money//lib/money/currency.rb#57 + # source://shopify-money//lib/money/currency.rb#66 def compatible?(other); end # Returns the value of attribute decimal_mark. # - # source://shopify-money//lib/money/currency.rb#30 + # source://shopify-money//lib/money/currency.rb#31 def decimal_mark; end # Returns the value of attribute disambiguate_symbol. # - # source://shopify-money//lib/money/currency.rb#30 + # source://shopify-money//lib/money/currency.rb#31 def disambiguate_symbol; end # @return [Boolean] # - # source://shopify-money//lib/money/currency.rb#49 + # source://shopify-money//lib/money/currency.rb#58 def eql?(other); end - # source://shopify-money//lib/money/currency.rb#53 + # source://shopify-money//lib/money/currency.rb#62 def hash; end # Returns the value of attribute iso_code. # - # source://shopify-money//lib/money/currency.rb#30 + # source://shopify-money//lib/money/currency.rb#31 def iso_code; end # Returns the value of attribute iso_numeric. # - # source://shopify-money//lib/money/currency.rb#30 + # source://shopify-money//lib/money/currency.rb#31 def iso_numeric; end # Returns the value of attribute minor_units. # - # source://shopify-money//lib/money/currency.rb#30 + # source://shopify-money//lib/money/currency.rb#31 def minor_units; end # Returns the value of attribute name. # - # source://shopify-money//lib/money/currency.rb#30 + # source://shopify-money//lib/money/currency.rb#31 def name; end # Returns the value of attribute smallest_denomination. # - # source://shopify-money//lib/money/currency.rb#30 + # source://shopify-money//lib/money/currency.rb#31 def smallest_denomination; end # Returns the value of attribute subunit_symbol. # - # source://shopify-money//lib/money/currency.rb#30 + # source://shopify-money//lib/money/currency.rb#31 def subunit_symbol; end # Returns the value of attribute subunit_to_unit. # - # source://shopify-money//lib/money/currency.rb#30 + # source://shopify-money//lib/money/currency.rb#31 def subunit_to_unit; end # Returns the value of attribute symbol. # - # source://shopify-money//lib/money/currency.rb#30 + # source://shopify-money//lib/money/currency.rb#31 def symbol; end # Returns the value of attribute iso_code. # - # source://shopify-money//lib/money/currency.rb#30 + # source://shopify-money//lib/money/currency.rb#31 def to_s; end class << self - # source://shopify-money//lib/money/currency.rb#25 + # source://shopify-money//lib/money/currency.rb#26 def currencies; end - # source://shopify-money//lib/money/currency.rb#19 + # source://shopify-money//lib/money/currency.rb#20 def find(currency_iso); end # @raise [UnknownCurrency] # - # source://shopify-money//lib/money/currency.rb#12 + # source://shopify-money//lib/money/currency.rb#13 def find!(currency_iso); end # @raise [UnknownCurrency] # - # source://shopify-money//lib/money/currency.rb#12 + # source://shopify-money//lib/money/currency.rb#13 def new(currency_iso); end end end -# source://shopify-money//lib/money/currency/loader.rb#6 +# source://shopify-money//lib/money/currency/loader.rb#7 module Money::Currency::Loader class << self - # source://shopify-money//lib/money/currency/loader.rb#8 + # source://shopify-money//lib/money/currency/loader.rb#9 def load_currencies; end private - # source://shopify-money//lib/money/currency/loader.rb#20 + # source://shopify-money//lib/money/currency/loader.rb#21 def deep_deduplicate!(data); end end end -# source://shopify-money//lib/money/currency.rb#9 +# source://shopify-money//lib/money/currency.rb#10 class Money::Currency::UnknownCurrency < ::ArgumentError; end -# source://shopify-money//lib/money/errors.rb#3 +# source://shopify-money//lib/money/errors.rb#4 class Money::Error < ::StandardError; end -# source://shopify-money//lib/money/helpers.rb#5 +# source://shopify-money//lib/money/helpers.rb#6 module Money::Helpers - private + extend ::Money::Helpers - # source://shopify-money//lib/money/helpers.rb#40 + # source://shopify-money//lib/money/helpers.rb#41 def value_to_currency(currency); end - # source://shopify-money//lib/money/helpers.rb#16 + # source://shopify-money//lib/money/helpers.rb#17 def value_to_decimal(num); end - - class << self - # source://shopify-money//lib/money/helpers.rb#40 - def value_to_currency(currency); end - - # source://shopify-money//lib/money/helpers.rb#16 - def value_to_decimal(num); end - end end -# source://shopify-money//lib/money/helpers.rb#8 +# source://shopify-money//lib/money/helpers.rb#9 Money::Helpers::DECIMAL_ZERO = T.let(T.unsafe(nil), BigDecimal) -# source://shopify-money//lib/money/helpers.rb#9 +# source://shopify-money//lib/money/helpers.rb#10 Money::Helpers::MAX_DECIMAL = T.let(T.unsafe(nil), Integer) -# source://shopify-money//lib/money/helpers.rb#11 +# source://shopify-money//lib/money/helpers.rb#12 Money::Helpers::STRIPE_SUBUNIT_OVERRIDE = T.let(T.unsafe(nil), Hash) -# source://shopify-money//lib/money/errors.rb#6 +# source://shopify-money//lib/money/errors.rb#7 class Money::IncompatibleCurrencyError < ::Money::Error; end -# source://shopify-money//lib/money/money.rb#8 +# source://shopify-money//lib/money/money.rb#10 Money::NULL_CURRENCY = T.let(T.unsafe(nil), Money::NullCurrency) # A placeholder currency for instances where no actual currency is available, @@ -566,21 +573,21 @@ Money::NULL_CURRENCY = T.let(T.unsafe(nil), Money::NullCurrency) # Money.new(0, Money::NULL_CURRENCY) + Money.new(5, 'CAD') # #=> # # -# source://shopify-money//lib/money/null_currency.rb#34 +# source://shopify-money//lib/money/null_currency.rb#35 class Money::NullCurrency # @return [NullCurrency] a new instance of NullCurrency # - # source://shopify-money//lib/money/null_currency.rb#39 + # source://shopify-money//lib/money/null_currency.rb#47 def initialize; end # @return [Boolean] # - # source://shopify-money//lib/money/null_currency.rb#57 + # source://shopify-money//lib/money/null_currency.rb#65 def ==(other); end # @return [Boolean] # - # source://shopify-money//lib/money/null_currency.rb#53 + # source://shopify-money//lib/money/null_currency.rb#61 def compatible?(other); end # Returns the value of attribute decimal_mark. @@ -595,7 +602,7 @@ class Money::NullCurrency # @return [Boolean] # - # source://shopify-money//lib/money/null_currency.rb#57 + # source://shopify-money//lib/money/null_currency.rb#65 def eql?(other); end # Returns the value of attribute iso_code. @@ -638,20 +645,20 @@ class Money::NullCurrency # source://shopify-money//lib/money/null_currency.rb#36 def symbol; end - # source://shopify-money//lib/money/null_currency.rb#61 + # source://shopify-money//lib/money/null_currency.rb#69 def to_s; end end -# source://shopify-money//lib/money/parser/fuzzy.rb#3 +# source://shopify-money//lib/money/parser/fuzzy.rb#4 module Money::Parser; end -# source://shopify-money//lib/money/parser/accounting.rb#4 +# source://shopify-money//lib/money/parser/accounting.rb#5 class Money::Parser::Accounting < ::Money::Parser::Fuzzy - # source://shopify-money//lib/money/parser/accounting.rb#5 + # source://shopify-money//lib/money/parser/accounting.rb#6 def parse(input, currency = T.unsafe(nil), **options); end end -# source://shopify-money//lib/money/parser/fuzzy.rb#4 +# source://shopify-money//lib/money/parser/fuzzy.rb#5 class Money::Parser::Fuzzy # Parses an input string and attempts to find the decimal separator based on certain heuristics, like the amount # decimals for the fractional part a currency has or the incorrect notion a currency has a defined decimal @@ -665,76 +672,76 @@ class Money::Parser::Fuzzy # @raise [MoneyFormatError] # @return [Money] # - # source://shopify-money//lib/money/parser/fuzzy.rb#74 + # source://shopify-money//lib/money/parser/fuzzy.rb#75 def parse(input, currency = T.unsafe(nil), strict: T.unsafe(nil)); end private - # source://shopify-money//lib/money/parser/fuzzy.rb#82 + # source://shopify-money//lib/money/parser/fuzzy.rb#83 def extract_amount_from_string(input, currency, strict); end # @return [Boolean] # - # source://shopify-money//lib/money/parser/fuzzy.rb#140 + # source://shopify-money//lib/money/parser/fuzzy.rb#141 def last_digits_decimals?(digits, marks, currency); end - # source://shopify-money//lib/money/parser/fuzzy.rb#129 + # source://shopify-money//lib/money/parser/fuzzy.rb#130 def normalize_number(number, marks, currency); end class << self - # source://shopify-money//lib/money/parser/fuzzy.rb#60 + # source://shopify-money//lib/money/parser/fuzzy.rb#61 def parse(input, currency = T.unsafe(nil), **options); end end end # 1,1123,4567.89 # -# source://shopify-money//lib/money/parser/fuzzy.rb#51 +# source://shopify-money//lib/money/parser/fuzzy.rb#52 Money::Parser::Fuzzy::CHINESE_NUMERIC_REGEX = T.let(T.unsafe(nil), Regexp) # 1.234.567,89 # -# source://shopify-money//lib/money/parser/fuzzy.rb#30 +# source://shopify-money//lib/money/parser/fuzzy.rb#31 Money::Parser::Fuzzy::COMMA_DECIMAL_REGEX = T.let(T.unsafe(nil), Regexp) # 1,234,567.89 # -# source://shopify-money//lib/money/parser/fuzzy.rb#20 +# source://shopify-money//lib/money/parser/fuzzy.rb#21 Money::Parser::Fuzzy::DOT_DECIMAL_REGEX = T.let(T.unsafe(nil), Regexp) -# source://shopify-money//lib/money/parser/fuzzy.rb#9 +# source://shopify-money//lib/money/parser/fuzzy.rb#10 Money::Parser::Fuzzy::ESCAPED_MARKS = T.let(T.unsafe(nil), String) -# source://shopify-money//lib/money/parser/fuzzy.rb#12 +# source://shopify-money//lib/money/parser/fuzzy.rb#13 Money::Parser::Fuzzy::ESCAPED_NON_COMMA_MARKS = T.let(T.unsafe(nil), String) -# source://shopify-money//lib/money/parser/fuzzy.rb#11 +# source://shopify-money//lib/money/parser/fuzzy.rb#12 Money::Parser::Fuzzy::ESCAPED_NON_DOT_MARKS = T.let(T.unsafe(nil), String) -# source://shopify-money//lib/money/parser/fuzzy.rb#10 +# source://shopify-money//lib/money/parser/fuzzy.rb#11 Money::Parser::Fuzzy::ESCAPED_NON_SPACE_MARKS = T.let(T.unsafe(nil), String) # 12,34,567.89 # -# source://shopify-money//lib/money/parser/fuzzy.rb#40 +# source://shopify-money//lib/money/parser/fuzzy.rb#41 Money::Parser::Fuzzy::INDIAN_NUMERIC_REGEX = T.let(T.unsafe(nil), Regexp) -# source://shopify-money//lib/money/parser/fuzzy.rb#7 +# source://shopify-money//lib/money/parser/fuzzy.rb#8 Money::Parser::Fuzzy::MARKS = T.let(T.unsafe(nil), Array) -# source://shopify-money//lib/money/parser/fuzzy.rb#5 +# source://shopify-money//lib/money/parser/fuzzy.rb#6 class Money::Parser::Fuzzy::MoneyFormatError < ::ArgumentError; end -# source://shopify-money//lib/money/parser/fuzzy.rb#14 +# source://shopify-money//lib/money/parser/fuzzy.rb#15 Money::Parser::Fuzzy::NUMERIC_REGEX = T.let(T.unsafe(nil), Regexp) -# source://shopify-money//lib/money/parser/locale_aware.rb#4 +# source://shopify-money//lib/money/parser/locale_aware.rb#5 class Money::Parser::LocaleAware class << self # The +Proc+ called to get the current locale decimal separator. In Rails apps this defaults to the same lookup # ActionView's +number_to_currency+ helper will use to format the monetary amount for display. # - # source://shopify-money//lib/money/parser/locale_aware.rb#10 + # source://shopify-money//lib/money/parser/locale_aware.rb#11 def decimal_separator_resolver; end # Set the default +Proc+ to determine the current locale decimal separator. @@ -743,8 +750,8 @@ class Money::Parser::LocaleAware # Money::Parser::LocaleAware.decimal_separator_resolver = # ->() { MyFormattingLibrary.current_locale.decimal.separator } # - # source://shopify-money//lib/money/parser/locale_aware.rb#19 - def decimal_separator_resolver=(proc); end + # source://shopify-money//lib/money/parser/locale_aware.rb#18 + def decimal_separator_resolver=(_arg0); end # Parses an input string, normalizing some non-ASCII characters to their equivalent ASCII, then discarding any # character that is not a digit, hyphen-minus or the decimal separator. To prevent user confusion, make sure @@ -757,12 +764,12 @@ class Money::Parser::LocaleAware # @raise [ArgumentError] # @return [Money, nil] # - # source://shopify-money//lib/money/parser/locale_aware.rb#32 + # source://shopify-money//lib/money/parser/locale_aware.rb#29 def parse(input, currency, strict: T.unsafe(nil), decimal_separator: T.unsafe(nil)); end end end -# source://shopify-money//lib/money/parser/simple.rb#4 +# source://shopify-money//lib/money/parser/simple.rb#5 class Money::Parser::Simple class << self # Parses an input string using BigDecimal, it always expects a dot character as a decimal separator and @@ -775,36 +782,36 @@ class Money::Parser::Simple # @param strict [Boolean] # @return [Money, nil] # - # source://shopify-money//lib/money/parser/simple.rb#16 + # source://shopify-money//lib/money/parser/simple.rb#17 def parse(input, currency, strict: T.unsafe(nil)); end end end -# source://shopify-money//lib/money/parser/simple.rb#5 +# source://shopify-money//lib/money/parser/simple.rb#6 Money::Parser::Simple::SIGNED_DECIMAL_MATCHER = T.let(T.unsafe(nil), Regexp) # source://shopify-money//lib/money/railtie.rb#4 class Money::Railtie < ::Rails::Railtie; end -# source://shopify-money//lib/money/money.rb#13 +# source://shopify-money//lib/money/money.rb#16 class Money::ReverseOperationProxy include ::Comparable # @return [ReverseOperationProxy] a new instance of ReverseOperationProxy # - # source://shopify-money//lib/money/money.rb#16 + # source://shopify-money//lib/money/money.rb#19 def initialize(value); end - # source://shopify-money//lib/money/money.rb#32 + # source://shopify-money//lib/money/money.rb#35 def *(other); end - # source://shopify-money//lib/money/money.rb#24 + # source://shopify-money//lib/money/money.rb#27 def +(other); end - # source://shopify-money//lib/money/money.rb#28 + # source://shopify-money//lib/money/money.rb#31 def -(other); end - # source://shopify-money//lib/money/money.rb#20 + # source://shopify-money//lib/money/money.rb#23 def <=>(other); end end @@ -818,25 +825,25 @@ class Money::Splitter # source://shopify-money//lib/money/splitter.rb#7 def initialize(money, num); end - # source://shopify-money//lib/money/splitter.rb#76 + # source://shopify-money//lib/money/splitter.rb#72 def [](index); end - # source://shopify-money//lib/money/splitter.rb#95 + # source://shopify-money//lib/money/splitter.rb#91 def each(&block); end # source://shopify-money//lib/money/splitter.rb#33 def first(count = T.unsafe(nil)); end - # source://shopify-money//lib/money/splitter.rb#54 + # source://shopify-money//lib/money/splitter.rb#52 def last(count = T.unsafe(nil)); end - # source://shopify-money//lib/money/splitter.rb#103 + # source://shopify-money//lib/money/splitter.rb#99 def reverse; end - # source://shopify-money//lib/money/splitter.rb#87 + # source://shopify-money//lib/money/splitter.rb#83 def reverse_each(&block); end - # source://shopify-money//lib/money/splitter.rb#109 + # source://shopify-money//lib/money/splitter.rb#105 def size; end # source://shopify-money//lib/money/splitter.rb#16 @@ -854,89 +861,89 @@ class Money::Splitter def split=(_arg0); end end -# source://shopify-money//lib/money/version.rb#3 +# source://shopify-money//lib/money/version.rb#4 Money::VERSION = T.let(T.unsafe(nil), String) -# source://shopify-money//lib/money_column/active_record_hooks.rb#2 +# source://shopify-money//lib/money_column/active_record_hooks.rb#3 module MoneyColumn; end -# source://shopify-money//lib/money_column/active_record_hooks.rb#5 +# source://shopify-money//lib/money_column/active_record_hooks.rb#6 module MoneyColumn::ActiveRecordHooks mixes_in_class_methods ::MoneyColumn::ActiveRecordHooks::ClassMethods - # source://shopify-money//lib/money_column/active_record_hooks.rb#10 + # source://shopify-money//lib/money_column/active_record_hooks.rb#11 def reload(*_arg0); end private - # source://shopify-money//lib/money_column/active_record_hooks.rb#22 + # source://shopify-money//lib/money_column/active_record_hooks.rb#23 def clear_money_column_cache; end - # source://shopify-money//lib/money_column/active_record_hooks.rb#26 + # source://shopify-money//lib/money_column/active_record_hooks.rb#27 def init_internals; end - # source://shopify-money//lib/money_column/active_record_hooks.rb#15 + # source://shopify-money//lib/money_column/active_record_hooks.rb#16 def initialize_dup(*_arg0); end - # source://shopify-money//lib/money_column/active_record_hooks.rb#31 + # source://shopify-money//lib/money_column/active_record_hooks.rb#32 def read_money_attribute(column); end - # source://shopify-money//lib/money_column/active_record_hooks.rb#44 + # source://shopify-money//lib/money_column/active_record_hooks.rb#45 def write_money_attribute(column, money); end class << self # @private # - # source://shopify-money//lib/money_column/active_record_hooks.rb#6 + # source://shopify-money//lib/money_column/active_record_hooks.rb#7 def included(base); end end end -# source://shopify-money//lib/money_column/active_record_hooks.rb#75 +# source://shopify-money//lib/money_column/active_record_hooks.rb#76 module MoneyColumn::ActiveRecordHooks::ClassMethods - # source://shopify-money//lib/money_column/active_record_hooks.rb#78 + # source://shopify-money//lib/money_column/active_record_hooks.rb#79 def money_column(*columns, currency_column: T.unsafe(nil), currency: T.unsafe(nil), currency_read_only: T.unsafe(nil), coerce_null: T.unsafe(nil)); end # Returns the value of attribute money_column_options. # - # source://shopify-money//lib/money_column/active_record_hooks.rb#76 + # source://shopify-money//lib/money_column/active_record_hooks.rb#77 def money_column_options; end private - # source://shopify-money//lib/money_column/active_record_hooks.rb#126 + # source://shopify-money//lib/money_column/active_record_hooks.rb#129 def clear_cache_on_currency_change(currency_column); end - # source://shopify-money//lib/money_column/active_record_hooks.rb#135 + # source://shopify-money//lib/money_column/active_record_hooks.rb#138 def inherited(subclass); end # @raise [ArgumentError] # - # source://shopify-money//lib/money_column/active_record_hooks.rb#111 + # source://shopify-money//lib/money_column/active_record_hooks.rb#112 def normalize_money_column_options(options); end end -# source://shopify-money//lib/money_column/active_record_type.rb#2 +# source://shopify-money//lib/money_column/active_record_type.rb#4 class MoneyColumn::ActiveRecordType < ::ActiveModel::Type::Decimal - # source://shopify-money//lib/money_column/active_record_type.rb#3 + # source://shopify-money//lib/money_column/active_record_type.rb#5 def serialize(money); end end -# source://shopify-money//lib/money_column/active_record_hooks.rb#3 +# source://shopify-money//lib/money_column/active_record_hooks.rb#4 class MoneyColumn::CurrencyReadOnlyError < ::StandardError; end -# source://shopify-money//lib/money_column/railtie.rb#3 +# source://shopify-money//lib/money_column/railtie.rb#4 class MoneyColumn::Railtie < ::Rails::Railtie; end # Allows Writing of 100.to_money for +Numeric+ types # 100.to_money => # # 100.37.to_money => # # -# source://shopify-money//lib/money/core_extensions.rb#5 +# source://shopify-money//lib/money/core_extensions.rb#6 class Numeric include ::Comparable - # source://shopify-money//lib/money/core_extensions.rb#6 + # source://shopify-money//lib/money/core_extensions.rb#7 def to_money(currency = T.unsafe(nil)); end end @@ -950,45 +957,43 @@ module RuboCop::Cop; end module RuboCop::Cop::Money; end # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#6 -class RuboCop::Cop::Money::MissingCurrency < ::RuboCop::Cop::Cop - # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#48 - def autocorrect(node); end +class RuboCop::Cop::Money::MissingCurrency < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector - # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#22 + # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#23 def money_new(param0 = T.unsafe(nil)); end - # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#34 + # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#35 def on_csend(node); end - # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#34 + # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#35 def on_send(node); end - # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#30 + # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#31 def to_money_block?(param0 = T.unsafe(nil)); end - # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#26 + # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#27 def to_money_without_currency?(param0 = T.unsafe(nil)); end private - # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#74 + # source://shopify-money//lib/rubocop/cop/money/missing_currency.rb#67 def replacement_currency; end end # source://shopify-money//lib/rubocop/cop/money/zero_money.rb#6 -class RuboCop::Cop::Money::ZeroMoney < ::RuboCop::Cop::Cop - # source://shopify-money//lib/rubocop/cop/money/zero_money.rb#39 - def autocorrect(node); end +class RuboCop::Cop::Money::ZeroMoney < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector - # source://shopify-money//lib/rubocop/cop/money/zero_money.rb#29 + # source://shopify-money//lib/rubocop/cop/money/zero_money.rb#31 def money_zero(param0 = T.unsafe(nil)); end - # source://shopify-money//lib/rubocop/cop/money/zero_money.rb#33 + # source://shopify-money//lib/rubocop/cop/money/zero_money.rb#35 def on_send(node); end private - # source://shopify-money//lib/rubocop/cop/money/zero_money.rb#56 + # source://shopify-money//lib/rubocop/cop/money/zero_money.rb#50 def replacement_currency(currency_arg); end end @@ -1011,7 +1016,7 @@ end # # good when configured with `ReplacementCurrency: CAD` # Money.new(0, 'CAD') # -# source://shopify-money//lib/rubocop/cop/money/zero_money.rb#27 +# source://shopify-money//lib/rubocop/cop/money/zero_money.rb#29 RuboCop::Cop::Money::ZeroMoney::MSG = T.let(T.unsafe(nil), String) # Allows Writing of '100'.to_money for +String+ types @@ -1019,10 +1024,10 @@ RuboCop::Cop::Money::ZeroMoney::MSG = T.let(T.unsafe(nil), String) # '100'.to_money => # # '100.37'.to_money => # # -# source://shopify-money//lib/money/core_extensions.rb#15 +# source://shopify-money//lib/money/core_extensions.rb#16 class String include ::Comparable - # source://shopify-money//lib/money/core_extensions.rb#16 + # source://shopify-money//lib/money/core_extensions.rb#17 def to_money(currency = T.unsafe(nil)); end end diff --git a/sorbet/rbi/gems/sidekiq@7.3.8.rbi b/sorbet/rbi/gems/sidekiq@7.3.9.rbi similarity index 99% rename from sorbet/rbi/gems/sidekiq@7.3.8.rbi rename to sorbet/rbi/gems/sidekiq@7.3.9.rbi index 73ee05d5d..3f82a423b 100644 --- a/sorbet/rbi/gems/sidekiq@7.3.8.rbi +++ b/sorbet/rbi/gems/sidekiq@7.3.9.rbi @@ -5,7 +5,7 @@ # Please instead update this file by running `bin/tapioca gem sidekiq`. -# source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#16 +# source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#3 module ActiveJob class << self # source://activejob/7.1.5.1/lib/active_job/queue_adapter.rb#7 @@ -261,7 +261,7 @@ class ActiveJob::Base end end -# source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#17 +# source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#4 module ActiveJob::QueueAdapters class << self # source://activejob/7.1.5.1/lib/active_job/queue_adapters.rb#137 @@ -275,11 +275,11 @@ end # # Rails.application.config.active_job.queue_adapter = :sidekiq # -# source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#26 +# source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#13 class ActiveJob::QueueAdapters::SidekiqAdapter # @api private # - # source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#35 + # source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#22 def enqueue(job); end # Defines whether enqueuing should happen implicitly to after commit when called @@ -288,17 +288,17 @@ class ActiveJob::QueueAdapters::SidekiqAdapter # @api private # @return [Boolean] # - # source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#30 + # source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#17 def enqueue_after_transaction_commit?; end # @api private # - # source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#51 + # source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#38 def enqueue_all(jobs); end # @api private # - # source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#43 + # source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#30 def enqueue_at(job, timestamp); end end @@ -306,7 +306,7 @@ end # # @api private # -# source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#84 +# source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#71 class ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper < ::Sidekiq::ActiveJob::Wrapper; end # Use `Sidekiq.transactional_push!` in your sidekiq.rb initializer @@ -402,12 +402,12 @@ module Sidekiq end end -# source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#4 +# source://sidekiq//lib/sidekiq/rails.rb#7 module Sidekiq::ActiveJob; end # @api private # -# source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#6 +# source://sidekiq//lib/sidekiq/rails.rb#9 class Sidekiq::ActiveJob::Wrapper include ::Sidekiq::Job include ::Sidekiq::Job::Options @@ -416,7 +416,7 @@ class Sidekiq::ActiveJob::Wrapper # @api private # - # source://sidekiq//lib/active_job/queue_adapters/sidekiq_adapter.rb#9 + # source://sidekiq//lib/sidekiq/rails.rb#12 def perform(job_data); end # source://sidekiq//lib/sidekiq/job.rb#141 @@ -1823,7 +1823,7 @@ end # source://sidekiq//lib/sidekiq.rb#42 Sidekiq::NAME = T.let(T.unsafe(nil), String) -# source://sidekiq//lib/sidekiq/rails.rb#7 +# source://sidekiq//lib/sidekiq/rails.rb#18 class Sidekiq::Rails < ::Rails::Engine class << self # source://activesupport/7.1.5.1/lib/active_support/callbacks.rb#70 @@ -1831,20 +1831,20 @@ class Sidekiq::Rails < ::Rails::Engine end end -# source://sidekiq//lib/sidekiq/rails.rb#8 +# source://sidekiq//lib/sidekiq/rails.rb#19 class Sidekiq::Rails::Reloader # @return [Reloader] a new instance of Reloader # - # source://sidekiq//lib/sidekiq/rails.rb#9 + # source://sidekiq//lib/sidekiq/rails.rb#20 def initialize(app = T.unsafe(nil)); end - # source://sidekiq//lib/sidekiq/rails.rb#13 + # source://sidekiq//lib/sidekiq/rails.rb#24 def call; end - # source://sidekiq//lib/sidekiq/rails.rb#20 + # source://sidekiq//lib/sidekiq/rails.rb#31 def inspect; end - # source://sidekiq//lib/sidekiq/rails.rb#24 + # source://sidekiq//lib/sidekiq/rails.rb#35 def to_hash; end end