From 3ab2ee9dc35c9ad91f5dfa40e7cec39fe0b54ab9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:53:54 +0000 Subject: [PATCH 1/7] build(deps-dev): bump rubocop from 1.65.0 to 1.66.1 in /Library/Homebrew Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.65.0 to 1.66.1. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.65.0...v1.66.1) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Library/Homebrew/Gemfile.lock | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 290bdd7455..a7c49470e9 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -80,15 +80,14 @@ GEM rspec-support (3.13.1) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.65.0) + rubocop (1.66.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.32.3) @@ -155,7 +154,6 @@ GEM PLATFORMS aarch64-linux - arm-linux arm64-darwin x86_64-darwin x86_64-linux From 28ae01a654ddae3da60e4cf011512f9a8f30029f Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:56:46 +0000 Subject: [PATCH 2/7] brew vendor-gems: commit updates. --- Library/Homebrew/Gemfile.lock | 1 + Library/Homebrew/vendor/bundle/bundler/setup.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index a7c49470e9..2ef2bf8ccd 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -154,6 +154,7 @@ GEM PLATFORMS aarch64-linux + arm-linux arm64-darwin x86_64-darwin x86_64-linux diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index 226f915e99..077abd2f1a 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -91,7 +91,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-ast-1.32.3/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-progressbar-1.13.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-display_width-2.6.0/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.65.0/lib") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.66.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-md-1.2.3/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.22.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rspec-3.1.0/lib") From ce806dcb8901d9180210f9a8c6dc7df1b12e1d4b Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Wed, 4 Sep 2024 17:00:34 +0000 Subject: [PATCH 3/7] Update RBI files for rubocop. Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow. --- ...{rubocop@1.65.0.rbi => rubocop@1.66.1.rbi} | 2866 +++++++++-------- 1 file changed, 1525 insertions(+), 1341 deletions(-) rename Library/Homebrew/sorbet/rbi/gems/{rubocop@1.65.0.rbi => rubocop@1.66.1.rbi} (97%) diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.65.0.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.66.1.rbi similarity index 97% rename from Library/Homebrew/sorbet/rbi/gems/rubocop@1.65.0.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop@1.66.1.rbi index 041933c21d..70a8d0ad24 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.65.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.66.1.rbi @@ -765,7 +765,7 @@ end # # source://rubocop//lib/rubocop/comment_config.rb#6 class RuboCop::CommentConfig - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [CommentConfig] a new instance of CommentConfig # @@ -777,8 +777,8 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#63 def comment_only_line?(line_number); end - # source://forwardable/1.3.3/forwardable.rb#231 - def config(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def config(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/comment_config.rb#51 def cop_disabled_line_ranges; end @@ -801,8 +801,8 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#30 def processed_source; end - # source://forwardable/1.3.3/forwardable.rb#231 - def registry(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def registry(*_arg0, **_arg1, &_arg2); end private @@ -970,18 +970,18 @@ end class RuboCop::Config include ::RuboCop::PathUtil include ::RuboCop::FileFinder - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [Config] a new instance of Config # # source://rubocop//lib/rubocop/config.rb#30 def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end - # source://forwardable/1.3.3/forwardable.rb#231 - def [](*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def [](*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def []=(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def []=(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # @@ -993,7 +993,7 @@ class RuboCop::Config # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#193 + # source://rubocop//lib/rubocop/config.rb#197 def allowed_camel_case_file?(file); end # Paths specified in configuration files starting with .rubocop are @@ -1002,12 +1002,12 @@ 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#237 + # source://rubocop//lib/rubocop/config.rb#241 def base_dir_for_path_parameters; end # @return [String, nil] # - # source://rubocop//lib/rubocop/config.rb#267 + # source://rubocop//lib/rubocop/config.rb#271 def bundler_lock_file_path; end # source://rubocop//lib/rubocop/config.rb#51 @@ -1019,42 +1019,42 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#142 def clusivity_config_for_badge?(badge); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#108 def deprecation_check; end - # source://forwardable/1.3.3/forwardable.rb#231 - def dig(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def dig(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # # source://rubocop//lib/rubocop/config.rb#162 def disabled_new_cops?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def each(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_key(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_key(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # # source://rubocop//lib/rubocop/config.rb#166 def enabled_new_cops?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def fetch(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fetch(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#215 + # source://rubocop//lib/rubocop/config.rb#219 def file_to_exclude?(file); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#174 + # source://rubocop//lib/rubocop/config.rb#178 def file_to_include?(file); end # source://rubocop//lib/rubocop/config.rb#158 @@ -1085,10 +1085,10 @@ class RuboCop::Config # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) # - # source://rubocop//lib/rubocop/config.rb#292 + # source://rubocop//lib/rubocop/config.rb#296 def gem_versions_in_target; end - # source://rubocop//lib/rubocop/config.rb#296 + # source://rubocop//lib/rubocop/config.rb#300 def inspect; end # True if this is a config file that is shipped with RuboCop @@ -1098,11 +1098,11 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#76 def internal?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def key?(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def key?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def keys(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def keys(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#47 def loaded_features; end @@ -1115,25 +1115,25 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#81 def make_excludes_absolute; end - # source://forwardable/1.3.3/forwardable.rb#231 - def map(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def merge(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def merge(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#247 + # source://rubocop//lib/rubocop/config.rb#251 def parser_engine; end - # source://rubocop//lib/rubocop/config.rb#228 + # source://rubocop//lib/rubocop/config.rb#232 def path_relative_to_config(path); end - # source://rubocop//lib/rubocop/config.rb#224 + # source://rubocop//lib/rubocop/config.rb#228 def patterns_to_exclude; end - # source://rubocop//lib/rubocop/config.rb#220 + # source://rubocop//lib/rubocop/config.rb#224 def patterns_to_include; end - # source://rubocop//lib/rubocop/config.rb#278 + # source://rubocop//lib/rubocop/config.rb#282 def pending_cops; end # Returns true if there's a chance that an Include pattern matches hidden @@ -1141,69 +1141,74 @@ class RuboCop::Config # # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#207 + # source://rubocop//lib/rubocop/config.rb#211 def possibly_include_hidden?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def replace(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def replace(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#71 def signature; end - # source://rubocop//lib/rubocop/config.rb#262 + # source://rubocop//lib/rubocop/config.rb#266 def smart_loaded_path; end - # source://rubocop//lib/rubocop/config.rb#251 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#174 + def string_literals_frozen_by_default?; end + + # source://rubocop//lib/rubocop/config.rb#255 def target_rails_version; end - # source://forwardable/1.3.3/forwardable.rb#231 - def target_ruby_version(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def target_ruby_version(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_h(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_h(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_hash(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_hash(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#67 def to_s; end - # source://forwardable/1.3.3/forwardable.rb#231 - def transform_values(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def transform_values(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def validate(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def validate(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#58 def validate_after_resolution; end private - # source://rubocop//lib/rubocop/config.rb#346 + # source://rubocop//lib/rubocop/config.rb#350 def department_of(qualified_cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#334 + # source://rubocop//lib/rubocop/config.rb#338 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#321 + # source://rubocop//lib/rubocop/config.rb#325 def gem_version_to_major_minor_float(gem_version); end - # source://rubocop//lib/rubocop/config.rb#327 + # source://rubocop//lib/rubocop/config.rb#331 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#308 + # source://rubocop//lib/rubocop/config.rb#312 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#303 + # source://rubocop//lib/rubocop/config.rb#307 def target_rails_version_from_bundler_lock_file; end class << self @@ -1520,10 +1525,10 @@ class RuboCop::ConfigLoader def resolver; end # source://rubocop//lib/rubocop/config_loader.rb#238 - def yaml_safe_load(yaml_code, filename); end + def yaml_tree_to_hash(yaml_tree); end # source://rubocop//lib/rubocop/config_loader.rb#248 - def yaml_safe_load!(yaml_code, filename); end + def yaml_tree_to_hash!(yaml_tree); end end end @@ -1630,12 +1635,12 @@ class RuboCop::ConfigLoaderResolver # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#268 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#267 def gem_config_path(gem_name, relative_config_path); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#246 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#245 def handle_disabled_by_default(config, new_default_configuration); end # @api private @@ -1675,7 +1680,7 @@ class RuboCop::ConfigLoaderResolver # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#264 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#263 def transform(config, &block); end # @api private @@ -2257,18 +2262,18 @@ end # # source://rubocop//lib/rubocop/config_validator.rb#6 class RuboCop::ConfigValidator - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [ConfigValidator] a new instance of ConfigValidator # # source://rubocop//lib/rubocop/config_validator.rb#26 def initialize(config); end - # source://forwardable/1.3.3/forwardable.rb#231 - def for_all_cops(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def for_all_cops(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def smart_loaded_path(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def smart_loaded_path(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config_validator.rb#62 def target_ruby_version; end @@ -2627,85 +2632,83 @@ RuboCop::Cop::AmbiguousCopName::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#6 class RuboCop::Cop::AnnotationComment - extend ::Forwardable - # @param comment [Parser::Source::Comment] # @param keywords [Array] # @return [AnnotationComment] a new instance of AnnotationComment # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#13 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#11 def initialize(comment, keywords); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#19 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#17 def annotation?; end # Returns the range bounds for just the annotation # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#31 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#29 def bounds; end # Returns the value of attribute colon. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def colon; end # Returns the value of attribute comment. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def comment; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#23 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#21 def correct?(colon:); end # Returns the value of attribute keyword. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def keyword; end # Returns the value of attribute margin. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def margin; end # Returns the value of attribute note. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def note; end # Returns the value of attribute space. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def space; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#67 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#65 def just_keyword_of_sentence?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#63 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#61 def keyword_appearance?; end # Returns the value of attribute keywords. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#39 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#37 def keywords; end - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#53 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#51 def regex; end - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#41 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#39 def split_comment(comment); end end -# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#50 +# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#48 RuboCop::Cop::AnnotationComment::KEYWORDS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) # Handles the `MinSize` configuration option for array-based cops @@ -2963,19 +2966,19 @@ class RuboCop::Cop::Base # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#343 + # source://rubocop//lib/rubocop/cop/base.rb#347 def always_autocorrect?; end # Called before any investigation # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#329 + # source://rubocop//lib/rubocop/cop/base.rb#333 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#314 + # source://rubocop//lib/rubocop/cop/base.rb#318 def callbacks_needed; end # Returns the value of attribute config. @@ -2992,7 +2995,7 @@ class RuboCop::Cop::Base # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#349 + # source://rubocop//lib/rubocop/cop/base.rb#353 def contextual_autocorrect?; end # Configuration Helpers @@ -3005,7 +3008,7 @@ class RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#285 + # source://rubocop//lib/rubocop/cop/base.rb#289 def excluded_file?(file); end # This method should be overridden when a cop's behavior depends @@ -3027,7 +3030,7 @@ class RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/base.rb#234 def external_dependency_checksum; end - # source://rubocop//lib/rubocop/cop/base.rb#353 + # source://rubocop//lib/rubocop/cop/base.rb#357 def inspect; end # Gets called if no message is specified when calling `add_offense` or @@ -3042,7 +3045,7 @@ class RuboCop::Cop::Base # @deprecated Make potential errors with previous API more obvious # - # source://rubocop//lib/rubocop/cop/base.rb#305 + # source://rubocop//lib/rubocop/cop/base.rb#309 def offenses; end # Called after all on_... have been called @@ -3065,7 +3068,7 @@ class RuboCop::Cop::Base # There should be very limited reasons for a Cop to do it's own parsing # - # source://rubocop//lib/rubocop/cop/base.rb#290 + # source://rubocop//lib/rubocop/cop/base.rb#294 def parse(source, path = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/base.rb#264 @@ -3080,14 +3083,19 @@ class RuboCop::Cop::Base # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#296 + # source://rubocop//lib/rubocop/cop/base.rb#300 def ready; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#276 + # source://rubocop//lib/rubocop/cop/base.rb#280 def relevant_file?(file); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#276 + def string_literals_frozen_by_default?; end + # source://rubocop//lib/rubocop/cop/base.rb#268 def target_rails_version; end @@ -3096,90 +3104,90 @@ class RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/base.rb#471 + # source://rubocop//lib/rubocop/cop/base.rb#475 def annotate(message); end - # source://rubocop//lib/rubocop/cop/base.rb#365 + # source://rubocop//lib/rubocop/cop/base.rb#369 def apply_correction(corrector); end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#435 + # source://rubocop//lib/rubocop/cop/base.rb#439 def attempt_correction(range, corrector); end # Reserved for Cop::Cop # - # source://rubocop//lib/rubocop/cop/base.rb#361 + # source://rubocop//lib/rubocop/cop/base.rb#365 def callback_argument(range); end # Called to complete an investigation # - # source://rubocop//lib/rubocop/cop/base.rb#394 + # source://rubocop//lib/rubocop/cop/base.rb#398 def complete_investigation; end # @return [Symbol, Corrector] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#409 + # source://rubocop//lib/rubocop/cop/base.rb#413 def correct(range); end - # source://rubocop//lib/rubocop/cop/base.rb#379 + # source://rubocop//lib/rubocop/cop/base.rb#383 def current_corrector; end # Reserved for Commissioner: # - # source://rubocop//lib/rubocop/cop/base.rb#371 + # source://rubocop//lib/rubocop/cop/base.rb#375 def current_offense_locations; end - # source://rubocop//lib/rubocop/cop/base.rb#383 + # source://rubocop//lib/rubocop/cop/base.rb#387 def current_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#375 + # source://rubocop//lib/rubocop/cop/base.rb#379 def currently_disabled_lines; end - # source://rubocop//lib/rubocop/cop/base.rb#499 + # source://rubocop//lib/rubocop/cop/base.rb#503 def custom_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#495 + # source://rubocop//lib/rubocop/cop/base.rb#499 def default_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#449 + # source://rubocop//lib/rubocop/cop/base.rb#453 def disable_uncorrectable(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#485 + # source://rubocop//lib/rubocop/cop/base.rb#489 def enabled_line?(line_number); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#477 + # source://rubocop//lib/rubocop/cop/base.rb#481 def file_name_matches_any?(file, parameter, default_result); end - # source://rubocop//lib/rubocop/cop/base.rb#467 + # source://rubocop//lib/rubocop/cop/base.rb#471 def find_message(range, message); end - # source://rubocop//lib/rubocop/cop/base.rb#491 + # source://rubocop//lib/rubocop/cop/base.rb#495 def find_severity(_range, severity); end - # source://rubocop//lib/rubocop/cop/base.rb#512 + # source://rubocop//lib/rubocop/cop/base.rb#516 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/base.rb#456 + # source://rubocop//lib/rubocop/cop/base.rb#460 def range_from_node_or_range(node_or_range); end # Actually private methods # - # source://rubocop//lib/rubocop/cop/base.rb#404 + # source://rubocop//lib/rubocop/cop/base.rb#408 def reset_investigation; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#520 + # source://rubocop//lib/rubocop/cop/base.rb#524 def target_satisfies_all_gem_version_requirements?; end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#424 + # source://rubocop//lib/rubocop/cop/base.rb#428 def use_corrector(range, corrector); end class << self @@ -3199,7 +3207,7 @@ class RuboCop::Cop::Base # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#319 + # source://rubocop//lib/rubocop/cop/base.rb#323 def callbacks_needed; end # source://rubocop//lib/rubocop/cop/base.rb#97 @@ -3290,12 +3298,12 @@ class RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/base.rb#387 + # source://rubocop//lib/rubocop/cop/base.rb#391 def restrict_on_send; end end end -# source://rubocop//lib/rubocop/cop/base.rb#391 +# source://rubocop//lib/rubocop/cop/base.rb#395 RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) # Reports of an investigation. @@ -5092,7 +5100,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter # Legacy # - # source://parser/3.3.4.0/lib/parser/source/tree_rewriter.rb#252 + # source://parser/3.3.5.0/lib/parser/source/tree_rewriter.rb#252 def rewrite; end # Swaps sources at the given ranges. @@ -5158,24 +5166,34 @@ module RuboCop::Cop::Documentation # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#24 + # source://rubocop//lib/rubocop/cop/documentation.rb#25 def base_url_for(cop_class, config); end # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#40 + # source://rubocop//lib/rubocop/cop/documentation.rb#57 def builtin?(cop_class); end # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#35 + # source://rubocop//lib/rubocop/cop/documentation.rb#47 def default_base_url; end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#52 + def default_extension; end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#10 def department_to_basename(department); end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#36 + def extension_for(cop_class, config); end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#15 @@ -5184,25 +5202,35 @@ module RuboCop::Cop::Documentation class << self # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#24 + # source://rubocop//lib/rubocop/cop/documentation.rb#25 def base_url_for(cop_class, config); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/documentation.rb#40 + # source://rubocop//lib/rubocop/cop/documentation.rb#57 def builtin?(cop_class); end # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#35 + # source://rubocop//lib/rubocop/cop/documentation.rb#47 def default_base_url; end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#52 + def default_extension; end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#10 def department_to_basename(department); end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#36 + def extension_for(cop_class, config); end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#15 @@ -5597,21 +5625,24 @@ module RuboCop::Cop::FrozenStringLiteral # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#15 def frozen_string_literal_comment_exists?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#66 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#76 def frozen_string_literal_specified?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#60 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#70 def frozen_string_literals_disabled?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#41 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#42 def frozen_string_literals_enabled?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#76 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#86 def leading_comment_lines; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#72 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#82 def leading_magic_comments; end + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#35 + def uninterpolated_heredoc?(node); end + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#31 def uninterpolated_string?(node); end @@ -7497,7 +7528,7 @@ RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), St # right-hand-side of a multi-line assignment. # # The indentation of the remaining lines can be corrected with -# other cops such as `IndentationConsistency` and `EndAlignment`. +# other cops such as `Layout/IndentationConsistency` and `Layout/EndAlignment`. # # @example # # bad @@ -7512,7 +7543,7 @@ RuboCop::Cop::Layout::ArrayAlignment::FIXED_INDENT_MSG = T.let(T.unsafe(nil), St # 'bar' # end # -# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#24 +# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#25 class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base include ::RuboCop::Cop::CheckAssignment include ::RuboCop::Cop::Alignment @@ -7520,17 +7551,17 @@ class RuboCop::Cop::Layout::AssignmentIndentation < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#42 + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#43 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#33 + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#34 def check_assignment(node, rhs); end - # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#46 + # source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#47 def leftmost_multiple_assignment(node); end end -# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#29 +# source://rubocop//lib/rubocop/cop/layout/assignment_indentation.rb#30 RuboCop::Cop::Layout::AssignmentIndentation::MSG = T.let(T.unsafe(nil), String) # Checks whether the end keyword of `begin` is aligned properly. @@ -7605,7 +7636,7 @@ RuboCop::Cop::Layout::BeginEndAlignment::MSG = T.let(T.unsafe(nil), String) # start of the line where the expression started. # # `either` (which is the default) : the `end` is allowed to be in either -# location. The autofixer will default to `start_of_line`. +# location. The autocorrect will default to `start_of_line`. # # @example EnforcedStyleAlignWith: either (default) # # bad @@ -7670,54 +7701,63 @@ class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#228 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#246 def add_space_before(corrector, loc, delta); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#205 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#223 def alt_start_msg(start_loc, source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#155 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#145 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#105 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#95 def block_end_align_target(node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#123 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#113 def check_block_alignment(start_node, block_node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#178 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#196 def compute_do_source_line_column(node, end_loc); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#220 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#238 def compute_start_col(ancestor_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#119 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#109 def disqualified_parent?(parent, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#115 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#105 def end_align_target?(node, parent); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#168 + # In offense message, we want to show the assignment LHS rather than + # the entire assignment. + # + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#191 + def find_lhs_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#162 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#215 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#233 def format_source_line_column(source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#197 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#215 def loc_to_source_line_column(loc); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#136 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#126 def register_offense(block_node, start_loc, end_loc, do_source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#232 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#250 def remove_space_before(corrector, end_pos, delta); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#95 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#172 def start_for_block_node(block_node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#179 + def start_for_line_node(block_node); end end # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#71 @@ -8518,43 +8558,40 @@ RuboCop::Cop::Layout::CommentIndentation::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # if # some_condition # do_something # end -# @example # # # good -# # if some_condition # do_something # end # -# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#25 +# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#21 class RuboCop::Cop::Layout::ConditionPosition < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#31 + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#27 def on_if(node); end - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#37 + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#33 def on_until(node); end - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#37 + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#33 def on_while(node); end private - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#44 + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#40 def check(node); end - # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#58 + # source://rubocop//lib/rubocop/cop/layout/condition_position.rb#54 def message(condition); end end -# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#29 +# source://rubocop//lib/rubocop/cop/layout/condition_position.rb#25 RuboCop::Cop::Layout::ConditionPosition::MSG = T.let(T.unsafe(nil), String) # Checks whether the end keywords of method definitions are @@ -9286,84 +9323,84 @@ class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#290 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#291 def allowance_range?; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#274 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#275 def autocorrect_insert_lines(corrector, newline_pos, count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#267 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#268 def autocorrect_remove_lines(corrector, newline_pos, count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#227 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#228 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#171 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#172 def candidate?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#191 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#192 def class_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#255 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#256 def def_end(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#163 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#164 def def_location(correction_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#247 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#248 def def_start(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#178 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#179 def empty_line_between_macros; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#259 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#260 def end_loc(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#205 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#206 def expected_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#223 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#224 def line_count_allowed?(count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#239 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#240 def lines_between_defs(first_def_node, second_def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#182 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#183 def macro_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#235 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#236 def maximum_empty_lines; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#199 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#200 def message(node, count: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#187 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#188 def method_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#231 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#232 def minimum_empty_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#195 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#196 def module_candidate?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#214 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#215 def multiple_blank_lines_groups?(first_def_node, second_def_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#281 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#282 def node_type(node); end class << self @@ -10057,22 +10094,24 @@ class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCo # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#81 def check_body(body, line_of_def_or_kwbegin); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#108 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#113 def keyword_locations(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#125 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#130 def keyword_locations_in_ensure(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#121 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#126 def keyword_locations_in_rescue(node); end + # @return [Boolean] + # # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#96 - def last_rescue_and_end_on_same_line(body); end + def last_body_and_end_on_same_line?(body); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#100 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#105 def message(location, keyword); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#104 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#109 def style; end end @@ -10731,7 +10770,6 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # # defined inside a method call. # # # bad -# # consistent # array = [ # :value # ] @@ -10751,68 +10789,66 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # # brackets are indented to the same position. # # # bad -# # align_brackets # and_now_for_something = [ # :completely_different # ] # # # good -# # align_brackets # and_now_for_something = [ # :completely_different # ] # -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#85 +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#82 class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::MultilineElementIndentation extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#94 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 def on_array(node); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#100 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#97 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#100 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#97 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#191 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#188 def array_alignment_config; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#111 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#108 def autocorrect(corrector, node); end # Returns the description of what the correct indentation is based on. # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#149 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#146 def base_description(indent_base_type); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#115 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#112 def brace_alignment_style; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#119 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#116 def check(array_node, left_parenthesis); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#133 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#130 def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#185 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#182 def enforce_first_argument_with_fixed_indentation?; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#162 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#159 def message(base_description); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#170 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#167 def message_for_right_bracket(indent_base_type); end end -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#88 RuboCop::Cop::Layout::FirstArrayElementIndentation::MSG = T.let(T.unsafe(nil), String) # Checks for a line break before the first element in a @@ -12809,20 +12845,20 @@ RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_IN # * `Layout/ArrayAlignment` # * `Layout/BlockAlignment` # * `Layout/BlockEndNewline` -# * `LayoutClosingParenthesisIndentation` -# * `LayoutFirstArgumentIndentation` -# * `LayoutFirstArrayElementIndentation` -# * `LayoutFirstHashElementIndentation` -# * `LayoutFirstParameterIndentation` -# * `LayoutHashAlignment` -# * `LayoutIndentationWidth` -# * `LayoutMultilineArrayLineBreaks` -# * `LayoutMultilineBlockLayout` -# * `LayoutMultilineHashBraceLayout` -# * `LayoutMultilineHashKeyLineBreaks` -# * `LayoutMultilineMethodArgumentLineBreaks` -# * `LayoutMultilineMethodParameterLineBreaks` -# * `Layout/ParameterAlignment` +# * `Layout/ClosingParenthesisIndentation` +# * `Layout/FirstArgumentIndentation` +# * `Layout/FirstArrayElementIndentation` +# * `Layout/FirstHashElementIndentation` +# * `Layout/FirstParameterIndentation` +# * `Layout/HashAlignment` +# * `Layout/IndentationWidth` +# * `Layout/MultilineArrayLineBreaks` +# * `Layout/MultilineBlockLayout` +# * `Layout/MultilineHashBraceLayout` +# * `Layout/MultilineHashKeyLineBreaks` +# * `Layout/MultilineMethodArgumentLineBreaks` +# * `Layout/MultilineMethodParameterLineBreaks` +# * `Layout//ParameterAlignment` # * `Style/BlockDelimiters` # # Together, these cops will pretty print hashes, arrays, @@ -16549,7 +16585,7 @@ class RuboCop::Cop::LineBreakCorrector # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#58 + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#60 def trailing_class_definition?(token, body); end end end @@ -16594,7 +16630,7 @@ module RuboCop::Cop::LineLengthHelp # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#32 def line_length(line); end - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#105 + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#110 def line_length_without_directive(line); end # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#51 @@ -16608,7 +16644,7 @@ module RuboCop::Cop::LineLengthHelp # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#98 + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#103 def valid_uri?(uri_ish_string); end end @@ -16677,7 +16713,6 @@ RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsaf # # # bad # some_method a { |val| puts val } -# @example # # # good # # With parentheses, there's no ambiguity. @@ -16710,38 +16745,38 @@ RuboCop::Cop::Lint::AmbiguousAssignment::SIMPLE_ASSIGNMENT_TYPES = T.let(T.unsaf # expect { do_something }.to change { object.attribute } # expect { do_something }.to not_change { object.attribute } # -# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#54 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#52 class RuboCop::Cop::Lint::AmbiguousBlockAssociation < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#64 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#62 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#64 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#62 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#85 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#83 def allowed_method_pattern?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#81 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#79 def ambiguous_block_association?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#91 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#89 def message(send_node); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#97 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#95 def wrap_in_parentheses(corrector, node); end end -# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#60 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_block_association.rb#58 RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String) # Checks for ambiguous operators in the first argument of a @@ -16754,51 +16789,50 @@ RuboCop::Cop::Lint::AmbiguousBlockAssociation::MSG = T.let(T.unsafe(nil), String # # The `*` is interpreted as a splat operator but it could possibly be # # a `*` method invocation (i.e. `do_something.*(some_array)`). # do_something *some_array -# @example # # # good # # # With parentheses, there's no ambiguity. # do_something(*some_array) # -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#23 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#21 class RuboCop::Cop::Lint::AmbiguousOperator < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#45 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#43 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#64 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#62 def find_offense_node_by(diagnostic); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#82 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#80 def message(diagnostic); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#92 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#90 def offense_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#88 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#86 def offense_position?(node, diagnostic); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#101 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#99 def unary_operator?(node, diagnostic); end class << self - # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#41 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#39 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#26 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#24 RuboCop::Cop::Lint::AmbiguousOperator::AMBIGUITIES = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#36 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_operator.rb#34 RuboCop::Cop::Lint::AmbiguousOperator::MSG_FORMAT = T.let(T.unsafe(nil), String) # Looks for expressions containing multiple binary operators @@ -16964,40 +16998,39 @@ RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String) # # but it could possibly be `/` method invocations. # # (i.e. `do_something./(pattern)./(i)`) # do_something /pattern/i -# @example # # # good # # # With parentheses, there's no ambiguity. # do_something(/pattern/i) # -# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#24 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#22 class RuboCop::Cop::Lint::AmbiguousRegexpLiteral < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#31 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#29 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#56 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#54 def find_offense_node(node, regexp_receiver); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#49 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#47 def find_offense_node_by(diagnostic); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#67 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#65 def first_argument_is_regexp?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#71 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#69 def method_chain_to_regexp_receiver?(node, regexp_receiver); end end -# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#27 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_regexp_literal.rb#25 RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) # Checks for assignments in the conditions of @@ -17163,7 +17196,6 @@ RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(ni # # # good # true -# @example # # # bad # :false @@ -17171,23 +17203,23 @@ RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands::MSG = T.let(T.unsafe(ni # # good # false # -# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#29 +# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#27 class RuboCop::Cop::Lint::BooleanSymbol < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#35 + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#33 def boolean_symbol?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#37 + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#35 def on_sym(node); end private - # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#50 + # source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#48 def autocorrect(corrector, node); end end -# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#32 +# source://rubocop//lib/rubocop/cop/lint/boolean_symbol.rb#30 RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) # Checks for circular argument references in optional keyword @@ -17198,54 +17230,45 @@ RuboCop::Cop::Lint::BooleanSymbol::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # def bake(pie: pie) # pie.heat_up # end -# @example # # # good -# # def bake(pie:) # pie.refrigerate # end -# @example # # # good -# # def bake(pie: self.pie) # pie.feed_to(user) # end -# @example # # # bad -# # def cook(dry_ingredients = dry_ingredients) # dry_ingredients.reduce(&:+) # end -# @example # # # good -# # def cook(dry_ingredients = self.dry_ingredients) # dry_ingredients.combine # end # -# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#50 +# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#37 class RuboCop::Cop::Lint::CircularArgumentReference < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#53 + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#40 def on_kwoptarg(node); end - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#57 + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#44 def on_optarg(node); end private - # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#63 + # source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#50 def check_for_circular_argument_references(arg_name, arg_value); end end -# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#51 +# source://rubocop//lib/rubocop/cop/lint/circular_argument_reference.rb#38 RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String) # Do not define constants within a block, since the block's scope does not @@ -17492,7 +17515,6 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # binding.pry # do_something # end -# @example # # # bad (ok during development) # @@ -17501,7 +17523,6 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # byebug # do_something # end -# @example # # # good # @@ -17521,50 +17542,50 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # # require 'my_debugger/start' # -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#74 class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#82 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#142 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#138 def assumed_argument?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#121 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#117 def assumed_usage_context?(node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#131 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#127 def chained_method_name(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#108 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#104 def debugger_method?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#94 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 def debugger_methods; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#114 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#110 def debugger_require?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#101 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#97 def debugger_requires; end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#86 def message(node); end end -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#80 +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#76 RuboCop::Cop::Lint::Debugger::BLOCK_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#79 +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#75 RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) # Checks for uses of the deprecated class method usages. @@ -17701,25 +17722,17 @@ RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil), # # @example # -# # Example for OpenSSL::Cipher instantiation. -# # # bad # OpenSSL::Cipher::AES.new(128, :GCM) # # # good # OpenSSL::Cipher.new('aes-128-gcm') -# @example -# -# # Example for OpenSSL::Digest instantiation. # # # bad # OpenSSL::Digest::SHA256.new # # # good # OpenSSL::Digest.new('SHA256') -# @example -# -# # Example for ::Digest inherited class methods. # # # bad # OpenSSL::Digest::SHA256.digest('foo') @@ -17727,51 +17740,51 @@ RuboCop::Cop::Lint::DeprecatedConstants::SUGGEST_GOOD_MSG = T.let(T.unsafe(nil), # # good # OpenSSL::Digest.digest('SHA256', 'foo') # -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#40 +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#30 class RuboCop::Cop::Lint::DeprecatedOpenSSLConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#49 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#39 def algorithm_const(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#59 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#49 def digest_const?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#63 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#53 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#110 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#100 def algorithm_name(node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#75 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#65 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#139 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#129 def build_cipher_arguments(node, algorithm_name, no_arguments); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#102 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#92 def correction_range(node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#87 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#77 def message(node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#106 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#96 def openssl_class(node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#128 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#118 def replacement_args(node); end - # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#120 + # source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#110 def sanitize_arguments(arguments); end end -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#44 +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#34 RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#46 +# source://rubocop//lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb#36 RuboCop::Cop::Lint::DeprecatedOpenSSLConstant::NO_ARG_ALGORITHM = T.let(T.unsafe(nil), Array) # Checks constructors for disjunctive assignments (`||=`) that should @@ -17968,17 +17981,14 @@ RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # case x # when 'first' # do_something # when 'first' # do_something_else # end -# @example # # # good -# # case x # when 'first' # do_something @@ -17986,13 +17996,13 @@ RuboCop::Cop::Lint::DuplicateBranch::MSG = T.let(T.unsafe(nil), String) # do_something_else # end # -# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#30 +# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#26 class RuboCop::Cop::Lint::DuplicateCaseCondition < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#33 + # source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#29 def on_case(case_node); end end -# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#31 +# source://rubocop//lib/rubocop/cop/lint/duplicate_case_condition.rb#27 RuboCop::Cop::Lint::DuplicateCaseCondition::MSG = T.let(T.unsafe(nil), String) # Checks that there are no repeated conditions used in if 'elsif'. @@ -18029,23 +18039,20 @@ RuboCop::Cop::Lint::DuplicateElsifCondition::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # hash = { food: 'apple', food: 'orange' } -# @example # # # good -# # hash = { food: 'apple', other_food: 'orange' } # -# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#22 +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#18 class RuboCop::Cop::Lint::DuplicateHashKey < ::RuboCop::Cop::Base include ::RuboCop::Cop::Duplication - # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#27 + # source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#23 def on_hash(node); end end -# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#25 +# source://rubocop//lib/rubocop/cop/lint/duplicate_hash_key.rb#21 RuboCop::Cop::Lint::DuplicateHashKey::MSG = T.let(T.unsafe(nil), String) # Checks for duplicated magic comments. @@ -18197,7 +18204,6 @@ RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # def foo # 1 # end @@ -18205,19 +18211,15 @@ RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) # def foo # 2 # end -# @example # # # bad -# # def foo # 1 # end # # alias foo bar -# @example # # # good -# # def foo # 1 # end @@ -18225,98 +18227,96 @@ RuboCop::Cop::Lint::DuplicateMatchPattern::MSG = T.let(T.unsafe(nil), String) # def bar # 2 # end -# @example # # # good -# # def foo # 1 # end # # alias bar foo # -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#52 +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#42 class RuboCop::Cop::Lint::DuplicateMethods < ::RuboCop::Cop::Base # @return [DuplicateMethods] a new instance of DuplicateMethods # - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#57 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#47 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#98 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#88 def alias_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#85 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#75 def method_alias?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#89 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#79 def on_alias(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#63 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#53 def on_def(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#72 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#62 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#104 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#94 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#103 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#93 def sym_name(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#117 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#107 def check_const_receiver(node, name, const_name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#124 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#114 def check_self_receiver(node, name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#208 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#198 def found_attr(node, args, readable: T.unsafe(nil), writable: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#136 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#126 def found_instance_method(node, name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#159 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#149 def found_method(node, method_name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#149 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#139 def found_sclass_method(node, name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#186 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#176 def location(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#218 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#208 def lookup_constant(node, const_name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#131 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#121 def message_for_dup(node, method_name, key); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#178 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#168 def method_key(node, method_name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#194 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#184 def on_attr(node, attr_name, args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#250 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#240 def possible_dsl?(node); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#236 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#226 def qualified_name(enclosing, namespace, mod_name); end - # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#260 + # source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#250 def source_location(node); end end -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#55 +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#45 RuboCop::Cop::Lint::DuplicateMethods::DEF_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#53 +# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#43 RuboCop::Cop::Lint::DuplicateMethods::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/duplicate_methods.rb#54 +# 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. @@ -18473,31 +18473,28 @@ RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # sum = numbers.each_with_object(0) { |e, a| a += e } -# @example # # # good -# # num = 0 # sum = numbers.each_with_object(num) { |e, a| a += e } # -# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#24 +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#20 class RuboCop::Cop::Lint::EachWithObjectArgument < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#25 def each_with_object?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#33 + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#33 + # source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#29 def on_send(node); end end -# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#25 +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#21 RuboCop::Cop::Lint::EachWithObjectArgument::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#26 +# source://rubocop//lib/rubocop/cop/lint/each_with_object_argument.rb#22 RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for odd `else` block layout - like @@ -18517,7 +18514,6 @@ RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(ni # else do_this # do_that # end -# @example # # # good # @@ -18537,28 +18533,28 @@ RuboCop::Cop::Lint::EachWithObjectArgument::RESTRICT_ON_SEND = T.let(T.unsafe(ni # do_that # end # -# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#43 +# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#41 class RuboCop::Cop::Lint::ElseLayout < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#50 + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#48 def on_if(node); end private - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#81 + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#79 def autocorrect(corrector, node, first_else); end - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#61 + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#59 def check(node); end - # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#71 + # source://rubocop//lib/rubocop/cop/lint/else_layout.rb#69 def check_else(node); end end -# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#48 +# source://rubocop//lib/rubocop/cop/lint/else_layout.rb#46 RuboCop::Cop::Lint::ElseLayout::MSG = T.let(T.unsafe(nil), String) # Checks for blocks without a body. @@ -18782,104 +18778,100 @@ class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#70 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#71 def on_if(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#156 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#177 def all_branches_body_missing?(node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#83 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#95 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#142 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#163 def branch_range(node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#104 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#125 def correct_other_branches(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#162 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#183 def deletion_range(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#137 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#158 def else_branch?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#131 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#152 def empty_elsif_branch?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#123 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#144 def empty_if_branch?(node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#89 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#87 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#101 def remove_comments(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#96 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#109 def remove_empty_branch(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#116 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#137 def require_other_branches_correction?(node); end end # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#68 RuboCop::Cop::Lint::EmptyConditionalBody::MSG = T.let(T.unsafe(nil), String) -# Checks for empty `ensure` blocks +# Checks for empty `ensure` blocks. # # @example # # # bad -# # def some_method # do_something # ensure # end -# @example # # # bad -# # begin # do_something # ensure # end -# @example # # # good -# # def some_method # do_something # ensure # do_something_else # end -# @example # # # good -# # begin # do_something # ensure # do_something_else # end # -# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#45 +# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#35 class RuboCop::Cop::Lint::EmptyEnsure < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#50 + # source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#40 def on_ensure(node); end end -# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#48 +# source://rubocop//lib/rubocop/cop/lint/empty_ensure.rb#38 RuboCop::Cop::Lint::EmptyEnsure::MSG = T.let(T.unsafe(nil), String) # Checks for the presence of empty expressions. @@ -19014,24 +19006,21 @@ RuboCop::Cop::Lint::EmptyInPattern::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # "result is #{}" -# @example # # # good -# # "result is #{some_result}" # -# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#19 +# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#15 class RuboCop::Cop::Lint::EmptyInterpolation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Interpolation extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#25 + # source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#21 def on_interpolation(begin_node); end end -# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#23 +# source://rubocop//lib/rubocop/cop/lint/empty_interpolation.rb#19 RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) # Checks for the presence of `when` branches without a body. @@ -19044,7 +19033,6 @@ RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) # do_something # when baz # end -# @example # # # good # case condition @@ -19072,15 +19060,15 @@ RuboCop::Cop::Lint::EmptyInterpolation::MSG = T.let(T.unsafe(nil), String) # # do nothing # end # -# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#47 +# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#45 class RuboCop::Cop::Lint::EmptyWhen < ::RuboCop::Cop::Base include ::RuboCop::Cop::CommentsHelp - # source://rubocop//lib/rubocop/cop/lint/empty_when.rb#52 + # source://rubocop//lib/rubocop/cop/lint/empty_when.rb#50 def on_case(node); end end -# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#50 +# source://rubocop//lib/rubocop/cop/lint/empty_when.rb#48 RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) # Checks for `return` from an `ensure` block. @@ -19093,17 +19081,14 @@ RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # def foo # do_something # ensure # cleanup # return self # end -# @example # # # good -# # def foo # do_something # self @@ -19111,8 +19096,7 @@ RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) # cleanup # end # -# # also good -# +# # good # def foo # begin # do_something @@ -19124,16 +19108,16 @@ RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) # cleanup # end # -# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#47 +# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#42 class RuboCop::Cop::Lint::EnsureReturn < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#53 + # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#48 def on_ensure(node); end end -# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#51 +# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#46 RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) # Emulates the following Ruby warnings in Ruby 2.6. @@ -19345,21 +19329,18 @@ RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # @example # # # bad -# # float = 3.0e400 -# @example # # # good -# # float = 42.9 # -# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#21 +# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#17 class RuboCop::Cop::Lint::FloatOutOfRange < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#24 + # source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#20 def on_float(node); end end -# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#22 +# source://rubocop//lib/rubocop/cop/lint/float_out_of_range.rb#18 RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) # This lint sees if there is a mismatch between the number of @@ -19373,138 +19354,131 @@ RuboCop::Cop::Lint::FloatOutOfRange::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # format('A value: %s and another: %i', a_value) -# @example # # # good -# # format('A value: %s and another: %i', a_value, another) -# @example # # # bad -# # format('Unnumbered format: %s and numbered: %2$s', a_value, another) -# @example # # # good -# # format('Numbered format: %1$s and numbered %2$s', a_value, another) # -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#37 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#27 class RuboCop::Cop::Lint::FormatParameterMismatch < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#100 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#90 def called_on_string?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#49 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#39 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#137 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#127 def count_format_matches(node); end - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#119 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#109 def count_matches(node); end - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#141 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#131 def count_percent_matches(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#129 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#119 def countable_format?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#133 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#123 def countable_percent?(node); end - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#153 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#143 def expected_fields_count(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#168 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#158 def format?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#146 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#136 def format_method?(name, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#64 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#54 def format_string?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#115 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#105 def heredoc?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#68 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#58 def invalid_format_string?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#91 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#81 def matched_arguments_count?(expected, passed); end - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#186 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#176 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#105 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#95 def method_with_format_args?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#77 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#67 def offending_node?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#176 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#166 def percent?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#109 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#99 def splat_args?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#172 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#162 def sprintf?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#195 + # source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#185 def string_type?(node); end end -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#44 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#34 RuboCop::Cop::Lint::FormatParameterMismatch::KERNEL = T.let(T.unsafe(nil), String) # http://rubular.com/r/CvpbxkcTzy # -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#39 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#29 RuboCop::Cop::Lint::FormatParameterMismatch::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#41 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#31 RuboCop::Cop::Lint::FormatParameterMismatch::MSG_INVALID = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#47 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#37 RuboCop::Cop::Lint::FormatParameterMismatch::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#45 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#35 RuboCop::Cop::Lint::FormatParameterMismatch::SHOVEL = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#46 +# source://rubocop//lib/rubocop/cop/lint/format_parameter_mismatch.rb#36 RuboCop::Cop::Lint::FormatParameterMismatch::STRING_TYPES = T.let(T.unsafe(nil), Array) # Prefer using `Hash#compare_by_identity` rather than using `object_id` @@ -19684,12 +19658,9 @@ RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # @example # # # bad -# # array = ['Item 1' 'Item 2'] -# @example # # # good -# # array = ['Item 1Item 2'] # array = ['Item 1' + 'Item 2'] # array = [ @@ -19697,45 +19668,45 @@ RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # 'Item 2' # ] # -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#25 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#21 class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#36 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#32 def on_dstr(node); end private - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#90 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#86 def display_str(node); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#57 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#53 def each_bad_cons(node); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#72 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#68 def ending_delimiter(str); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#98 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#94 def str_content(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#82 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#78 def string_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#86 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#82 def string_literals?(node1, node2); end end -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#30 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26 RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_ARRAY = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#32 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28 RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#24 RuboCop::Cop::Lint::ImplicitStringConcatenation::MSG = T.let(T.unsafe(nil), String) # Checks for `IO.select` that is incompatible with Fiber Scheduler since Ruby 3.0. @@ -19797,7 +19768,6 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T # @example # # # bad -# # class C # private # @@ -19805,10 +19775,8 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T # puts 'hi' # end # end -# @example # # # good -# # class C # def self.method # puts 'hi' @@ -19816,10 +19784,8 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T # # private_class_method :method # end -# @example # # # good -# # class C # class << self # private @@ -19830,49 +19796,49 @@ RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler::RESTRICT_ON_SEND = T # end # end # -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#48 +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#41 class RuboCop::Cop::Lint::IneffectiveAccessModifier < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 def on_class(node); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 def on_module(node); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#55 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#48 def private_class_methods(param0); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#109 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#102 def access_modifier?(node); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#66 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#59 def check_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#113 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#106 def correct_visibility?(node, modifier, ignored_methods); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#78 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#71 def format_message(modifier); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#91 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#84 def ineffective_modifier(node, ignored_methods = T.unsafe(nil), modifier = T.unsafe(nil), &block); end - # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#74 + # source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#67 def private_class_method_names(node); end end -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#51 +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#44 RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PRIVATE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#52 +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#45 RuboCop::Cop::Lint::IneffectiveAccessModifier::ALTERNATIVE_PROTECTED = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#49 +# source://rubocop//lib/rubocop/cop/lint/ineffective_access_modifier.rb#42 RuboCop::Cop::Lint::IneffectiveAccessModifier::MSG = T.let(T.unsafe(nil), String) # Looks for error classes inheriting from `Exception`. @@ -19951,33 +19917,30 @@ RuboCop::Cop::Lint::InheritException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # @example # # # bad -# # foo = 'something with #{interpolation} inside' -# @example # # # good -# # foo = "something with #{interpolation} inside" # -# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#25 +# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#21 class RuboCop::Cop::Lint::InterpolationCheck < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#31 + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#27 def on_str(node); end private - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#42 + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#38 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#53 + # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#49 def heredoc?(node); end end -# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#28 +# source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#24 RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String) # Emulates the following Ruby warning in Ruby 3.3. @@ -20220,84 +20183,81 @@ RuboCop::Cop::Lint::LiteralAssignmentInCondition::MSG = T.let(T.unsafe(nil), Str # @example # # # bad -# # "result is #{10}" -# @example # # # good -# # "result is 10" # -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#19 +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#15 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#28 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#24 def on_interpolation(begin_node); end private - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#62 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#58 def autocorrected_value(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#108 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#104 def autocorrected_value_for_array(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#114 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#110 def autocorrected_value_for_hash(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#84 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#80 def autocorrected_value_for_string(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#92 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#88 def autocorrected_value_for_symbol(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#125 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#121 def autocorrected_value_in_hash(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#99 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#95 def autocorrected_value_in_hash_for_symbol(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#155 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#151 def ends_heredoc_line?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#163 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#159 def in_array_percent_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#48 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#44 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#146 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#142 def prints_as_self?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#151 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#147 def space_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#56 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#52 def special_keyword?(node); end end -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#26 +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#22 RuboCop::Cop::Lint::LiteralInInterpolation::COMPOSITE = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#25 +# source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#21 RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) # Checks for uses of `begin...end while/until something`. @@ -20310,15 +20270,6 @@ RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) # begin # do_something # end while some_condition -# @example -# -# # bad -# -# # using until -# begin -# do_something -# end until some_condition -# @example # # # good # @@ -20327,7 +20278,13 @@ RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) # do_something # break unless some_condition # end -# @example +# +# # bad +# +# # using until +# begin +# do_something +# end until some_condition # # # good # @@ -20337,29 +20294,29 @@ RuboCop::Cop::Lint::LiteralInInterpolation::MSG = T.let(T.unsafe(nil), String) # break if some_condition # end # -# source://rubocop//lib/rubocop/cop/lint/loop.rb#50 +# source://rubocop//lib/rubocop/cop/lint/loop.rb#44 class RuboCop::Cop::Lint::Loop < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/loop.rb#59 + # source://rubocop//lib/rubocop/cop/lint/loop.rb#53 def on_until_post(node); end - # source://rubocop//lib/rubocop/cop/lint/loop.rb#55 + # source://rubocop//lib/rubocop/cop/lint/loop.rb#49 def on_while_post(node); end private - # source://rubocop//lib/rubocop/cop/lint/loop.rb#79 + # source://rubocop//lib/rubocop/cop/lint/loop.rb#73 def build_break_line(node); end - # source://rubocop//lib/rubocop/cop/lint/loop.rb#75 + # source://rubocop//lib/rubocop/cop/lint/loop.rb#69 def keyword_and_condition_range(node); end - # source://rubocop//lib/rubocop/cop/lint/loop.rb#65 + # source://rubocop//lib/rubocop/cop/lint/loop.rb#59 def register_offense(node); end end -# source://rubocop//lib/rubocop/cop/lint/loop.rb#53 +# source://rubocop//lib/rubocop/cop/lint/loop.rb#47 RuboCop::Cop::Lint::Loop::MSG = T.let(T.unsafe(nil), String) # cop disables on wide ranges of code, that latter contributors to @@ -20705,15 +20662,17 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # Checks for nested method definitions. # -# @example AllowedPatterns: ['baz'] -# # good -# def foo(obj) -# obj.do_baz do +# @example +# +# # bad +# +# # `bar` definition actually produces methods in the same scope +# # as the outer `foo` method. Furthermore, the `bar` method +# # will be redefined every time `foo` is invoked. +# def foo # def bar # end # end -# end -# @example # # # good # @@ -20721,7 +20680,6 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # bar = -> { puts 'hello' } # bar.call # end -# @example # # # good # @@ -20741,7 +20699,6 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # end # end # end -# @example # # # good # @@ -20775,49 +20732,46 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # end # end # end -# @example -# -# # bad -# -# # `bar` definition actually produces methods in the same scope -# # as the outer `foo` method. Furthermore, the `bar` method -# # will be redefined every time `foo` is invoked. -# def foo +# @example AllowedPatterns: ['baz'] +# # good +# def foo(obj) +# obj.do_baz do # def bar # end # end +# end # -# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 +# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#91 class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#133 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#127 def eval_call?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#138 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#132 def exec_call?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#103 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 def on_def(node); end - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#103 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#97 def on_defs(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#126 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#120 def allowed_method_name?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#121 + # source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#115 def scoping_method_call?(child); end end -# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#101 +# source://rubocop//lib/rubocop/cop/lint/nested_method_definition.rb#95 RuboCop::Cop::Lint::NestedMethodDefinition::MSG = T.let(T.unsafe(nil), String) # Checks for nested percent literals. @@ -20883,38 +20837,35 @@ RuboCop::Cop::Lint::NestedPercentLiteral::REGEXES = T.let(T.unsafe(nil), Array) # @example # # # bad -# # result = (1..4).reduce(0) do |acc, i| # next if i.odd? # acc + i # end -# @example # # # good -# # result = (1..4).reduce(0) do |acc, i| # next acc if i.odd? # acc + i # end # -# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#25 +# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#21 class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#28 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#24 def on_block(node); end - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#42 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#38 def on_block_body_of_reduce(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#28 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#24 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#49 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#45 def parent_block_node(node); end end -# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#26 +# source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#22 RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) # Checks for the presence of a `return` inside a `begin..end` block @@ -20925,16 +20876,13 @@ RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # @some_variable ||= begin # return some_value if some_condition_is_met # # do_something # end -# @example # # # good -# # @some_variable ||= begin # if some_condition_is_met # some_value @@ -20944,7 +20892,6 @@ RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) # end # # # good -# # some_variable = if some_condition_is_met # return if another_condition_is_met # @@ -20953,19 +20900,19 @@ RuboCop::Cop::Lint::NextWithoutAccumulator::MSG = T.let(T.unsafe(nil), String) # do_something # end # -# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#43 +# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#38 class RuboCop::Cop::Lint::NoReturnInBeginEndBlocks < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46 + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46 + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 def on_op_asgn(node); end - # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#46 + # source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#41 def on_or_asgn(node); end end -# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#44 +# source://rubocop//lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb#39 RuboCop::Cop::Lint::NoReturnInBeginEndBlocks::MSG = T.let(T.unsafe(nil), String) # Checks for non-atomic file operation. @@ -21653,44 +21600,41 @@ RuboCop::Cop::Lint::ParenthesesAsGroupedExpression::MSG = T.let(T.unsafe(nil), S # @example # # # bad -# # %w('foo', "bar") -# @example # # # good -# # %w(foo bar) # -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#33 +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#29 class RuboCop::Cop::Lint::PercentStringArray < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::PercentLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#44 + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#40 def on_array(node); end - # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#48 + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#44 def on_percent_literal(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#65 + # source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#61 def contains_quotes_or_commas?(node); end end -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#38 +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#34 RuboCop::Cop::Lint::PercentStringArray::LEADING_QUOTE = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#41 +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#37 RuboCop::Cop::Lint::PercentStringArray::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#37 +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#33 RuboCop::Cop::Lint::PercentStringArray::QUOTES_AND_COMMAS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#39 +# source://rubocop//lib/rubocop/cop/lint/percent_string_array.rb#35 RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Regexp) # Checks for colons and commas in %i, e.g. `%i(:foo, :bar)` @@ -21702,43 +21646,40 @@ RuboCop::Cop::Lint::PercentStringArray::TRAILING_QUOTE = T.let(T.unsafe(nil), Re # @example # # # bad -# # %i(:foo, :bar) -# @example # # # good -# # %i(foo bar) # -# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#23 +# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#19 class RuboCop::Cop::Lint::PercentSymbolArray < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::PercentLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#30 + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#26 def on_array(node); end - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#34 + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#30 def on_percent_literal(node); end private - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#42 + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#38 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#52 + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#48 def contains_colons_or_commas?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#62 + # source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#58 def non_alphanumeric_literal?(literal); end end -# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#27 +# source://rubocop//lib/rubocop/cop/lint/percent_symbol_array.rb#23 RuboCop::Cop::Lint::PercentSymbolArray::MSG = T.let(T.unsafe(nil), String) # Checks for `raise` or `fail` statements which are @@ -21804,35 +21745,32 @@ RuboCop::Cop::Lint::RaiseException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # @example # # # bad -# # rand 1 # Kernel.rand(-1) # rand 1.0 # rand(-1.0) -# @example # # # good -# # 0 # just use 0 instead # -# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#23 +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#19 class RuboCop::Cop::Lint::RandOne < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#32 + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#28 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#28 + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#24 def rand_one?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#40 + # source://rubocop//lib/rubocop/cop/lint/rand_one.rb#36 def message(node); end end -# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#24 +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#20 RuboCop::Cop::Lint::RandOne::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#25 +# source://rubocop//lib/rubocop/cop/lint/rand_one.rb#21 RuboCop::Cop::Lint::RandOne::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # removed without causing any offenses to be reported. It's implemented @@ -22013,13 +21951,14 @@ RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.le # that cop checks whether any cop was actually enabled. # # @example +# # # bad # foo = 1 # # rubocop:enable Layout/LineLength # # # good # foo = 1 -# @example +# # # bad # # rubocop:disable Style/StringLiterals # foo = "1" @@ -22033,54 +21972,54 @@ RuboCop::Cop::Lint::RedundantCopDisableDirective::SIMILAR_COP_NAMES_CACHE = T.le # # rubocop:enable all # baz # -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#37 +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#39 class RuboCop::Cop::Lint::RedundantCopEnableDirective < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::SurroundingSpace extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#44 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#46 def on_new_investigation; end private - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#120 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#122 def all_or_name(name); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#76 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#78 def comment_start(comment); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#80 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#82 def cop_name_indention(comment, name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#124 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#126 def department?(directive, name); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#71 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#73 def range_of_offense(comment, name); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#95 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#97 def range_to_remove(begin_pos, end_pos, comment); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#84 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#86 def range_with_comma(comment, name); end # If the list of cops is comma-separated, but without a empty space after the comma, # we should **not** remove the prepending empty space, thus begin_pos += 1 # - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#114 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#116 def range_with_comma_after(comment, start, begin_pos, end_pos); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#108 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#110 def range_with_comma_before(start, begin_pos, end_pos); end - # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#53 + # source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#55 def register_offense(comment, cop_names); end end -# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#42 +# source://rubocop//lib/rubocop/cop/lint/redundant_cop_enable_directive.rb#44 RuboCop::Cop::Lint::RedundantCopEnableDirective::MSG = T.let(T.unsafe(nil), String) # Sort globbed results by default in Ruby 3.0. @@ -22381,7 +22320,7 @@ RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsa # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#87 RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) -# Checks for unneeded usages of splat expansion +# Checks for unneeded usages of splat expansion. # # @example # @@ -22534,47 +22473,44 @@ RuboCop::Cop::Lint::RedundantSplatExpansion::PERCENT_W = T.let(T.unsafe(nil), St # @example # # # bad -# # "result is #{something.to_s}" # print something.to_s # puts something.to_s # warn something.to_s -# @example # # # good -# # "result is #{something}" # print something # puts something # warn something # -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#27 +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#23 class RuboCop::Cop::Lint::RedundantStringCoercion < ::RuboCop::Cop::Base include ::RuboCop::Cop::Interpolation extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#38 + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#34 def on_interpolation(begin_node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#46 + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#42 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#36 + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#32 def to_s_without_args?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#58 + # source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#54 def register_offense(node, context); end end -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#31 +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#27 RuboCop::Cop::Lint::RedundantStringCoercion::MSG_DEFAULT = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#32 +# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#28 RuboCop::Cop::Lint::RedundantStringCoercion::MSG_SELF = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/redundant_string_coercion.rb#33 +# 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 `with_index`. @@ -22754,38 +22690,35 @@ RuboCop::Cop::Lint::RegexpAsCondition::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # if day.is? :tuesday && month == :jan # # ... # end -# @example # # # good -# # if day.is?(:tuesday) && month == :jan # # ... # end # -# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#30 +# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#26 class RuboCop::Cop::Lint::RequireParentheses < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#35 + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#31 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#35 + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#31 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#58 + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#54 def check_predicate(predicate, node); end - # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#48 + # source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#44 def check_ternary(ternary, node); end end -# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#33 +# source://rubocop//lib/rubocop/cop/lint/require_parentheses.rb#29 RuboCop::Cop::Lint::RequireParentheses::MSG = T.let(T.unsafe(nil), String) # Checks that a range literal is enclosed in parentheses when the end of the range is @@ -22879,34 +22812,31 @@ RuboCop::Cop::Lint::RequireRelativeSelfPath::RESTRICT_ON_SEND = T.let(T.unsafe(n # @example # # # bad -# # begin # do_something # rescue Exception # handle_exception # end -# @example # # # good -# # begin # do_something # rescue ArgumentError # handle_exception # end # -# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#27 +# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#23 class RuboCop::Cop::Lint::RescueException < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#30 + # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#26 def on_resbody(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#39 + # source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#35 def targets_exception?(rescue_arg_node); end end -# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#28 +# source://rubocop//lib/rubocop/cop/lint/rescue_exception.rb#24 RuboCop::Cop::Lint::RescueException::MSG = T.let(T.unsafe(nil), String) # Check for arguments to `rescue` that will result in a `TypeError` @@ -22984,7 +22914,6 @@ RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String) # def foo=(bar) # return 42 # end -# @example # # # good # def initialize @@ -22997,18 +22926,18 @@ RuboCop::Cop::Lint::RescueType::MSG = T.let(T.unsafe(nil), String) # return # end # -# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#34 +# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#32 class RuboCop::Cop::Lint::ReturnInVoidContext < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#37 + # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#35 def on_return(return_node); end private - # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#53 + # source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#51 def non_void_context(return_node); end end -# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#35 +# source://rubocop//lib/rubocop/cop/lint/return_in_void_context.rb#33 RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String) # The safe navigation operator returns nil if the receiver is @@ -23020,28 +22949,25 @@ RuboCop::Cop::Lint::ReturnInVoidContext::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # x&.foo.bar # x&.foo + bar # x&.foo[bar] -# @example # # # good -# # x&.foo&.bar # x&.foo || bar # -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#26 +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#22 class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::NilMethods extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#37 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33 def bad_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#44 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#40 def on_send(node); end private @@ -23050,31 +22976,31 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base # @param send_node [RuboCop::AST::SendNode] # @return [String] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#62 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#58 def add_safe_navigation_operator(offense_range:, send_node:); end # @param corrector [RuboCop::Cop::Corrector] # @param offense_range [Parser::Source::Range] # @param send_node [RuboCop::AST::SendNode] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#81 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#77 def autocorrect(corrector, offense_range:, send_node:); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#90 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#86 def brackets?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#94 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#90 def require_parentheses?(send_node); end end -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#33 +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#29 RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#34 +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#30 RuboCop::Cop::Lint::SafeNavigationChain::PLUS_MINUS_METHODS = T.let(T.unsafe(nil), Array) # Check to make sure that if safe navigation is used for a method @@ -23577,17 +23503,16 @@ RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) # because `Ractor` should not access outer variables. # eg. following style is encouraged: # -# [source,ruby] -# ---- -# worker_id, pipe = env -# Ractor.new(worker_id, pipe) do |worker_id, pipe| -# end -# ---- +# [source,ruby] +# ---- +# worker_id, pipe = env +# Ractor.new(worker_id, pipe) do |worker_id, pipe| +# end +# ---- # # @example # # # bad -# # def some_method # foo = 1 # @@ -23595,10 +23520,8 @@ RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) # do_something(foo) # end # end -# @example # # # good -# # def some_method # foo = 1 # @@ -23607,37 +23530,37 @@ RuboCop::Cop::Lint::ShadowedException::MSG = T.let(T.unsafe(nil), String) # end # end # -# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#45 +# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#41 class RuboCop::Cop::Lint::ShadowingOuterLocalVariable < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#57 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#53 def before_declaring_variable(variable, variable_table); end - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#93 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#89 def find_conditional_node_from_ascendant(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#100 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#96 def node_or_its_ascendant_conditional?(node); end - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#45 def ractor_block?(param0 = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#69 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#65 def same_conditions_node_different_branch?(variable, outer_local_variable); end - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#83 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#79 def variable_node(variable); end class << self - # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#53 + # source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#49 def joining_forces; end end end -# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#46 +# source://rubocop//lib/rubocop/cop/lint/shadowing_outer_local_variable.rb#42 RuboCop::Cop::Lint::ShadowingOuterLocalVariable::MSG = T.let(T.unsafe(nil), String) # Checks unexpected overrides of the `Struct` built-in methods @@ -24288,27 +24211,24 @@ RuboCop::Cop::Lint::UnexpectedBlockArity::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # 1.is_a?(Fixnum) # 1.is_a?(Bignum) -# @example # # # good -# # 1.is_a?(Integer) # -# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#20 +# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#16 class RuboCop::Cop::Lint::UnifiedInteger < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#26 + # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#22 def fixnum_or_bignum_const(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#30 + # source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#26 def on_const(node); end end -# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#23 +# source://rubocop//lib/rubocop/cop/lint/unified_integer.rb#19 RuboCop::Cop::Lint::UnifiedInteger::MSG = T.let(T.unsafe(nil), String) # Looks for `reduce` or `inject` blocks where the value returned (implicitly or @@ -24460,14 +24380,12 @@ RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil) # @example # # # bad -# # def some_method # return # do_something # end # # # bad -# # def some_method # if cond # return @@ -24476,40 +24394,38 @@ RuboCop::Cop::Lint::UnmodifiedReduceAccumulator::MSG_INDEX = T.let(T.unsafe(nil) # end # do_something # end -# @example # # # good -# # def some_method # do_something # end # -# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#37 +# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#32 class RuboCop::Cop::Lint::UnreachableCode < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#55 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#50 def flow_command?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#40 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#35 def on_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#40 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#35 def on_kwbegin(node); end private - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#87 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#82 def check_case(node); end - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#81 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#76 def check_if(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#65 + # source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#60 def flow_expression?(node); end end -# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#38 +# source://rubocop//lib/rubocop/cop/lint/unreachable_code.rb#33 RuboCop::Cop::Lint::UnreachableCode::MSG = T.let(T.unsafe(nil), String) # Checks for loops that will have at most one iteration. @@ -25174,103 +25090,105 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) # reassignments and properly handles varied cases such as branch, loop, # 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 +# a local variable. For example, replacing `a ||= 1` with `a || 1` may cause +# "undefined local variable or method `a' for main:Object (NameError)". +# # NOTE: Given the assignment `foo = 1, bar = 2`, removing unused variables # can lead to a syntax error, so this case is not autocorrected. # # @example # # # bad -# # def some_method # some_var = 1 # do_something # end -# @example # # # good -# # def some_method # some_var = 1 # do_something(some_var) # end # -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#40 class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#51 def after_leaving_scope(scope, _variable_table); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#162 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#165 def autocorrect(corrector, assignment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#106 def chained_assignment?(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#61 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56 def check_for_unused_assignments(variable); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#146 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#149 def collect_variable_like_names(scope); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#79 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#82 def message_for_useless_assignment(assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#107 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#110 def message_specification(assignment, variable); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#117 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#120 def multiple_assignment_message(variable_name); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#85 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#88 def offense_range(assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#122 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#125 def operator_assignment_message(scope, assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#179 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#182 def remove_exception_assignment_part(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#203 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#206 def remove_local_variable_assignment_part(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#192 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#195 def remove_trailing_character_from_operator(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#188 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#191 def rename_variable_with_underscore(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#196 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#199 def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end # TODO: More precise handling (rescue, ensure, nested begin, etc.) # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#136 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#139 def return_value_node_of_scope(scope); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#93 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#96 def sequential_assignment?(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#129 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#132 def similar_name_message(variable); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#155 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#158 def variable_like_method_invocation?(node); end class << self - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#52 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#47 def joining_forces; end end end -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#50 +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) # Checks for useless `else` in `begin..end` without `rescue`. @@ -25280,16 +25198,13 @@ RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) # @example # # # bad -# # begin # do_something # else # do_something_else # This will never be run. # end -# @example # # # good -# # begin # do_something # rescue @@ -25298,13 +25213,13 @@ RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) # do_something_else # end # -# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#31 +# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#27 class RuboCop::Cop::Lint::UselessElseWithoutRescue < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#34 + # source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#30 def on_new_investigation; end end -# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#32 +# source://rubocop//lib/rubocop/cop/lint/useless_else_without_rescue.rb#28 RuboCop::Cop::Lint::UselessElseWithoutRescue::MSG = T.let(T.unsafe(nil), String) # Checks for useless method definitions, specifically: empty constructors @@ -25366,6 +25281,62 @@ end # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#41 RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String) +# Certain numeric operations have no impact, being: +# Adding or subtracting 0, multiplying or dividing by 1 or raising to the power of 1. +# These are probably leftover from debugging, or are mistakes. +# +# @example +# +# # bad +# x + 0 +# x - 0 +# x * 1 +# x / 1 +# x ** 1 +# +# # good +# x +# +# # bad +# x += 0 +# x -= 0 +# x *= 1 +# x /= 1 +# x **= 1 +# +# # good +# x = x +# +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#32 +class RuboCop::Cop::Lint::UselessNumericOperation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#54 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#43 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#41 + def useless_abbreviated_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#38 + def useless_operation?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#67 + def useless?(operation, number); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#34 +RuboCop::Cop::Lint::UselessNumericOperation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#35 +RuboCop::Cop::Lint::UselessNumericOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for useless `rescue`s, which only reraise rescued exceptions. # # @example @@ -25532,83 +25503,80 @@ RuboCop::Cop::Lint::UselessRuby2Keywords::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # @example # # # bad -# # def something # x = Something.new # x.attr = 5 # end -# @example # # # good -# # def something # x = Something.new # x.attr = 5 # x # end # -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#35 +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#31 class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#41 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#37 def on_def(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#41 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#37 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#63 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#59 def setter_call_to_local_variable?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#67 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#63 def last_expression(body); end end -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#39 +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#35 RuboCop::Cop::Lint::UselessSetterCall::ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#38 +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#34 RuboCop::Cop::Lint::UselessSetterCall::MSG = T.let(T.unsafe(nil), String) # This class tracks variable assignments in a method body # and if a variable contains object passed as argument at the end of # the method. # -# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#76 +# source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#72 class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker # @return [MethodVariableTracker] a new instance of MethodVariableTracker # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#77 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#73 def initialize(body_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#163 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#159 def constructor?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#82 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#78 def contain_local_object?(variable_name); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#152 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#148 def process_assignment(asgn_node, rhs_node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#100 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#96 def process_assignment_node(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#142 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#138 def process_binary_operator_assignment(op_asgn_node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#133 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#129 def process_logical_operator_assignment(asgn_node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#114 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#110 def process_multiple_assignment(masgn_node); end - # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#92 + # source://rubocop//lib/rubocop/cop/lint/useless_setter_call.rb#88 def scan(node, &block); end end @@ -25730,61 +25698,77 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/void.rb#92 + # source://rubocop//lib/rubocop/cop/lint/void.rb#90 def on_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#82 + # source://rubocop//lib/rubocop/cop/lint/void.rb#81 def on_block(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#92 + # source://rubocop//lib/rubocop/cop/lint/void.rb#95 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#90 def on_kwbegin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#82 + # source://rubocop//lib/rubocop/cop/lint/void.rb#81 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/lint/void.rb#222 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#258 + def all_keys_entirely_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#262 + def all_values_entirely_literal?(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#236 def autocorrect_nonmutating_send(corrector, node, suggestion); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#216 + # source://rubocop//lib/rubocop/cop/lint/void.rb#230 def autocorrect_void_expression(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#204 + # source://rubocop//lib/rubocop/cop/lint/void.rb#218 def autocorrect_void_op(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#99 + # source://rubocop//lib/rubocop/cop/lint/void.rb#101 def check_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#113 + # source://rubocop//lib/rubocop/cop/lint/void.rb#198 + def check_ensure(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#115 def check_expression(expr); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#154 + # source://rubocop//lib/rubocop/cop/lint/void.rb#156 def check_literal(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#178 + # source://rubocop//lib/rubocop/cop/lint/void.rb#180 def check_nonmutating(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#162 + # source://rubocop//lib/rubocop/cop/lint/void.rb#164 def check_self(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#136 + # source://rubocop//lib/rubocop/cop/lint/void.rb#138 def check_var(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#170 + # source://rubocop//lib/rubocop/cop/lint/void.rb#172 def check_void_expression(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#125 + # source://rubocop//lib/rubocop/cop/lint/void.rb#127 def check_void_op(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#231 + # source://rubocop//lib/rubocop/cop/lint/void.rb#245 def entirely_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#196 + # source://rubocop//lib/rubocop/cop/lint/void.rb#211 def in_void_context?(node); end end @@ -25800,13 +25784,13 @@ RuboCop::Cop::Lint::Void::EXPRESSION_MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/lint/void.rb#61 RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#77 +# source://rubocop//lib/rubocop/cop/lint/void.rb#76 RuboCop::Cop::Lint::Void::METHODS_REPLACEABLE_BY_EACH = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#79 +# source://rubocop//lib/rubocop/cop/lint/void.rb#78 RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#70 +# source://rubocop//lib/rubocop/cop/lint/void.rb#69 RuboCop::Cop::Lint::Void::NONMUTATING_METHODS_WITH_BANG_VERSION = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/lint/void.rb#64 @@ -25827,9 +25811,6 @@ RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/lint/void.rb#59 RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#69 -RuboCop::Cop::Lint::Void::VOID_CONTEXT_TYPES = T.let(T.unsafe(nil), Array) - # Common functionality for obtaining source ranges from regexp matches # # source://rubocop//lib/rubocop/cop/mixin/match_range.rb#6 @@ -26092,8 +26073,9 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # The cop can be configured to ignore blocks passed to certain methods. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. # # NOTE: This cop does not apply for `Struct` definitions. # @@ -26101,7 +26083,7 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # for backwards compatibility. Please use `AllowedMethods` and `AllowedPatterns` # instead. By default, there are no methods to allowed. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # something do # array = [ # +1 @@ -26109,7 +26091,7 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # 2 # ] # -# hash = { # +3 +# hash = { # +1 # key: 'value' # } # @@ -26122,32 +26104,32 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#44 +# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#45 class RuboCop::Cop::Metrics::BlockLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#51 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#52 def on_block(node); end - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#51 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#52 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#80 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#81 def cop_label; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#62 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#63 def method_receiver_excluded?(node); end end -# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#49 +# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#50 RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String) # Checks for excessive nesting of conditional and looping constructs. @@ -26204,12 +26186,13 @@ RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array # The maximum allowed length is configurable. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. # # NOTE: This cop also applies for `Struct` definitions. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # class Foo # ARRAY = [ # +1 @@ -26217,7 +26200,7 @@ RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array # 2 # ] # -# HASH = { # +3 +# HASH = { # +1 # key: 'value' # } # @@ -26230,24 +26213,24 @@ RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/class_length.rb#39 +# source://rubocop//lib/rubocop/cop/metrics/class_length.rb#40 class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#52 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#53 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#42 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#43 def on_class(node); end - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#46 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#47 def on_sclass(node); end private - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#70 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#71 def message(length, max_length); end end @@ -26378,15 +26361,16 @@ RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) # The maximum allowed length is configurable. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. # # NOTE: The `ExcludedMethods` and `IgnoredMethods` configuration is # deprecated and only kept for backwards compatibility. # Please use `AllowedMethods` and `AllowedPatterns` instead. # By default, there are no methods to allowed. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # def m # array = [ # +1 @@ -26394,7 +26378,7 @@ RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) # 2 # ] # -# hash = { # +3 +# hash = { # +1 # key: 'value' # } # @@ -26407,33 +26391,33 @@ RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#42 +# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#43 class RuboCop::Cop::Metrics::MethodLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#56 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#57 def on_block(node); end - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#49 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#50 def on_def(node); end - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#49 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#50 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#56 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#57 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#65 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#66 def cop_label; end end -# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#47 +# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#48 RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # Checks if the length of a module exceeds some maximum value. @@ -26441,10 +26425,11 @@ RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # The maximum allowed length is configurable. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # module M # ARRAY = [ # +1 @@ -26452,7 +26437,7 @@ RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # 2 # ] # -# HASH = { # +3 +# HASH = { # +1 # key: 'value' # } # @@ -26465,24 +26450,24 @@ RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/module_length.rb#37 +# source://rubocop//lib/rubocop/cop/metrics/module_length.rb#38 class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#51 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#52 def module_definition?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#44 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#45 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#40 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#41 def on_module(node); end private - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#55 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#56 def message(length, max_length); end end @@ -27476,16 +27461,21 @@ class RuboCop::Cop::Naming::AccessorMethodName < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#61 + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#66 def bad_reader_name?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#65 + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#70 def bad_writer_name?(node); end - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#53 + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#54 def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#62 + def proper_attribute_name?(node); end end # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#39 @@ -28575,94 +28565,109 @@ class RuboCop::Cop::Naming::MethodParameterName < ::RuboCop::Cop::Base def on_defs(node); end end -# Checks that predicate methods names end with a question mark and +# Checks that predicate method names end with a question mark and # do not start with a forbidden prefix. # -# A method is determined to be a predicate method if its name starts -# with one of the prefixes defined in the `NamePrefix` configuration. -# You can change what prefixes are considered by changing this option. -# Any method name that starts with one of these prefixes is required by -# the cop to end with a `?`. Other methods can be allowed by adding to -# the `AllowedMethods` configuration. +# A method is determined to be a predicate method if its name starts with +# one of the prefixes listed in the `NamePrefix` configuration. The list +# defaults to `is_`, `has_`, and `have_` but may be overridden. # -# NOTE: The `is_a?` method is allowed by default. +# Predicate methods must end with a question mark. # -# If `ForbiddenPrefixes` is set, methods that start with the configured -# prefixes will not be allowed and will be removed by autocorrection. +# When `ForbiddenPrefixes` is also set (as it is by default), predicate +# methods which begin with a forbidden prefix are not allowed, even if +# they end with a `?`. These methods should be changed to remove the +# prefix. # -# In other words, if `ForbiddenPrefixes` is empty, a method named `is_foo` -# will register an offense only due to the lack of question mark (and will be -# autocorrected to `is_foo?`). If `ForbiddenPrefixes` contains `is_`, -# `is_foo` will register an offense both because the ? is missing and because of -# the `is_` prefix, and will be corrected to `foo?`. -# -# NOTE: `ForbiddenPrefixes` is only applied to prefixes in `NamePrefix`; -# a prefix in the former but not the latter will not be considered by -# this cop. -# -# @example +# @example NamePrefix: ['is_', 'has_', 'have_'] (default) # # bad # def is_even(value) # end # -# def is_even?(value) -# end -# +# # When ForbiddenPrefixes: ['is_', 'has_', 'have_'] (default) # # good # def even?(value) # end # -# # bad -# def has_value -# end -# -# def has_value? -# end -# +# # When ForbiddenPrefixes: [] # # good -# def value? +# def is_even?(value) +# end +# @example NamePrefix: ['seems_to_be_'] +# # bad +# def seems_to_be_even(value) +# end +# +# # When ForbiddenPrefixes: ['seems_to_be_'] +# # good +# def even?(value) +# end +# +# # When ForbiddenPrefixes: [] +# # good +# def seems_to_be_even?(value) # end # @example AllowedMethods: ['is_a?'] (default) +# # Despite starting with the `is_` prefix, this method is allowed # # good # def is_a?(value) # end +# @example AllowedMethods: ['is_even?'] +# # good +# def is_even?(value) +# end +# @example MethodDefinitionMacros: ['define_method', 'define_singleton_method'] (default) +# # bad +# define_method(:is_even) { |value| } # -# source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#59 +# # good +# define_method(:even?) { |value| } +# @example MethodDefinitionMacros: ['def_node_matcher'] +# # bad +# def_node_matcher(:is_even) { |value| } +# +# # good +# def_node_matcher(:even?) { |value| } +# +# source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#75 class RuboCop::Cop::Naming::PredicateName < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#63 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#79 def dynamic_method_define(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#82 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98 def on_def(node); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#82 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#69 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#85 def on_send(node); end + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#112 + def validate_config; end + private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#98 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#124 def allowed_method_name?(method_name, prefix); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#106 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#132 def expected_name(method_name, prefix); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#120 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#146 def forbidden_prefixes; end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#116 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#142 def message(method_name, new_name); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#128 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#154 def method_definition_macros(macro_name); end - # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#124 + # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#150 def predicate_prefixes; end end @@ -28732,31 +28737,31 @@ class RuboCop::Cop::Naming::RescuedExceptionsVariableName < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#96 def autocorrect(corrector, node, range, offending_name, preferred_name); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#116 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#117 def correct_node(corrector, node, offending_name, preferred_name); end # If the exception variable is reassigned, that assignment needs to be corrected. # Further `lvar` nodes will not be corrected though since they now refer to a # different variable. # - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#134 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#143 def correct_reassignment(corrector, node, offending_name, preferred_name); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#159 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#168 def message(node); end # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#91 def offense_range(resbody); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#143 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#152 def preferred_name(variable_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#165 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#174 def shadowed_variable_name?(node); end - # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#152 + # source://rubocop//lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb#161 def variable_name(node); end # @return [Boolean] @@ -29752,6 +29757,101 @@ class RuboCop::Cop::PunctuationCorrector end end +module RuboCop::Cop::RSpec; end + +class RuboCop::Cop::RSpec::MultipleExpectations < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/multiple_expectations.rb#78 + def aggregate_failures?(param0 = T.unsafe(nil), param1); end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/multiple_expectations.rb#89 + def aggregate_failures_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec/3.0.4/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.0.4/lib/rubocop/cop/rspec/multiple_expectations.rb#93 + def on_block(node); end + + private + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/multiple_expectations.rb#109 + def example_with_aggregate_failures?(example_node); end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/multiple_expectations.rb#116 + def find_aggregate_failures(example_node); end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/multiple_expectations.rb#121 + def find_expectation(node, &block); end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/multiple_expectations.rb#132 + def flag_example(node, expectation_count:); end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/multiple_expectations.rb#143 + def max_expectations; end +end + +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.0.4/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#91 + def on_block(node); end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#102 + def on_new_investigation; end + + private + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#111 + def all_helpers(node); end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#141 + def allow_subject?; end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#109 + def example_group_memoized_helpers; end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#116 + def helpers(node); end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#137 + def max; end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#127 + def variable_nodes(node); end +end + +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.0.4/lib/rubocop/cop/rspec/nested_groups.rb#107 + def on_top_level_group(node); end + + private + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/nested_groups.rb#157 + def allowed_groups; end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/nested_groups.rb#134 + def count_up_nesting?(node, example_group); end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/nested_groups.rb#119 + def find_nested_example_groups(node, nesting: T.unsafe(nil), &block); end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/nested_groups.rb#144 + def max_nesting; end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/nested_groups.rb#148 + def max_nesting_config; end + + # source://rubocop-rspec/3.0.4/lib/rubocop/cop/rspec/nested_groups.rb#140 + def message(nesting); end +end + # Methods that calculate and return Parser::Source::Ranges # # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#6 @@ -30676,6 +30776,17 @@ end module RuboCop::Cop::StringLiteralsHelp private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#24 + def enforce_double_quotes?; end + + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#20 + def preferred_string_literal; end + + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#28 + def string_literals_config; end + # @return [Boolean] # # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#9 @@ -31316,7 +31427,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#187 def add_forward_all_offenses(node, send_classifications, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#353 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#358 def add_parens_if_missing(node, corrector); end # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#214 @@ -31324,10 +31435,10 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#345 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#350 def allow_only_rest_arguments?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#337 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#338 def arguments_range(node, first_node); end # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#265 @@ -31338,7 +31449,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#497 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#502 def explicit_block_name?; end # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#170 @@ -31377,7 +31488,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#349 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#354 def use_anonymous_forwarding?; end class << self @@ -31406,115 +31517,115 @@ RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), Stri # Classifies send nodes for possible rest/kwrest/all (including block) forwarding. # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#360 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#365 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#372 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#377 def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#400 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#405 def classification; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#367 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#372 def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#394 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#399 def forwarded_block_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#370 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#375 def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#388 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#393 def forwarded_kwrest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#382 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#387 def forwarded_rest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#364 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#369 def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#468 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#473 def additional_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#464 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#469 def additional_kwargs_or_forwarded_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#478 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#483 def allow_offense_for_no_block?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#449 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#454 def any_arg_referenced?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#433 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#438 def arguments; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#412 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#417 def can_forward_all?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#472 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#477 def forward_additional_kwargs?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#429 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#434 def forwarded_rest_and_kwrest_args; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#491 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#496 def missing_rest_arg_or_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#482 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#487 def no_additional_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#457 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#462 def no_post_splat_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#425 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#430 def offensive_block_forwarding?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#445 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#450 def referenced_block_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#441 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#446 def referenced_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#437 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#442 def referenced_rest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#421 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#426 def ruby_32_missing_rest_or_kwest?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#453 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#458 def target_ruby_version; end end @@ -34459,7 +34570,6 @@ RuboCop::Cop::Style::DateTime::COERCION_MSG = T.let(T.unsafe(nil), String) # # # good (without parentheses it's a syntax error) # def foo() do_something end -# @example # # # bad # def Baz.foo() @@ -34471,18 +34581,18 @@ RuboCop::Cop::Style::DateTime::COERCION_MSG = T.let(T.unsafe(nil), String) # do_something # end # -# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#42 +# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#40 class RuboCop::Cop::Style::DefWithParentheses < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#47 + # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#47 + # source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 def on_defs(node); end end -# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#45 +# source://rubocop//lib/rubocop/cop/style/def_with_parentheses.rb#43 RuboCop::Cop::Style::DefWithParentheses::MSG = T.let(T.unsafe(nil), String) # Checks for places where the `#\_\_dir\_\_` method can replace more @@ -35159,38 +35269,38 @@ RuboCop::Cop::Style::DoubleNegation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # # # good # 5.times { } -# @example +# # # bad # (0...10).each {} # # # good # 10.times {} # -# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#25 +# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#24 class RuboCop::Cop::Style::EachForSimpleLoop < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#53 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#52 def each_range(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#65 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#64 def each_range_with_zero_origin?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#77 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#76 def each_range_without_block_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#30 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#29 def on_block(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#46 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#45 def offending?(node); end end -# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#28 +# source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#27 RuboCop::Cop::Style::EachForSimpleLoop::MSG = T.let(T.unsafe(nil), String) # Looks for inject / reduce calls where the passed in object is @@ -35507,10 +35617,10 @@ class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#193 + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#194 def autocorrect_forbidden?(type); end - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#186 + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#187 def base_node(node); end # source://rubocop//lib/rubocop/cop/style/empty_else.rb#145 @@ -35519,7 +35629,7 @@ class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/empty_else.rb#180 - def comment_in_else?(loc); end + def comment_in_else?(node); end # source://rubocop//lib/rubocop/cop/style/empty_else.rb#160 def empty_check(node); end @@ -35529,7 +35639,7 @@ class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/empty_else.rb#156 def empty_style?; end - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#197 + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#198 def missing_else_style; end # source://rubocop//lib/rubocop/cop/style/empty_else.rb#166 @@ -35578,26 +35688,14 @@ RuboCop::Cop::Style::EmptyElse::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::EmptyHeredoc < ::RuboCop::Cop::Base include ::RuboCop::Cop::Heredoc include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StringLiteralsHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#43 + # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#44 def on_heredoc(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#63 - def enforce_double_quotes?; end - - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#59 - def preferred_string_literal; end - - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#67 - def string_literals_config; end end -# source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#41 +# source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#42 RuboCop::Cop::Style::EmptyHeredoc::MSG = T.let(T.unsafe(nil), String) # Checks for parentheses for empty lambda parameters. Parentheses @@ -35638,7 +35736,9 @@ RuboCop::Cop::Style::EmptyLambdaParameter::MSG = T.let(T.unsafe(nil), String) # @example # # bad # a = Array.new +# a = Array[] # h = Hash.new +# h = Hash[] # s = String.new # # # good @@ -35646,83 +35746,79 @@ RuboCop::Cop::Style::EmptyLambdaParameter::MSG = T.let(T.unsafe(nil), String) # h = {} # s = '' # -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#19 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#21 class RuboCop::Cop::Style::EmptyLiteral < ::RuboCop::Cop::Base include ::RuboCop::Cop::FrozenStringLiteral include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StringLiteralsHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#31 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#34 def array_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#40 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#43 def array_with_block(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#34 - def hash_node(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#43 - def hash_with_block(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#50 - def on_send(node); end + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#54 + def array_with_index(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#37 + def hash_node(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#46 + def hash_with_block(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#62 + def hash_with_index(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#69 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#40 def str_node(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#111 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#118 def correction(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#74 - def enforce_double_quotes?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#82 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#89 def first_argument_unparenthesized?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#129 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#136 def frozen_strings?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#102 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#109 def offense_array_node?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#106 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#113 def offense_hash_node?(node); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#60 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#79 def offense_message(node); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#70 - def preferred_string_literal; end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#89 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#96 def replacement_range(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#78 - def string_literals_config; end end -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#24 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#27 RuboCop::Cop::Style::EmptyLiteral::ARR_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#25 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#28 RuboCop::Cop::Style::EmptyLiteral::HASH_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#28 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#31 RuboCop::Cop::Style::EmptyLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#26 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#29 RuboCop::Cop::Style::EmptyLiteral::STR_MSG = T.let(T.unsafe(nil), String) # Checks for the formatting of empty method definitions. @@ -36002,9 +36098,18 @@ RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # will not attempt to automatically add a binding, or add filename and # line values. # -# This cop works only when a string literal is given as a code string. +# NOTE: This cop works only when a string literal is given as a code string. # No offense is reported if a string variable is given as below: # +# [source,ruby] +# ---- +# code = <<-RUBY +# def do_something +# end +# RUBY +# eval code # not checked. +# ---- +# # @example # # bad # eval <<-RUBY @@ -36029,100 +36134,93 @@ RuboCop::Cop::Style::EnvHome::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # def do_something # end # RUBY -# @example -# # not checked -# code = <<-RUBY -# def do_something -# end -# RUBY -# eval code # -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#56 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#57 class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#74 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#75 def line_with_offset?(param0 = T.unsafe(nil), param1, param2); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#81 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#82 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#69 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#70 def valid_eval_receiver?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#186 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#187 def add_offense_for_different_line(node, line_node, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#131 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#132 def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#201 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#202 def add_offense_for_missing_line(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#208 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#209 def add_offense_for_missing_location(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#180 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#181 def add_offense_for_same_line(node, line_node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#143 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#144 def check_file(node, file_node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#156 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#157 def check_line(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#95 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#96 def check_location(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#193 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#194 def expected_line(sign, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#122 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#123 def file_and_line(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#168 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#169 def line_difference(line_node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#220 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#221 def missing_line(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#109 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#110 def register_offense(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#114 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#115 def special_file_keyword?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#118 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#119 def special_line_keyword?(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#172 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#173 def string_first_line(str_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#127 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#128 def with_binding?(node); end end -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#59 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#60 RuboCop::Cop::Style::EvalWithLocation::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#60 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#61 RuboCop::Cop::Style::EvalWithLocation::MSG_EVAL = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#61 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#62 RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_FILE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#63 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#64 RuboCop::Cop::Style::EvalWithLocation::MSG_INCORRECT_LINE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#66 +# source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#67 RuboCop::Cop::Style::EvalWithLocation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for places where `Integer#even?` or `Integer#odd?` @@ -36631,8 +36729,7 @@ RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Favor `File.(bin)read` convenience methods. # # @example -# ## text mode -# # bad +# # bad - text mode # File.open(filename).read # File.open(filename, &:read) # File.open(filename) { |f| f.read } @@ -36647,9 +36744,8 @@ RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # good # File.read(filename) -# @example -# ## binary mode -# # bad +# +# # bad - binary mode # File.open(filename, 'rb').read # File.open(filename, 'rb', &:read) # File.open(filename, 'rb') do |f| @@ -36659,49 +36755,49 @@ RuboCop::Cop::Style::FileEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # good # File.binread(filename) # -# source://rubocop//lib/rubocop/cop/style/file_read.rb#38 +# source://rubocop//lib/rubocop/cop/style/file_read.rb#35 class RuboCop::Cop::Style::FileRead < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/file_read.rb#65 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#62 def block_read?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/file_read.rb#49 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#46 def file_open?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/file_read.rb#69 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#66 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/file_read.rb#60 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#57 def send_read?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/file_read.rb#84 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#81 def evidence(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/file_read.rb#100 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#97 def file_open_read?(node); end - # source://rubocop//lib/rubocop/cop/style/file_read.rb#106 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#103 def read_method(mode); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/file_read.rb#92 + # source://rubocop//lib/rubocop/cop/style/file_read.rb#89 def read_node?(node, block_pass); end end -# source://rubocop//lib/rubocop/cop/style/file_read.rb#42 +# source://rubocop//lib/rubocop/cop/style/file_read.rb#39 RuboCop::Cop::Style::FileRead::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/file_read.rb#46 +# source://rubocop//lib/rubocop/cop/style/file_read.rb#43 RuboCop::Cop::Style::FileRead::READ_FILE_START_TO_FINISH_MODES = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/style/file_read.rb#44 +# source://rubocop//lib/rubocop/cop/style/file_read.rb#41 RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Favor `File.(bin)write` convenience methods. @@ -36718,8 +36814,7 @@ RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # ---- # # @example -# ## text mode -# # bad +# # bad - text mode # File.open(filename, 'w').write(content) # File.open(filename, 'w') do |f| # f.write(content) @@ -36727,9 +36822,8 @@ RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # good # File.write(filename, content) -# @example -# ## binary mode -# # bad +# +# # bad - binary mode # File.open(filename, 'wb').write(content) # File.open(filename, 'wb') do |f| # f.write(content) @@ -36738,24 +36832,24 @@ RuboCop::Cop::Style::FileRead::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # good # File.binwrite(filename, content) # -# source://rubocop//lib/rubocop/cop/style/file_write.rb#41 +# source://rubocop//lib/rubocop/cop/style/file_write.rb#38 class RuboCop::Cop::Style::FileWrite < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/file_write.rb#68 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#65 def block_write?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#85 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#82 def evidence(node); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#52 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#49 def file_open?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#72 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#69 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#63 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#60 def send_write?(param0 = T.unsafe(nil)); end private @@ -36763,31 +36857,31 @@ class RuboCop::Cop::Style::FileWrite < ::RuboCop::Cop::Base # @return [Boolean] # @yield [content] # - # source://rubocop//lib/rubocop/cop/style/file_write.rb#95 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#92 def file_open_write?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/file_write.rb#123 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#120 def heredoc?(write_node); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#128 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#125 def heredoc_range(first_argument); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#108 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#105 def replacement(mode, filename, content, write_node); end - # source://rubocop//lib/rubocop/cop/style/file_write.rb#104 + # source://rubocop//lib/rubocop/cop/style/file_write.rb#101 def write_method(mode); end end -# source://rubocop//lib/rubocop/cop/style/file_write.rb#45 +# source://rubocop//lib/rubocop/cop/style/file_write.rb#42 RuboCop::Cop::Style::FileWrite::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/file_write.rb#47 +# source://rubocop//lib/rubocop/cop/style/file_write.rb#44 RuboCop::Cop::Style::FileWrite::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/style/file_write.rb#49 +# source://rubocop//lib/rubocop/cop/style/file_write.rb#46 RuboCop::Cop::Style::FileWrite::TRUNCATING_WRITE_MODES = T.let(T.unsafe(nil), Set) # Checks for division with integers coerced to floats. @@ -37040,8 +37134,8 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # The reason is that _unannotated_ format is very similar # to encoded URLs or Date/Time formatting strings. # -# This cop can be customized allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. # # It is allowed to contain unannotated token # if the number of them is less than or equals to @@ -37352,11 +37446,16 @@ class RuboCop::Cop::Style::GlobalStdStream < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#64 + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#70 def gvar_name(const_name); end - # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#60 + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#62 def message(const_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#66 + def namespaced?(node); end end # source://rubocop//lib/rubocop/cop/style/global_std_stream.rb#37 @@ -37550,12 +37649,12 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#283 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#285 def accepted_if?(node, ending); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#297 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#299 def allowed_consecutive_conditionals?; end # @return [Boolean] @@ -37594,7 +37693,7 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#188 def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#293 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#295 def remove_whole_lines(corrector, range); end # @return [Boolean] @@ -38827,7 +38926,7 @@ RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), Stri # # # good # foo == bar -# @example +# # # bad # if foo.do_something? # true @@ -38841,61 +38940,61 @@ RuboCop::Cop::Style::IfUnlessModifierOfIfUnless::MSG = T.let(T.unsafe(nil), Stri # # good # num.nonzero? ? true : false # -# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#62 +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#61 class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#74 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#73 def double_negative?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#70 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#69 def if_with_boolean_literal_branches?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#76 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#75 def on_if(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#136 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#135 def assume_boolean_value?(condition); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#114 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#113 def message(node, keyword); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#96 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#95 def multiple_elsif?(node); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#102 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#101 def offense_range_with_keyword(node, condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#153 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#152 def opposite_condition?(node); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#143 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#142 def replacement_condition(node, condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#158 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#157 def require_parentheses?(condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#122 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#121 def return_boolean_value?(condition); end end -# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#66 +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#65 RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#67 +# source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#66 RuboCop::Cop::Style::IfWithBooleanLiteralBranches::MSG_FOR_ELSIF = T.let(T.unsafe(nil), String) # Checks for uses of semicolon in if statements. @@ -38913,25 +39012,42 @@ class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base include ::RuboCop::Cop::OnNormalIfUnless extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#23 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#24 def on_normal_if_unless(node); end private - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#38 - def autocorrect(node); end + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#54 + def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#56 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#95 def build_else_branch(second_condition); end - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#47 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#85 + def build_expression(expr); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#75 def correct_elsif(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#40 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#66 + def replacement(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#62 + def use_block_in_branches?(node); end end # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#20 RuboCop::Cop::Style::IfWithSemicolon::MSG_IF_ELSE = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#21 +RuboCop::Cop::Style::IfWithSemicolon::MSG_NEWLINE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#22 RuboCop::Cop::Style::IfWithSemicolon::MSG_TERNARY = T.let(T.unsafe(nil), String) # Checks for `raise` or `fail` statements which do not specify an @@ -38988,6 +39104,9 @@ class RuboCop::Cop::Style::InPatternThen < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#46 def alternative_pattern_source(pattern); end + + # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#50 + def collect_alternative_patterns(pattern); end end # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#27 @@ -39818,7 +39937,7 @@ end # # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#107 class RuboCop::Cop::Style::MagicCommentFormat::CommentRange - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [CommentRange] a new instance of CommentRange # @@ -39836,11 +39955,11 @@ class RuboCop::Cop::Style::MagicCommentFormat::CommentRange # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#125 def directives; end - # source://forwardable/1.3.3/forwardable.rb#231 - def loc(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def loc(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def text(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.2/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def text(*_arg0, **_arg1, &_arg2); end # A magic comment can contain one value (normal style) or # multiple directives (emacs style) @@ -40002,7 +40121,7 @@ class RuboCop::Cop::Style::MapIntoArray < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#75 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#84 def after_leaving_scope(scope, _variable_table); end # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#57 @@ -40011,50 +40130,50 @@ class RuboCop::Cop::Style::MapIntoArray < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#66 def empty_array_asgn?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#69 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#78 def lvar_ref?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#88 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#88 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#155 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#162 def correct_push_node(corrector, push_node); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#163 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#170 def correct_return_value_handling(corrector, block, dest_var); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#108 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#117 def dest_used_only_for_mapping?(block, dest_var, asgn); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#102 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#111 def find_closest_assignment(block, dest_var); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#94 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#103 def find_dest_var(block); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#127 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#136 def new_method_name; end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#116 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#125 def register_offense(block, dest_var, asgn); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#148 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#155 def remove_assignment(corrector, asgn); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#133 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#142 def return_value_used?(node); end class << self - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#71 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#80 def joining_forces; end end end @@ -40154,7 +40273,7 @@ RuboCop::Cop::Style::MapToSet::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Enforces the presence (default) or absence of parentheses in -# method calls containing parameters. +# method calls containing arguments. # # In the default style (require_parentheses), macro methods are allowed. # Additional methods can be added to the `AllowedMethods` or @@ -40599,8 +40718,8 @@ RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses::REQUIRE_ # Checks for unwanted parentheses in parameterless method calls. # -# This cop can be customized allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. # # NOTE: This cop allows the use of `it()` without arguments in blocks, # as in `0.times { it() }`, following `Lint/ItWithoutArgumentsInBlock` cop. @@ -41075,15 +41194,10 @@ class RuboCop::Cop::Style::MissingElse < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/missing_else.rb#127 def check(node); end - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#181 + # source://rubocop//lib/rubocop/cop/style/missing_else.rb#177 def empty_else_config; end - # @return [Boolean] - # # source://rubocop//lib/rubocop/cop/style/missing_else.rb#171 - def empty_else_cop_enabled?; end - - # source://rubocop//lib/rubocop/cop/style/missing_else.rb#175 def empty_else_style; end # @return [Boolean] @@ -41795,11 +41909,6 @@ class RuboCop::Cop::Style::MultilineWhenThen < ::RuboCop::Cop::Base private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiline_when_then.rb#58 - def accept_node_type?(node); end - # Requires `then` for write `when` and its body on the same line. # # @return [Boolean] @@ -41863,58 +41972,53 @@ class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#62 def on_or(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#88 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#86 def simple_comparison_lhs?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#93 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#91 def simple_comparison_rhs?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#85 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#83 def simple_double_comparison?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#161 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#153 def allow_method_comparison?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#136 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#134 def comparison?(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#165 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#157 def comparisons_threshold; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#128 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#126 def nested_comparison?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#97 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#95 def nested_variable_comparison?(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#156 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#148 def reset_comparison; end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#140 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#138 def root_of_or_node(or_node); end - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#150 - def switch_comparison?(node); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#124 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#122 def variable_name(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#103 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#101 def variables_in_node(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#111 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#109 def variables_in_simple_node(node); end end @@ -41997,7 +42101,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet/0.8.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 + # source://rubocop-sorbet/0.8.5/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 @@ -42015,7 +42119,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#217 def splat_value(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet/0.8.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 + # source://rubocop-sorbet/0.8.5/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 def t_let(param0 = T.unsafe(nil)); end private @@ -43259,8 +43363,8 @@ RuboCop::Cop::Style::NumericLiterals::MSG = T.let(T.unsafe(nil), String) # These can be replaced by their respective predicate methods. # This cop can also be configured to do the reverse. # -# This cop can be customized allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. # # This cop disregards `#nonzero?` as its value is truthy or falsey, # but not `true` and `false`, and thus not always interchangeable with @@ -43942,14 +44046,14 @@ class RuboCop::Cop::Style::ParallelAssignment::GenericCorrector private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#233 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#234 def cop_config; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#229 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#230 def extract_sources(node); end # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#219 - def source(node); end + def source(node, loc); end end # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#29 @@ -43958,37 +44062,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#275 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#276 class RuboCop::Cop::Style::ParallelAssignment::ModifierCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#276 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#277 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#285 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#286 def correction_range; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#291 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#292 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#240 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#241 class RuboCop::Cop::Style::ParallelAssignment::RescueCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#241 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#242 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#252 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#253 def correction_range; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#263 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#264 def begin_correction(rescue_result); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#258 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#259 def def_correction(rescue_result); end end @@ -44431,7 +44535,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#108 + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#106 def alternative_style; end # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#71 @@ -44452,7 +44556,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#112 + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#110 def quoted?(sym_node); end # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#99 @@ -44460,7 +44564,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#116 + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#114 def wrong_quotes?(node); end end @@ -45016,7 +45120,7 @@ RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) # # # good # a = b || c -# @example +# # # bad # if b # b @@ -45034,7 +45138,7 @@ RuboCop::Cop::Style::RedundantCapitalW::MSG = T.let(T.unsafe(nil), String) # c # end # -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#33 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#32 class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector @@ -45152,13 +45256,13 @@ class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base def without_argument_parentheses_method?(node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#39 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#38 RuboCop::Cop::Style::RedundantCondition::ARGUMENT_WITH_OPERATOR_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#37 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#36 RuboCop::Cop::Style::RedundantCondition::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#38 +# source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#37 RuboCop::Cop::Style::RedundantCondition::REDUNDANT_CONDITION = T.let(T.unsafe(nil), String) # Checks for redundant returning of true/false in conditionals. @@ -46008,6 +46112,37 @@ end # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#43 RuboCop::Cop::Style::RedundantInterpolation::MSG = T.let(T.unsafe(nil), String) +# Before Ruby 3.0, interpolated strings followed the frozen string literal +# magic comment which sometimes made it necessary to explicitly unfreeze them. +# Ruby 3.0 changed interpolated strings to always be unfrozen which makes +# unfreezing them redundant. +# +# @example +# # bad +# +"#{foo} bar" +# +# # bad +# "#{foo} bar".dup +# +# # good +# "#{foo} bar" +# +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#21 +class RuboCop::Cop::Style::RedundantInterpolationUnfreeze < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#32 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#26 +RuboCop::Cop::Style::RedundantInterpolationUnfreeze::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#28 +RuboCop::Cop::Style::RedundantInterpolationUnfreeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Check for redundant line continuation. # # This cop marks a line continuation as redundant if removing the backslash @@ -46467,38 +46602,39 @@ RuboCop::Cop::Style::RedundantPercentQ::STRING_INTERPOLATION_REGEXP = T.let(T.un # # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#35 class RuboCop::Cop::Style::RedundantRegexpArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::StringLiteralsHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#48 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#48 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#64 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#65 def determinist_regexp?(regexp_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#68 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#69 def preferred_argument(regexp_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#81 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#84 def replacement(regexp_node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#42 +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#43 RuboCop::Cop::Style::RedundantRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#38 +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#39 RuboCop::Cop::Style::RedundantRegexpArgument::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#39 +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#40 RuboCop::Cop::Style::RedundantRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#43 +# 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. @@ -46667,13 +46803,10 @@ class RuboCop::Cop::Style::RedundantRegexpEscape < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#92 def delimiter?(node, char); end - # Please remove this `else` branch when support for regexp_parser 1.8 will be dropped. - # It's for compatibility with regexp_parser 1.8 and will never be maintained. - # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#99 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#98 def each_escape(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#126 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_escape.rb#110 def escape_range_at_index(node, index); end end @@ -47971,9 +48104,9 @@ RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition::MSG = T.let(T.unsafe( # `foo&.bar` can start returning `nil` as well as what the method # returns. # -# The default for `MaxChainLength` is `2` +# The default for `MaxChainLength` is `2`. # We have limited the cop to not register an offense for method chains -# that exceed this option is set. +# that exceed this option's value. # # @example # # bad @@ -49100,10 +49233,10 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#242 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#261 def allow_modifier?; end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#227 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233 def arguments_range(node); end # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#81 @@ -49121,25 +49254,25 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#145 def correct_for_basic_condition_style(corrector, node, if_branch, and_operator); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#175 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#181 def correct_for_comment(corrector, node, if_branch); end # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#136 def correct_for_guard_condition_style(corrector, outer_condition, if_branch, and_operator); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#165 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#171 def correct_for_outer_condition_modify_form_style(corrector, node, if_branch); end # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#130 def correct_from_unless_to_if(corrector, node, is_modify_form: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#184 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#190 def correct_outer_condition(corrector, condition); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#197 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#203 def insert_bang(corrector, node, is_modify_form); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#210 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#216 def insert_bang_for_and(corrector, node); end # @return [Boolean] @@ -49149,15 +49282,18 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#246 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#265 def outer_condition_modify_form?(node, if_branch); end - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#238 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#254 + def parenthesized_method_arguments(node); end + + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#244 def replace_condition(condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#222 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#228 def require_parentheses?(condition); end # @return [Boolean] @@ -49170,7 +49306,7 @@ class RuboCop::Cop::Style::SoleNestedConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#233 + # source://rubocop//lib/rubocop/cop/style/sole_nested_conditional.rb#239 def wrap_condition?(node); end class << self @@ -51697,7 +51833,6 @@ RuboCop::Cop::Style::WhenThen::MSG = T.let(T.unsafe(nil), String) # while x.any? # do_something(x.pop) # end -# @example # # # bad # until x.empty? do @@ -51709,18 +51844,18 @@ RuboCop::Cop::Style::WhenThen::MSG = T.let(T.unsafe(nil), String) # do_something(x.pop) # end # -# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#31 +# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#29 class RuboCop::Cop::Style::WhileUntilDo < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#36 + # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 def on_until(node); end - # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#36 + # source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 def on_while(node); end end -# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#34 +# source://rubocop//lib/rubocop/cop/style/while_until_do.rb#32 RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) # Checks for while and until statements that would fit on one line @@ -51735,7 +51870,7 @@ RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) # # # good # x += 1 while x < 10 -# @example +# # # bad # until x > 10 # x += 1 @@ -51752,7 +51887,7 @@ RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) # x += 100 # end # -# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#36 +# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#35 class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp @@ -51760,14 +51895,14 @@ class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#42 + # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#41 def on_until(node); end - # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#42 + # source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#41 def on_while(node); end end -# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#40 +# source://rubocop//lib/rubocop/cop/style/while_until_modifier.rb#39 RuboCop::Cop::Style::WhileUntilModifier::MSG = T.let(T.unsafe(nil), String) # Checks for array literals made up of word-like @@ -52187,42 +52322,42 @@ class RuboCop::Cop::Style::ZeroLengthPredicate < ::RuboCop::Cop::Base # implement `#size`, but not `#empty`. We ignore those to # reduce false positives. # - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#143 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#147 def non_polymorphic_collection?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#110 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#114 def nonzero_length_comparison(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#45 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#51 def on_csend(node); end # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#45 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#134 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#138 def other_length_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#102 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#106 def zero_length_comparison(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#126 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#130 def zero_length_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#97 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#101 def zero_length_predicate?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#81 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#85 def check_nonzero_length_comparison(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#66 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#70 def check_zero_length_comparison(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#54 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#58 def check_zero_length_predicate(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#115 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#119 def replacement(node); end end @@ -52402,57 +52537,57 @@ class RuboCop::Cop::Team private - # source://rubocop//lib/rubocop/cop/team.rb#129 + # source://rubocop//lib/rubocop/cop/team.rb#133 def autocorrect(processed_source, report, original:, offset:); end - # source://rubocop//lib/rubocop/cop/team.rb#193 + # source://rubocop//lib/rubocop/cop/team.rb#197 def autocorrect_report(report, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#148 + # source://rubocop//lib/rubocop/cop/team.rb#152 def be_ready; end - # source://rubocop//lib/rubocop/cop/team.rb#199 + # source://rubocop//lib/rubocop/cop/team.rb#203 def collate_corrections(report, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#215 + # source://rubocop//lib/rubocop/cop/team.rb#219 def each_corrector(report); end - # source://rubocop//lib/rubocop/cop/team.rb#267 + # source://rubocop//lib/rubocop/cop/team.rb#271 def handle_error(error, location, cop); end - # source://rubocop//lib/rubocop/cop/team.rb#259 + # source://rubocop//lib/rubocop/cop/team.rb#263 def handle_warning(error, location); end # @return [Commissioner::InvestigationReport] # - # source://rubocop//lib/rubocop/cop/team.rb#162 + # source://rubocop//lib/rubocop/cop/team.rb#166 def investigate_partial(cops, processed_source, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#242 + # source://rubocop//lib/rubocop/cop/team.rb#246 def process_errors(file, errors); end - # source://rubocop//lib/rubocop/cop/team.rb#156 + # source://rubocop//lib/rubocop/cop/team.rb#160 def reset; end # @return [Array] # - # source://rubocop//lib/rubocop/cop/team.rb#168 + # source://rubocop//lib/rubocop/cop/team.rb#172 def roundup_relevant_cops(processed_source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#184 + # source://rubocop//lib/rubocop/cop/team.rb#188 def support_target_rails_version?(cop); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#178 + # source://rubocop//lib/rubocop/cop/team.rb#182 def support_target_ruby_version?(cop); end - # source://rubocop//lib/rubocop/cop/team.rb#230 + # source://rubocop//lib/rubocop/cop/team.rb#234 def suppress_clobbering; end - # source://rubocop//lib/rubocop/cop/team.rb#236 + # source://rubocop//lib/rubocop/cop/team.rb#240 def validate_config; end class << self @@ -53120,59 +53255,59 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force # # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#76 + # source://rubocop//lib/rubocop/cop/variable_force.rb#79 def investigate(processed_source); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#85 + # source://rubocop//lib/rubocop/cop/variable_force.rb#88 def process_node(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#71 + # source://rubocop//lib/rubocop/cop/variable_force.rb#74 def variable_table; end private - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def after_declaring_variable(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def after_entering_scope(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def after_leaving_scope(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def before_declaring_variable(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def before_entering_scope(arg); end - # source://rubocop//lib/rubocop/cop/variable_force.rb#368 + # source://rubocop//lib/rubocop/cop/variable_force.rb#380 def before_leaving_scope(arg); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#339 + # source://rubocop//lib/rubocop/cop/variable_force.rb#351 def descendant_reference(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#329 + # source://rubocop//lib/rubocop/cop/variable_force.rb#341 def each_descendant_reference(loop_node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#314 + # source://rubocop//lib/rubocop/cop/variable_force.rb#326 def find_variables_in_loop(loop_node); end # This is called for each scope recursively. # # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#94 + # source://rubocop//lib/rubocop/cop/variable_force.rb#97 def inspect_variables_in_scope(scope_node); end # Mark all assignments which are referenced in the same loop @@ -53181,104 +53316,109 @@ class RuboCop::Cop::VariableForce < ::RuboCop::Cop::Force # # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#295 + # source://rubocop//lib/rubocop/cop/variable_force.rb#307 def mark_assignments_as_referenced_in_loop(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#126 + # source://rubocop//lib/rubocop/cop/variable_force.rb#130 def node_handler_method_name(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#100 + # source://rubocop//lib/rubocop/cop/variable_force.rb#103 def process_children(origin_node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#231 + # source://rubocop//lib/rubocop/cop/variable_force.rb#243 def process_loop(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#160 + # source://rubocop//lib/rubocop/cop/variable_force.rb#182 + def process_pattern_match_variable(node); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/variable_force.rb#164 def process_regexp_named_captures(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#246 + # source://rubocop//lib/rubocop/cop/variable_force.rb#258 def process_rescue(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#265 + # source://rubocop//lib/rubocop/cop/variable_force.rb#277 def process_scope(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#284 + # source://rubocop//lib/rubocop/cop/variable_force.rb#296 def process_send(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#142 + # source://rubocop//lib/rubocop/cop/variable_force.rb#146 def process_variable_assignment(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#130 + # source://rubocop//lib/rubocop/cop/variable_force.rb#134 def process_variable_declaration(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#219 + # source://rubocop//lib/rubocop/cop/variable_force.rb#231 def process_variable_multiple_assignment(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#184 + # source://rubocop//lib/rubocop/cop/variable_force.rb#196 def process_variable_operator_assignment(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#226 + # source://rubocop//lib/rubocop/cop/variable_force.rb#238 def process_variable_referencing(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#257 + # source://rubocop//lib/rubocop/cop/variable_force.rb#269 def process_zero_arity_super(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#178 + # source://rubocop//lib/rubocop/cop/variable_force.rb#190 def regexp_captured_names(node); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force.rb#351 + # source://rubocop//lib/rubocop/cop/variable_force.rb#363 def scanned_node?(node); end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#355 + # source://rubocop//lib/rubocop/cop/variable_force.rb#367 def scanned_nodes; end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#108 + # source://rubocop//lib/rubocop/cop/variable_force.rb#111 def skip_children!; end # @api private # - # source://rubocop//lib/rubocop/cop/variable_force.rb#278 + # source://rubocop//lib/rubocop/cop/variable_force.rb#290 def twisted_nodes(node); end end # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#32 +# source://rubocop//lib/rubocop/cop/variable_force.rb#35 RuboCop::Cop::VariableForce::ARGUMENT_DECLARATION_TYPES = T.let(T.unsafe(nil), Array) # This class represents each assignment of a variable. @@ -53390,12 +53530,12 @@ RuboCop::Cop::VariableForce::Assignment::MULTIPLE_LEFT_HAND_SIDE_TYPE = T.let(T. # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#65 +# source://rubocop//lib/rubocop/cop/variable_force.rb#68 class RuboCop::Cop::VariableForce::AssignmentReference < ::Struct # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force.rb#66 + # source://rubocop//lib/rubocop/cop/variable_force.rb#69 def assignment?; end # Returns the value of attribute node @@ -53835,32 +53975,37 @@ end # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#39 +# source://rubocop//lib/rubocop/cop/variable_force.rb#42 RuboCop::Cop::VariableForce::LOGICAL_OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#48 +# source://rubocop//lib/rubocop/cop/variable_force.rb#51 RuboCop::Cop::VariableForce::LOOP_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#42 +# source://rubocop//lib/rubocop/cop/variable_force.rb#45 RuboCop::Cop::VariableForce::MULTIPLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#112 +# source://rubocop//lib/rubocop/cop/variable_force.rb#115 RuboCop::Cop::VariableForce::NODE_HANDLER_METHOD_NAMES = T.let(T.unsafe(nil), Hash) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#40 +# source://rubocop//lib/rubocop/cop/variable_force.rb#43 RuboCop::Cop::VariableForce::OPERATOR_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#47 +# source://rubocop//lib/rubocop/cop/variable_force.rb#30 +RuboCop::Cop::VariableForce::PATTERN_MATCH_VARIABLE_TYPE = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://rubocop//lib/rubocop/cop/variable_force.rb#50 RuboCop::Cop::VariableForce::POST_CONDITION_LOOP_TYPES = T.let(T.unsafe(nil), Array) # @api private @@ -53870,12 +54015,12 @@ RuboCop::Cop::VariableForce::REGEXP_NAMED_CAPTURE_TYPE = T.let(T.unsafe(nil), Sy # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#50 +# source://rubocop//lib/rubocop/cop/variable_force.rb#53 RuboCop::Cop::VariableForce::RESCUE_TYPE = T.let(T.unsafe(nil), Symbol) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#43 +# source://rubocop//lib/rubocop/cop/variable_force.rb#46 RuboCop::Cop::VariableForce::REST_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Symbol) # This class represents each reference of a variable. @@ -53925,12 +54070,12 @@ RuboCop::Cop::VariableForce::Reference::VARIABLE_REFERENCE_TYPES = T.let(T.unsaf # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#55 +# source://rubocop//lib/rubocop/cop/variable_force.rb#58 RuboCop::Cop::VariableForce::SCOPE_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#57 +# source://rubocop//lib/rubocop/cop/variable_force.rb#60 RuboCop::Cop::VariableForce::SEND_TYPE = T.let(T.unsafe(nil), Symbol) # A Scope represents a context of local variable visibility. @@ -54009,7 +54154,7 @@ RuboCop::Cop::VariableForce::Scope::OUTER_SCOPE_CHILD_INDICES = T.let(T.unsafe(n # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#54 +# source://rubocop//lib/rubocop/cop/variable_force.rb#57 RuboCop::Cop::VariableForce::TWISTED_SCOPE_TYPES = T.let(T.unsafe(nil), Array) # @api private @@ -54019,12 +54164,12 @@ RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPE = T.let(T.unsafe(nil), Sym # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#30 +# source://rubocop//lib/rubocop/cop/variable_force.rb#31 RuboCop::Cop::VariableForce::VARIABLE_ASSIGNMENT_TYPES = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#45 +# source://rubocop//lib/rubocop/cop/variable_force.rb#48 RuboCop::Cop::VariableForce::VARIABLE_REFERENCE_TYPE = T.let(T.unsafe(nil), Symbol) # A Variable represents existence of a local variable. @@ -54141,12 +54286,12 @@ RuboCop::Cop::VariableForce::Variable::VARIABLE_DECLARATION_TYPES = T.let(T.unsa # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#59 +# source://rubocop//lib/rubocop/cop/variable_force.rb#62 class RuboCop::Cop::VariableForce::VariableReference < ::Struct # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/variable_force.rb#60 + # source://rubocop//lib/rubocop/cop/variable_force.rb#63 def assignment?; end # Returns the value of attribute name @@ -54228,7 +54373,7 @@ end # @api private # -# source://rubocop//lib/rubocop/cop/variable_force.rb#52 +# source://rubocop//lib/rubocop/cop/variable_force.rb#55 RuboCop::Cop::VariableForce::ZERO_ARITY_SUPER_TYPE = T.let(T.unsafe(nil), Symbol) # Help methods for determining node visibility. @@ -54578,13 +54723,10 @@ end # # source://rubocop//lib/rubocop/ext/regexp_node.rb#6 module RuboCop::Ext::RegexpNode - # Please remove this `else` branch when support for regexp_parser 1.8 will be dropped. - # It's for compatibility with regexp_parser 1.8 and will never be maintained. - # - # source://rubocop//lib/rubocop/ext/regexp_node.rb#19 + # source://rubocop//lib/rubocop/ext/regexp_node.rb#18 def assign_properties(*_arg0); end - # source://rubocop//lib/rubocop/ext/regexp_node.rb#53 + # source://rubocop//lib/rubocop/ext/regexp_node.rb#31 def each_capture(named: T.unsafe(nil)); end # Note: we extend Regexp nodes to provide `loc` and `expression` @@ -54599,10 +54741,10 @@ module RuboCop::Ext::RegexpNode # @return [Boolean] # - # source://rubocop//lib/rubocop/ext/regexp_node.rb#65 + # source://rubocop//lib/rubocop/ext/regexp_node.rb#43 def named_capturing?(exp, event, named); end - # source://rubocop//lib/rubocop/ext/regexp_node.rb#73 + # source://rubocop//lib/rubocop/ext/regexp_node.rb#51 def with_interpolations_blanked; end end @@ -55617,40 +55759,92 @@ end # This formatter formats the report data in JUnit format. # -# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#17 +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#15 class RuboCop::Formatter::JUnitFormatter < ::RuboCop::Formatter::BaseFormatter # @return [JUnitFormatter] a new instance of JUnitFormatter # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#18 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#24 def initialize(output, options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#55 - def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#64 - def classname_attribute_value(file); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#29 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#32 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#71 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#51 def finished(_inspected_files); end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#51 + private + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#106 + def add_failure_to(testcase, offenses, cop_name); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#85 + def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#94 + def classname_attribute_value(file); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#81 def offenses_for_cop(all_offenses, cop); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#47 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#77 def relevant_for_output?(options, target_offenses); end - private - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#83 - def add_failure_to(testcase, offenses, cop_name); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#78 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#101 def reset_count; end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#118 + def xml_escape(string); end +end + +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#16 +RuboCop::Formatter::JUnitFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#132 +class RuboCop::Formatter::JUnitFormatter::FailureElement + # @return [FailureElement] a new instance of FailureElement + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#135 + def initialize(type:, message:, text:); end + + # Returns the value of attribute message. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def message; end + + # Returns the value of attribute text. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def text; end + + # Returns the value of attribute type. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def type; end +end + +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#122 +class RuboCop::Formatter::JUnitFormatter::TestCaseElement + # @return [TestCaseElement] a new instance of TestCaseElement + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#125 + def initialize(classname:, name:); end + + # Returns the value of attribute classname. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def classname; end + + # Returns the value of attribute failures. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def failures; end + + # Returns the value of attribute name. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def name; end end # This formatter displays the report data in markdown @@ -56328,17 +56522,17 @@ class RuboCop::Lockfile private - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/lockfile.rb#85 - def bundler_lock_parser_defined?; end - # @api private # @return [Bundler::LockfileParser, nil] # # source://rubocop//lib/rubocop/lockfile.rb#72 def parser; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lockfile.rb#85 + def use_bundler_lock_parser?; end end # Parse different formats of magic comments. @@ -57350,12 +57544,12 @@ class RuboCop::RemoteConfig # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#19 + # source://rubocop//lib/rubocop/remote_config.rb#23 def file; end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#32 + # source://rubocop//lib/rubocop/remote_config.rb#36 def inherit_from_remote(file, path); end # @api private @@ -57367,46 +57561,46 @@ class RuboCop::RemoteConfig # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#95 + # source://rubocop//lib/rubocop/remote_config.rb#99 def cache_name_from_uri; end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#78 + # source://rubocop//lib/rubocop/remote_config.rb#82 def cache_path; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/remote_config.rb#82 + # source://rubocop//lib/rubocop/remote_config.rb#86 def cache_path_exists?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/remote_config.rb#86 + # source://rubocop//lib/rubocop/remote_config.rb#90 def cache_path_expired?; end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#101 + # source://rubocop//lib/rubocop/remote_config.rb#105 def cloned_url; end # @api private # @yield [request] # - # source://rubocop//lib/rubocop/remote_config.rb#53 + # source://rubocop//lib/rubocop/remote_config.rb#57 def generate_request(uri); end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#62 + # source://rubocop//lib/rubocop/remote_config.rb#66 def handle_response(response, limit, &block); end # @api private # @raise [ArgumentError] # - # source://rubocop//lib/rubocop/remote_config.rb#40 + # source://rubocop//lib/rubocop/remote_config.rb#44 def request(uri = T.unsafe(nil), limit = T.unsafe(nil), &block); end end @@ -57469,7 +57663,7 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#236 + # source://rubocop//lib/rubocop/result_cache.rb#229 def context_checksum(team, options); end # @api private @@ -57509,14 +57703,6 @@ class RuboCop::ResultCache # source://rubocop//lib/rubocop/result_cache.rb#142 def symlink_protection_triggered?(path); end - # The external dependency checksums are cached per RuboCop team so that - # the checksums don't need to be recomputed for each file. - # - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#227 - def team_checksum(team); end - class << self # @api private # @return [Boolean] @@ -58036,34 +58222,34 @@ class RuboCop::TargetRuby # @api private # @return [TargetRuby] a new instance of TargetRuby # - # source://rubocop//lib/rubocop/target_ruby.rb#254 + # source://rubocop//lib/rubocop/target_ruby.rb#258 def initialize(config); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#270 + # source://rubocop//lib/rubocop/target_ruby.rb#274 def rubocop_version_with_support; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#258 + # source://rubocop//lib/rubocop/target_ruby.rb#262 def source; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_ruby.rb#266 + # source://rubocop//lib/rubocop/target_ruby.rb#270 def supported?; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#262 + # source://rubocop//lib/rubocop/target_ruby.rb#266 def version; end class << self # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#240 + # source://rubocop//lib/rubocop/target_ruby.rb#244 def supported_versions; end end end @@ -58072,23 +58258,23 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#187 +# source://rubocop//lib/rubocop/target_ruby.rb#191 class RuboCop::TargetRuby::BundlerLockFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#188 + # source://rubocop//lib/rubocop/target_ruby.rb#192 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#221 + # source://rubocop//lib/rubocop/target_ruby.rb#225 def bundler_lock_file_path; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#194 + # source://rubocop//lib/rubocop/target_ruby.rb#198 def find_version; end end @@ -58101,18 +58287,18 @@ RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float) # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#228 +# source://rubocop//lib/rubocop/target_ruby.rb#232 class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#229 + # source://rubocop//lib/rubocop/target_ruby.rb#233 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#235 + # source://rubocop//lib/rubocop/target_ruby.rb#239 def find_version; end end @@ -58139,8 +58325,8 @@ class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#121 - def find_default_minimal_known_ruby(right_hand_side); end + # source://rubocop//lib/rubocop/target_ruby.rb#123 + def find_minimal_known_ruby(right_hand_side); end # @api private # @@ -58159,7 +58345,7 @@ class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#117 + # source://rubocop//lib/rubocop/target_ruby.rb#119 def version_from_array(array); end # @api private @@ -58169,7 +58355,7 @@ class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#105 + # source://rubocop//lib/rubocop/target_ruby.rb#107 def version_from_right_hand_side(right_hand_side); end end @@ -58211,49 +58397,49 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#133 +# source://rubocop//lib/rubocop/target_ruby.rb#137 class RuboCop::TargetRuby::RubyVersionFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#137 + # source://rubocop//lib/rubocop/target_ruby.rb#141 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#143 + # source://rubocop//lib/rubocop/target_ruby.rb#147 def filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#151 + # source://rubocop//lib/rubocop/target_ruby.rb#155 def find_version; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#147 + # source://rubocop//lib/rubocop/target_ruby.rb#151 def pattern; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#158 + # source://rubocop//lib/rubocop/target_ruby.rb#162 def version_file; end end # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#134 +# source://rubocop//lib/rubocop/target_ruby.rb#138 RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_FILENAME = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#135 +# source://rubocop//lib/rubocop/target_ruby.rb#139 RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#244 +# source://rubocop//lib/rubocop/target_ruby.rb#248 RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array) # A place where information about a target ruby version is found. @@ -58289,34 +58475,34 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#166 +# source://rubocop//lib/rubocop/target_ruby.rb#170 class RuboCop::TargetRuby::ToolVersionsFile < ::RuboCop::TargetRuby::RubyVersionFile # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#170 + # source://rubocop//lib/rubocop/target_ruby.rb#174 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#176 + # source://rubocop//lib/rubocop/target_ruby.rb#180 def filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#180 + # source://rubocop//lib/rubocop/target_ruby.rb#184 def pattern; end end # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#167 +# source://rubocop//lib/rubocop/target_ruby.rb#171 RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_FILENAME = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#168 +# source://rubocop//lib/rubocop/target_ruby.rb#172 RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_PATTERN = T.let(T.unsafe(nil), Regexp) # source://rubocop//lib/rubocop/ast_aliases.rb#7 @@ -58414,7 +58600,7 @@ module RuboCop::YAMLDuplicationChecker # @api private # - # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#21 + # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#22 def traverse(tree, &on_duplicated); end end end @@ -58429,13 +58615,11 @@ class String # is either empty or contains only whitespace characters. # # @example - # ''.blank? #=> true - # @example - # ' '.blank? #=> true - # @example + # ''.blank? #=> true + # ' '.blank? #=> true # ' test'.blank? #=> false # @return [Boolean] true is the string is blank, false otherwise # - # source://rubocop//lib/rubocop/core_ext/string.rb#19 + # source://rubocop//lib/rubocop/core_ext/string.rb#15 def blank?; end end From c2e2b23c501b6c78e435c0622c2725730c6fd0c7 Mon Sep 17 00:00:00 2001 From: Patrick Linnane Date: Wed, 4 Sep 2024 10:05:50 -0700 Subject: [PATCH 4/7] `brew style --fix` Signed-off-by: Patrick Linnane --- Library/Homebrew/build_environment.rb | 2 +- Library/Homebrew/cask/artifact/abstract_uninstall.rb | 4 ++-- Library/Homebrew/cask/exceptions.rb | 6 +++--- Library/Homebrew/cask/info.rb | 2 +- Library/Homebrew/cask/installer.rb | 8 ++++---- Library/Homebrew/cask/utils.rb | 2 +- Library/Homebrew/caveats.rb | 2 +- Library/Homebrew/cmd/gist-logs.rb | 2 +- Library/Homebrew/exceptions.rb | 4 ++-- Library/Homebrew/extend/array.rb | 4 ++-- Library/Homebrew/extend/kernel.rb | 6 +++--- Library/Homebrew/formula.rb | 2 +- Library/Homebrew/formula_installer.rb | 8 ++++---- Library/Homebrew/github_runner_matrix.rb | 2 +- Library/Homebrew/tap.rb | 2 +- Library/Homebrew/test/installed_dependents_spec.rb | 2 +- Library/Homebrew/test/keg_relocate/relocation_spec.rb | 2 +- Library/Homebrew/utils/github/api.rb | 2 +- 18 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Library/Homebrew/build_environment.rb b/Library/Homebrew/build_environment.rb index b63cebb006..10fecf1579 100644 --- a/Library/Homebrew/build_environment.rb +++ b/Library/Homebrew/build_environment.rb @@ -70,7 +70,7 @@ class BuildEnvironment keys.each do |key| value = env.fetch(key) - string = +"#{key}: #{value}" + string = "#{key}: #{value}" case key when "CC", "CXX", "LD" string << " => #{Pathname.new(value).realpath}" if value.present? && File.symlink?(value) diff --git a/Library/Homebrew/cask/artifact/abstract_uninstall.rb b/Library/Homebrew/cask/artifact/abstract_uninstall.rb index 1b9bde4b5d..36b7aea555 100644 --- a/Library/Homebrew/cask/artifact/abstract_uninstall.rb +++ b/Library/Homebrew/cask/artifact/abstract_uninstall.rb @@ -125,8 +125,8 @@ module Cask sleep 1 end paths = [ - +"/Library/LaunchAgents/#{service}.plist", - +"/Library/LaunchDaemons/#{service}.plist", + "/Library/LaunchAgents/#{service}.plist", + "/Library/LaunchDaemons/#{service}.plist", ] paths.each { |elt| elt.prepend(Dir.home).freeze } unless sudo paths = paths.map { |elt| Pathname(elt) }.select(&:exist?) diff --git a/Library/Homebrew/cask/exceptions.rb b/Library/Homebrew/cask/exceptions.rb index 6430517a48..7b681704fc 100644 --- a/Library/Homebrew/cask/exceptions.rb +++ b/Library/Homebrew/cask/exceptions.rb @@ -193,7 +193,7 @@ module Cask sig { returns(String) } def to_s - s = +"Failed to quarantine #{path}." + s = "Failed to quarantine #{path}." unless reason.empty? s << " Here's the reason:\n" @@ -209,7 +209,7 @@ module Cask class CaskQuarantinePropagationError < CaskQuarantineError sig { returns(String) } def to_s - s = +"Failed to quarantine one or more files within #{path}." + s = "Failed to quarantine one or more files within #{path}." unless reason.empty? s << " Here's the reason:\n" @@ -225,7 +225,7 @@ module Cask class CaskQuarantineReleaseError < CaskQuarantineError sig { returns(String) } def to_s - s = +"Failed to release #{path} from quarantine." + s = "Failed to release #{path} from quarantine." unless reason.empty? s << " Here's the reason:\n" diff --git a/Library/Homebrew/cask/info.rb b/Library/Homebrew/cask/info.rb index 11b6149428..e2e6b3f4de 100644 --- a/Library/Homebrew/cask/info.rb +++ b/Library/Homebrew/cask/info.rb @@ -9,7 +9,7 @@ module Cask def self.get_info(cask) require "cask/installer" - output = +"#{title_info(cask)}\n" + output = "#{title_info(cask)}\n" output << "#{Formatter.url(cask.homepage)}\n" if cask.homepage deprecate_disable = DeprecateDisable.message(cask) output << "#{deprecate_disable.capitalize}\n" if deprecate_disable diff --git a/Library/Homebrew/cask/installer.rb b/Library/Homebrew/cask/installer.rb index 729f014711..66bd4412c0 100644 --- a/Library/Homebrew/cask/installer.rb +++ b/Library/Homebrew/cask/installer.rb @@ -602,8 +602,8 @@ on_request: true) next if dep_tap.blank? || (dep_tap.allowed_by_env? && !dep_tap.forbidden_by_env?) dep_full_name = cask_or_formula.full_name - error_message = +"The installation of #{@cask} has a dependency #{dep_full_name}\n" \ - "from the #{dep_tap} tap but #{owner} " + error_message = "The installation of #{@cask} has a dependency #{dep_full_name}\n" \ + "from the #{dep_tap} tap but #{owner} " error_message << "has not allowed this tap in `HOMEBREW_ALLOWED_TAPS`" unless dep_tap.allowed_by_env? error_message << " and\n" if !dep_tap.allowed_by_env? && dep_tap.forbidden_by_env? error_message << "has forbidden this tap in `HOMEBREW_FORBIDDEN_TAPS`" if dep_tap.forbidden_by_env? @@ -616,8 +616,8 @@ on_request: true) cask_tap = @cask.tap return if cask_tap.blank? || (cask_tap.allowed_by_env? && !cask_tap.forbidden_by_env?) - error_message = +"The installation of #{@cask.full_name} has the tap #{cask_tap}\n" \ - "but #{owner} " + error_message = "The installation of #{@cask.full_name} has the tap #{cask_tap}\n" \ + "but #{owner} " error_message << "has not allowed this tap in `HOMEBREW_ALLOWED_TAPS`" unless cask_tap.allowed_by_env? error_message << " and\n" if !cask_tap.allowed_by_env? && cask_tap.forbidden_by_env? error_message << "has forbidden this tap in `HOMEBREW_FORBIDDEN_TAPS`" if cask_tap.forbidden_by_env? diff --git a/Library/Homebrew/cask/utils.rb b/Library/Homebrew/cask/utils.rb index dff67823d8..b90dbfdad6 100644 --- a/Library/Homebrew/cask/utils.rb +++ b/Library/Homebrew/cask/utils.rb @@ -128,7 +128,7 @@ module Cask end def self.method_missing_message(method, token, section = nil) - message = +"Unexpected method '#{method}' called " + message = "Unexpected method '#{method}' called " message << "during #{section} " if section message << "on Cask #{token}." diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb index f01c6774d8..4a233a0acd 100644 --- a/Library/Homebrew/caveats.rb +++ b/Library/Homebrew/caveats.rb @@ -134,7 +134,7 @@ class Caveats #{root_dir}/etc/bash_completion.d EOS when :fish - fish_caveats = +"fish #{installed.join(" and ")} have been installed to:" + fish_caveats = "fish #{installed.join(" and ")} have been installed to:" fish_caveats << "\n #{root_dir}/share/fish/vendor_completions.d" if completion_installed fish_caveats << "\n #{root_dir}/share/fish/vendor_functions.d" if functions_installed fish_caveats.freeze diff --git a/Library/Homebrew/cmd/gist-logs.rb b/Library/Homebrew/cmd/gist-logs.rb index dd3b5e71b0..25407fa07a 100644 --- a/Library/Homebrew/cmd/gist-logs.rb +++ b/Library/Homebrew/cmd/gist-logs.rb @@ -92,7 +92,7 @@ module Homebrew sig { params(formula: Formula, with_hostname: T::Boolean).returns(String) } def brief_build_info(formula, with_hostname:) build_time_string = formula.logs.ctime.strftime("%Y-%m-%d %H:%M:%S") - string = +<<~EOS + string = <<~EOS Homebrew build logs for #{formula.full_name} on #{OS_VERSION} EOS if with_hostname diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index baede0cbc3..36a7a3ff43 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -562,7 +562,7 @@ class UnbottledError < RuntimeError def initialize(formulae) require "utils" - msg = +<<~EOS + msg = <<~EOS The following #{Utils.pluralize("formula", formulae.count, plural: "e")} cannot be installed from #{Utils.pluralize("bottle", formulae.count)} and must be built from source. #{formulae.to_sentence} @@ -686,7 +686,7 @@ class ErrorDuringExecution < RuntimeError raise ArgumentError, "Status neither has `exitstatus` nor `termsig`." end - s = +"Failure while executing; `#{redacted_cmd}` #{reason}." + s = "Failure while executing; `#{redacted_cmd}` #{reason}." if Array(output).present? format_output_line = lambda do |type_line| diff --git a/Library/Homebrew/extend/array.rb b/Library/Homebrew/extend/array.rb index e68b1277a1..7382084b69 100644 --- a/Library/Homebrew/extend/array.rb +++ b/Library/Homebrew/extend/array.rb @@ -98,9 +98,9 @@ class Array # This is not typesafe, if the array contains a BasicObject +T.unsafe(self[0]).to_s when 2 - +"#{self[0]}#{two_words_connector}#{self[1]}" + "#{self[0]}#{two_words_connector}#{self[1]}" else - +"#{T.must(self[0...-1]).join(words_connector)}#{last_word_connector}#{self[-1]}" + "#{T.must(self[0...-1]).join(words_connector)}#{last_word_connector}#{self[-1]}" end end end diff --git a/Library/Homebrew/extend/kernel.rb b/Library/Homebrew/extend/kernel.rb index e248325ac0..7bf0c0d9da 100644 --- a/Library/Homebrew/extend/kernel.rb +++ b/Library/Homebrew/extend/kernel.rb @@ -156,8 +156,8 @@ module Kernel require "tap" - tap = Tap.fetch(match[:user], match[:repository]) - tap_message = +"\nPlease report this issue to the #{tap.full_name} tap" + tap = Tap.fetch(match[:user], match[:repo]) + tap_message = "\nPlease report this issue to the #{tap.full_name} tap" tap_message += " (not Homebrew/brew or Homebrew/homebrew-core)" unless tap.official? tap_message += ", or even better, submit a PR to fix it" if replacement tap_message << ":\n #{line.sub(/^(.*:\d+):.*$/, '\1')}\n\n" @@ -166,7 +166,7 @@ module Kernel file, line, = backtrace.first.split(":") line = line.to_i if line.present? - message = +"Calling #{method} is #{verb}! #{replacement_message}" + message = "Calling #{method} is #{verb}! #{replacement_message}" message << tap_message if tap_message message.freeze diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 74ab4a987b..30072c2298 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -4196,7 +4196,7 @@ class Formula when :default_prefix lambda do |_| T.bind(self, PourBottleCheck) - reason(+<<~EOS) + reason(<<~EOS) The bottle (and many others) needs to be installed into #{Homebrew::DEFAULT_PREFIX}. EOS satisfy { HOMEBREW_PREFIX.to_s == Homebrew::DEFAULT_PREFIX } diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index e09a55a869..47bdd56e61 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -1503,8 +1503,8 @@ on_request: installed_on_request?, options:) dep_tap = dep.tap next if dep_tap.blank? || (dep_tap.allowed_by_env? && !dep_tap.forbidden_by_env?) - error_message = +"The installation of #{formula.name} has a dependency #{dep.name}\n" \ - "from the #{dep_tap} tap but #{owner} " + error_message = "The installation of #{formula.name} has a dependency #{dep.name}\n" \ + "from the #{dep_tap} tap but #{owner} " error_message << "has not allowed this tap in `HOMEBREW_ALLOWED_TAPS`" unless dep_tap.allowed_by_env? error_message << " and\n" if !dep_tap.allowed_by_env? && dep_tap.forbidden_by_env? error_message << "has forbidden this tap in `HOMEBREW_FORBIDDEN_TAPS`" if dep_tap.forbidden_by_env? @@ -1519,8 +1519,8 @@ on_request: installed_on_request?, options:) formula_tap = formula.tap return if formula_tap.blank? || (formula_tap.allowed_by_env? && !formula_tap.forbidden_by_env?) - error_message = +"The installation of #{formula.full_name} has the tap #{formula_tap}\n" \ - "but #{owner} " + error_message = "The installation of #{formula.full_name} has the tap #{formula_tap}\n" \ + "but #{owner} " error_message << "has not allowed this tap in `HOMEBREW_ALLOWED_TAPS`" unless formula_tap.allowed_by_env? error_message << " and\n" if !formula_tap.allowed_by_env? && formula_tap.forbidden_by_env? error_message << "has forbidden this tap in `HOMEBREW_FORBIDDEN_TAPS`" if formula_tap.forbidden_by_env? diff --git a/Library/Homebrew/github_runner_matrix.rb b/Library/Homebrew/github_runner_matrix.rb index 9d77eee7e0..70ccfe07c2 100644 --- a/Library/Homebrew/github_runner_matrix.rb +++ b/Library/Homebrew/github_runner_matrix.rb @@ -149,7 +149,7 @@ class GitHubRunnerMatrix use_github_runner ||= @dependent_matrix use_github_runner &&= runner_timeout <= GITHUB_ACTIONS_RUNNER_TIMEOUT - ephemeral_suffix = +"-#{github_run_id}" + ephemeral_suffix = "-#{github_run_id}" ephemeral_suffix << "-deps" if @dependent_matrix ephemeral_suffix << "-long" if runner_timeout == GITHUB_ACTIONS_LONG_TIMEOUT ephemeral_suffix.freeze diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index eaee138af9..d2502c753b 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -459,7 +459,7 @@ class Tap "\n#{contact}" end - error_message = +"The installation of the #{full_name} was requested but #{owner}\n" + error_message = "The installation of the #{full_name} was requested but #{owner}\n" error_message << "has not allowed this tap in `HOMEBREW_ALLOWED_TAPS`" unless allowed_by_env? error_message << " and\n" if !allowed_by_env? && forbidden_by_env? error_message << "has forbidden this tap in `HOMEBREW_FORBIDDEN_TAPS`" if forbidden_by_env? diff --git a/Library/Homebrew/test/installed_dependents_spec.rb b/Library/Homebrew/test/installed_dependents_spec.rb index 35823954ee..f10228c7e5 100644 --- a/Library/Homebrew/test/installed_dependents_spec.rb +++ b/Library/Homebrew/test/installed_dependents_spec.rb @@ -175,7 +175,7 @@ RSpec.describe InstalledDependents do end def stub_cask_name(name, version, dependency) - c = Cask::CaskLoader.load(+<<-RUBY) + c = Cask::CaskLoader.load(<<-RUBY) cask "#{name}" do version "#{version}" diff --git a/Library/Homebrew/test/keg_relocate/relocation_spec.rb b/Library/Homebrew/test/keg_relocate/relocation_spec.rb index 2faca61856..a4e0f15be5 100644 --- a/Library/Homebrew/test/keg_relocate/relocation_spec.rb +++ b/Library/Homebrew/test/keg_relocate/relocation_spec.rb @@ -39,7 +39,7 @@ RSpec.describe Keg::Relocation do relocation.replace_text(text) expect(text).to eq "foo" - text = +<<~TEXT + text = <<~TEXT #{prefix}/foo #{cellar}/foo foo#{prefix}/bar diff --git a/Library/Homebrew/utils/github/api.rb b/Library/Homebrew/utils/github/api.rb index e24b78af61..bcc2bcbe3b 100644 --- a/Library/Homebrew/utils/github/api.rb +++ b/Library/Homebrew/utils/github/api.rb @@ -80,7 +80,7 @@ module GitHub class AuthenticationFailedError < Error def initialize(credentials_type, github_message) @github_message = github_message - message = +"GitHub API Error: #{github_message}\n" + message = "GitHub API Error: #{github_message}\n" message << case credentials_type when :github_cli_token <<~EOS From 46e209f1b0f19ee7d99de7e3cb242311b6d57db4 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Wed, 2 Oct 2024 09:51:17 -0700 Subject: [PATCH 5/7] Un-exclude rubocop-rspec from rbi generation --- Library/Homebrew/sorbet/tapioca/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/Library/Homebrew/sorbet/tapioca/config.yml b/Library/Homebrew/sorbet/tapioca/config.yml index 2c5fd5823b..175e212685 100644 --- a/Library/Homebrew/sorbet/tapioca/config.yml +++ b/Library/Homebrew/sorbet/tapioca/config.yml @@ -24,7 +24,6 @@ gem: - rspec_junit_formatter - rubocop-md - rubocop-performance - - rubocop-rspec - rubocop-sorbet - ruby-prof - simplecov_json_formatter From 693960dd060d5340e1efbb0f81b060337f7990a2 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Wed, 2 Oct 2024 09:53:36 -0700 Subject: [PATCH 6/7] brew tc --update --- .../sorbet/rbi/gems/rubocop-rspec@3.0.5.rbi | 7550 +++++++++++++++++ 1 file changed, 7550 insertions(+) create mode 100644 Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@3.0.5.rbi diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@3.0.5.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@3.0.5.rbi new file mode 100644 index 0000000000..a2fadae7fd --- /dev/null +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@3.0.5.rbi @@ -0,0 +1,7550 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-rspec` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-rspec`. + + +# source://rubocop-rspec//lib/rubocop/rspec.rb#3 +module RuboCop; end + +class RuboCop::AST::Node < ::Parser::AST::Node + include ::RuboCop::RSpec::Node +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/file_help.rb#4 +module RuboCop::Cop; end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/file_help.rb#5 +module RuboCop::Cop::RSpec; end + +# Checks that left braces for adjacent single line lets are aligned. +# +# @example +# # bad +# let(:foobar) { blahblah } +# let(:baz) { bar } +# let(:a) { b } +# +# # good +# let(:foobar) { blahblah } +# let(:baz) { bar } +# let(:a) { b } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/align_left_let_brace.rb#19 +class RuboCop::Cop::RSpec::AlignLeftLetBrace < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/align_left_let_brace.rb#28 + def on_new_investigation; end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/align_left_let_brace.rb#43 + def token_aligner; end + + class << self + # source://rubocop-rspec//lib/rubocop/cop/rspec/align_left_let_brace.rb#24 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/align_left_let_brace.rb#22 +RuboCop::Cop::RSpec::AlignLeftLetBrace::MSG = T.let(T.unsafe(nil), String) + +# Checks that right braces for adjacent single line lets are aligned. +# +# @example +# # bad +# let(:foobar) { blahblah } +# let(:baz) { bar } +# let(:a) { b } +# +# # good +# let(:foobar) { blahblah } +# let(:baz) { bar } +# let(:a) { b } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/align_right_let_brace.rb#19 +class RuboCop::Cop::RSpec::AlignRightLetBrace < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/align_right_let_brace.rb#28 + def on_new_investigation; end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/align_right_let_brace.rb#43 + def token_aligner; end + + class << self + # source://rubocop-rspec//lib/rubocop/cop/rspec/align_right_let_brace.rb#24 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/align_right_let_brace.rb#22 +RuboCop::Cop::RSpec::AlignRightLetBrace::MSG = T.let(T.unsafe(nil), String) + +# Check that instances are not being stubbed globally. +# +# Prefer instance doubles over stubbing any instance of a class +# +# @example +# # bad +# describe MyClass do +# before { allow_any_instance_of(MyClass).to receive(:foo) } +# end +# +# # good +# describe MyClass do +# let(:my_instance) { instance_double(MyClass) } +# +# before do +# allow(MyClass).to receive(:new).and_return(my_instance) +# allow(my_instance).to receive(:foo) +# end +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/any_instance.rb#26 +class RuboCop::Cop::RSpec::AnyInstance < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/any_instance.rb#34 + def on_send(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/any_instance.rb#27 +RuboCop::Cop::RSpec::AnyInstance::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/any_instance.rb#28 +RuboCop::Cop::RSpec::AnyInstance::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that around blocks actually run the test. +# +# @example +# # bad +# around do +# some_method +# end +# +# around do |test| +# some_method +# end +# +# # good +# around do |test| +# some_method +# test.call +# end +# +# around do |test| +# some_method +# test.run +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#29 +class RuboCop::Cop::RSpec::AroundBlock < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#45 + def find_arg_usage(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#35 + def hook_block(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#40 + def hook_numblock(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#49 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#59 + def on_numblock(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#67 + def add_no_arg_offense(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#84 + def check_for_numblock(block); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#71 + def check_for_unused_proxy(block, proxy); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#30 +RuboCop::Cop::RSpec::AroundBlock::MSG_NO_ARG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/around_block.rb#31 +RuboCop::Cop::RSpec::AroundBlock::MSG_UNUSED_ARG = T.let(T.unsafe(nil), String) + +# @abstract parent class to RSpec cops +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/base.rb#7 +class RuboCop::Cop::RSpec::Base < ::RuboCop::Cop::Base + include ::RuboCop::RSpec::Language + + # Set the config for dynamic DSL configuration-aware helpers + # that have no other means of accessing the configuration. + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/base.rb#19 + def on_new_investigation; end + + class << self + # Invoke the original inherited hook so our cops are recognized + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/base.rb#13 + def inherited(subclass); end + end +end + +# Check for expectations where `be` is used without argument. +# +# The `be` matcher is too generic, as it pass on everything that is not +# nil or false. If that is the exact intend, use `be_truthy`. In all other +# cases it's better to specify what exactly is the expected value. +# +# @example +# # bad +# expect(foo).to be +# +# # good +# expect(foo).to be_truthy +# expect(foo).to be 1.0 +# expect(foo).to be(true) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/be.rb#21 +class RuboCop::Cop::RSpec::Be < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/be.rb#27 + def be_without_args(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/be.rb#31 + def on_send(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/be.rb#22 +RuboCop::Cop::RSpec::Be::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/be.rb#24 +RuboCop::Cop::RSpec::Be::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Prefer using `be_empty` when checking for an empty array. +# +# @example +# # bad +# expect(array).to contain_exactly +# expect(array).to match_array([]) +# +# # good +# expect(array).to be_empty +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/be_empty.rb#16 +class RuboCop::Cop::RSpec::BeEmpty < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/be_empty.rb#23 + def expect_array_matcher?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/be_empty.rb#35 + def on_send(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/be_empty.rb#19 +RuboCop::Cop::RSpec::BeEmpty::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/be_empty.rb#20 +RuboCop::Cop::RSpec::BeEmpty::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check for expectations where `be(...)` can replace `eq(...)`. +# +# The `be` matcher compares by identity while the `eq` matcher compares +# using `==`. Booleans and nil can be compared by identity and therefore +# the `be` matcher is preferable as it is a more strict test. +# +# @example +# # bad +# expect(foo).to eq(true) +# expect(foo).to eq(false) +# expect(foo).to eq(nil) +# +# # good +# expect(foo).to be(true) +# expect(foo).to be(false) +# expect(foo).to be(nil) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/be_eq.rb#26 +class RuboCop::Cop::RSpec::BeEq < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/be_eq.rb#33 + def eq_type_with_identity?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/be_eq.rb#37 + def on_send(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/be_eq.rb#29 +RuboCop::Cop::RSpec::BeEq::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/be_eq.rb#30 +RuboCop::Cop::RSpec::BeEq::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check for expectations where `be(...)` can replace `eql(...)`. +# +# The `be` matcher compares by identity while the `eql` matcher +# compares using `eql?`. Integers, floats, booleans, symbols, and nil +# can be compared by identity and therefore the `be` matcher is +# preferable as it is a more strict test. +# +# This cop only looks for instances of `expect(...).to eql(...)`. We +# do not check `to_not` or `not_to` since `!eql?` is more strict +# than `!equal?`. We also do not try to flag `eq` because if +# `a == b`, and `b` is comparable by identity, `a` is still not +# necessarily the same type as `b` since the `#==` operator can +# coerce objects for comparison. +# +# @example +# # bad +# expect(foo).to eql(1) +# expect(foo).to eql(1.0) +# expect(foo).to eql(true) +# expect(foo).to eql(false) +# expect(foo).to eql(:bar) +# expect(foo).to eql(nil) +# +# # good +# expect(foo).to be(1) +# expect(foo).to be(1.0) +# expect(foo).to be(true) +# expect(foo).to be(false) +# expect(foo).to be(:bar) +# expect(foo).to be(nil) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/be_eql.rb#40 +class RuboCop::Cop::RSpec::BeEql < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/be_eql.rb#47 + def eql_type_with_identity(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/be_eql.rb#51 + def on_send(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/be_eql.rb#43 +RuboCop::Cop::RSpec::BeEql::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/be_eql.rb#44 +RuboCop::Cop::RSpec::BeEql::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Ensures a consistent style is used when matching `nil`. +# +# You can either use the more specific `be_nil` matcher, or the more +# generic `be` matcher with a `nil` argument. +# +# This cop can be configured using the `EnforcedStyle` option +# +# @example `EnforcedStyle: be_nil` (default) +# # bad +# expect(foo).to be(nil) +# +# # good +# expect(foo).to be_nil +# @example `EnforcedStyle: be` +# # bad +# expect(foo).to be_nil +# +# # good +# expect(foo).to be(nil) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#27 +class RuboCop::Cop::RSpec::BeNil < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#36 + def be_nil_matcher?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#41 + def nil_value_expectation?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#45 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#64 + def check_be_nil_style(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#56 + def check_be_style(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#31 +RuboCop::Cop::RSpec::BeNil::BE_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#32 +RuboCop::Cop::RSpec::BeNil::BE_NIL_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#33 +RuboCop::Cop::RSpec::BeNil::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check that before/after(:all/:context) isn't being used. +# +# @example +# # bad - Faster but risk of state leaking between examples +# describe MyClass do +# before(:all) { Widget.create } +# after(:context) { Widget.delete_all } +# end +# +# # good - Slower but examples are properly isolated +# describe MyClass do +# before(:each) { Widget.create } +# after(:each) { Widget.delete_all } +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#21 +class RuboCop::Cop::RSpec::BeforeAfterAll < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#30 + def before_or_after_all(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#34 + def on_send(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#22 +RuboCop::Cop::RSpec::BeforeAfterAll::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#27 +RuboCop::Cop::RSpec::BeforeAfterAll::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Prefer negated matchers over `to change.by(0)`. +# +# In the case of composite expectations, cop suggest using the +# negation matchers of `RSpec::Matchers#change`. +# +# By default the cop does not support autocorrect of +# compound expectations, but if you set the +# negated matcher for `change`, e.g. `not_change` with +# the `NegatedMatcher` option, the cop will perform the autocorrection. +# +# @example NegatedMatcher: ~ (default) +# # bad +# expect { run }.to change(Foo, :bar).by(0) +# expect { run }.to change { Foo.bar }.by(0) +# +# # bad - compound expectations (does not support autocorrection) +# expect { run } +# .to change(Foo, :bar).by(0) +# .and change(Foo, :baz).by(0) +# expect { run } +# .to change { Foo.bar }.by(0) +# .and change { Foo.baz }.by(0) +# +# # good +# expect { run }.not_to change(Foo, :bar) +# expect { run }.not_to change { Foo.bar } +# +# # good - compound expectations +# define_negated_matcher :not_change, :change +# expect { run } +# .to not_change(Foo, :bar) +# .and not_change(Foo, :baz) +# expect { run } +# .to not_change { Foo.bar } +# .and not_change { Foo.baz } +# @example NegatedMatcher: not_change +# # bad (support autocorrection to good case) +# expect { run } +# .to change(Foo, :bar).by(0) +# .and change(Foo, :baz).by(0) +# expect { run } +# .to change { Foo.bar }.by(0) +# .and change { Foo.baz }.by(0) +# +# # good +# define_negated_matcher :not_change, :change +# expect { run } +# .to not_change(Foo, :bar) +# .and not_change(Foo, :baz) +# expect { run } +# .to not_change { Foo.bar } +# .and not_change { Foo.baz } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#60 +class RuboCop::Cop::RSpec::ChangeByZero < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#88 + def change_nodes(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#71 + def expect_change_with_arguments(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#78 + def expect_change_with_block(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#92 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#133 + def autocorrect(corrector, node, change_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#140 + def autocorrect_compound(corrector, node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#120 + def compound_expectations?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#150 + def insert_operator(corrector, node, change_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#124 + def message(change_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#128 + def message_compound(change_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#174 + def negated_matcher; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#178 + def preferred_method; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#105 + def register_offense(node, change_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#163 + def remove_by_zero(corrector, node, change_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#159 + def replace_node(node, change_node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#67 +RuboCop::Cop::RSpec::ChangeByZero::CHANGE_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#64 +RuboCop::Cop::RSpec::ChangeByZero::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#65 +RuboCop::Cop::RSpec::ChangeByZero::MSG_COMPOUND = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#68 +RuboCop::Cop::RSpec::ChangeByZero::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Enforces consistent use of `be_a` or `be_kind_of`. +# +# @example EnforcedStyle: be_a (default) +# # bad +# expect(object).to be_kind_of(String) +# expect(object).to be_a_kind_of(String) +# +# # good +# expect(object).to be_a(String) +# expect(object).to be_an(String) +# @example EnforcedStyle: be_kind_of +# # bad +# expect(object).to be_a(String) +# expect(object).to be_an(String) +# +# # good +# expect(object).to be_kind_of(String) +# expect(object).to be_a_kind_of(String) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#26 +class RuboCop::Cop::RSpec::ClassCheck < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#54 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#67 + def autocorrect(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#71 + def format_message(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#79 + def offending?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#87 + def preferred_method_name; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#83 + def preferred_method_name?(method_name); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#91 + def preferred_method_names; end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#32 +RuboCop::Cop::RSpec::ClassCheck::METHOD_NAMES_FOR_BE_A = T.let(T.unsafe(nil), Set) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#37 +RuboCop::Cop::RSpec::ClassCheck::METHOD_NAMES_FOR_KIND_OF = T.let(T.unsafe(nil), Set) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#30 +RuboCop::Cop::RSpec::ClassCheck::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#42 +RuboCop::Cop::RSpec::ClassCheck::PREFERRED_METHOD_NAME_BY_STYLE = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/class_check.rb#47 +RuboCop::Cop::RSpec::ClassCheck::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Help methods for working with nodes containing comments. +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/comments_help.rb#7 +module RuboCop::Cop::RSpec::CommentsHelp + include ::RuboCop::Cop::RSpec::FinalEndLocation + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/comments_help.rb#17 + def begin_pos_with_comment(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/comments_help.rb#32 + def buffer; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/comments_help.rb#27 + def end_line_position(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/comments_help.rb#10 + def source_range_with_comment(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/comments_help.rb#23 + def start_line_position(node); end +end + +# Checks where `contain_exactly` is used. +# +# This cop checks for the following: +# - Prefer `match_array` when matching array values. +# - Prefer `be_empty` when using `contain_exactly` with no arguments. +# +# @example +# # bad +# it { is_expected.to contain_exactly(*array1, *array2) } +# +# # good +# it { is_expected.to match_array(array1 + array2) } +# +# # good +# it { is_expected.to contain_exactly(content, *array) } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#22 +class RuboCop::Cop::RSpec::ContainExactly < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#28 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#44 + def autocorrect_for_populated_array(node, corrector); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#36 + def check_populated_collection(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#25 +RuboCop::Cop::RSpec::ContainExactly::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/contain_exactly.rb#26 +RuboCop::Cop::RSpec::ContainExactly::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# `context` should not be used for specifying methods. +# +# @example +# # bad +# context '#foo_bar' do +# # ... +# end +# +# context '.foo_bar' do +# # ... +# end +# +# # good +# describe '#foo_bar' do +# # ... +# end +# +# describe '.foo_bar' do +# # ... +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/context_method.rb#27 +class RuboCop::Cop::RSpec::ContextMethod < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/context_method.rb#33 + def context_method(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/context_method.rb#41 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/context_method.rb#51 + def method_name?(description); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/context_method.rb#30 +RuboCop::Cop::RSpec::ContextMethod::MSG = T.let(T.unsafe(nil), String) + +# Checks that `context` docstring starts with an allowed prefix. +# +# The default list of prefixes is minimal. Users are encouraged to tailor +# the configuration to meet project needs. Other acceptable prefixes may +# include `if`, `unless`, `for`, `before`, `after`, or `during`. +# They may consist of multiple words if desired. +# +# This cop can be customized allowed context description pattern +# with `AllowedPatterns`. By default, there are no checking by pattern. +# +# @example `Prefixes` configuration +# # .rubocop.yml +# # RSpec/ContextWording: +# # Prefixes: +# # - when +# # - with +# # - without +# # - if +# # - unless +# # - for +# @example +# # bad +# context 'the display name not present' do +# # ... +# end +# +# # good +# context 'when the display name is not present' do +# # ... +# end +# @example `AllowedPatterns` configuration +# +# # .rubocop.yml +# # RSpec/ContextWording: +# # AllowedPatterns: +# # - とき$ +# @example +# # bad +# context '条件を満たす' do +# # ... +# end +# +# # good +# context '条件を満たすとき' do +# # ... +# end +# @see http://www.betterspecs.org/#contexts +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#58 +class RuboCop::Cop::RSpec::ContextWording < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#64 + def context_wording(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#68 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#79 + def allowed_patterns; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#87 + def bad_pattern?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#93 + def description(context); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#101 + def expect_patterns; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#83 + def prefix_regexes; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#111 + def prefixes; end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/context_wording.rb#61 +RuboCop::Cop::RSpec::ContextWording::MSG = T.let(T.unsafe(nil), String) + +# Check that the first argument to the top-level describe is a constant. +# +# It can be configured to ignore strings when certain metadata is passed. +# +# Ignores Rails and Aruba `type` metadata by default. +# +# @example `IgnoredMetadata` configuration +# # .rubocop.yml +# # RSpec/DescribeClass: +# # IgnoredMetadata: +# # type: +# # - request +# # - controller +# @example +# # bad +# describe 'Do something' do +# end +# +# # good +# describe TestedClass do +# subject { described_class } +# end +# +# describe 'TestedClass::VERSION' do +# subject { Object.const_get(self.class.description) } +# end +# +# describe "A feature example", type: :feature do +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#37 +class RuboCop::Cop::RSpec::DescribeClass < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::TopLevelGroup + + # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#44 + def example_group_with_ignored_metadata?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#49 + def not_a_const_described(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#58 + def on_top_level_group(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#54 + def sym_pair(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#79 + def ignored_metadata; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#68 + def ignored_metadata?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#74 + def string_constant?(described); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/describe_class.rb#40 +RuboCop::Cop::RSpec::DescribeClass::MSG = T.let(T.unsafe(nil), String) + +# Checks that the second argument to `describe` specifies a method. +# +# @example +# # bad +# describe MyClass, 'do something' do +# end +# +# # good +# describe MyClass, '#my_instance_method' do +# end +# +# describe MyClass, '.my_class_method' do +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/describe_method.rb#20 +class RuboCop::Cop::RSpec::DescribeMethod < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::TopLevelGroup + + # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_method.rb#34 + def method_name?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_method.rb#38 + def on_top_level_group(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_method.rb#27 + def second_string_literal_argument(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_method.rb#46 + def method_name_prefix?(description); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/describe_method.rb#23 +RuboCop::Cop::RSpec::DescribeMethod::MSG = T.let(T.unsafe(nil), String) + +# Avoid describing symbols. +# +# @example +# # bad +# describe :my_method do +# # ... +# end +# +# # good +# describe '#my_method' do +# # ... +# end +# @see https://github.com/rspec/rspec-core/issues/1610 +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/describe_symbol.rb#20 +class RuboCop::Cop::RSpec::DescribeSymbol < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_symbol.rb#25 + def describe_symbol?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/describe_symbol.rb#29 + def on_send(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/describe_symbol.rb#21 +RuboCop::Cop::RSpec::DescribeSymbol::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/describe_symbol.rb#22 +RuboCop::Cop::RSpec::DescribeSymbol::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that tests use `described_class`. +# +# If the first argument of describe is a class, the class is exposed to +# each example via described_class. +# +# This cop can be configured using the `EnforcedStyle`, `SkipBlocks` +# and `OnlyStaticConstants` options. +# `OnlyStaticConstants` is only relevant when `EnforcedStyle` is +# `described_class`. +# +# There's a known caveat with rspec-rails's `controller` helper that +# runs its block in a different context, and `described_class` is not +# available to it. `SkipBlocks` option excludes detection in all +# non-RSpec related blocks. +# +# To narrow down this setting to only a specific directory, it is +# possible to use an overriding configuration file local to that +# directory. +# +# @example `EnforcedStyle: described_class` (default) +# # bad +# describe MyClass do +# subject { MyClass.do_something } +# end +# +# # good +# describe MyClass do +# subject { described_class.do_something } +# end +# @example `OnlyStaticConstants: true` (default) +# # good +# describe MyClass do +# subject { MyClass::CONSTANT } +# end +# @example `OnlyStaticConstants: false` +# # bad +# describe MyClass do +# subject { MyClass::CONSTANT } +# end +# @example `EnforcedStyle: explicit` +# # bad +# describe MyClass do +# subject { described_class.do_something } +# end +# +# # good +# describe MyClass do +# subject { MyClass.do_something } +# end +# @example `SkipBlocks: true` +# # spec/controllers/.rubocop.yml +# # RSpec/DescribedClass: +# # SkipBlocks: true +# +# # acceptable +# describe MyConcern do +# controller(ApplicationController) do +# include MyConcern +# end +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#71 +class RuboCop::Cop::RSpec::DescribedClass < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RSpec::Namespace + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#80 + def common_instance_exec_closure?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#97 + def contains_described_class?(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#92 + def described_constant(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#100 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#85 + def rspec_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#89 + def scope_changing_syntax?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#136 + def allowed?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#117 + def autocorrect(corrector, match); end + + # @example + # # nil represents base constant + # collapse_namespace([], [:C]) # => [:C] + # collapse_namespace([:A, :B], [:C]) # => [:A, :B, :C] + # collapse_namespace([:A, :B], [:B, :C]) # => [:A, :B, :C] + # collapse_namespace([:A, :B], [nil, :C]) # => [nil, :C] + # collapse_namespace([:A, :B], [nil, :B, :C]) # => [nil, :B, :C] + # @param namespace [Array] + # @param const [Array] + # @return [Array] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#200 + def collapse_namespace(namespace, const); end + + # @example + # const_name(s(:const, nil, :C)) # => [:C] + # const_name(s(:const, s(:const, nil, :M), :C)) # => [:M, :C] + # const_name(s(:const, s(:cbase), :C)) # => [nil, :C] + # @param node [RuboCop::AST::Node] + # @return [Array] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#217 + def const_name(node); end + + # @yield [node] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#127 + def find_usage(node, &block); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#185 + def full_const_name(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#140 + def message(offense); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#163 + def offensive?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#171 + def offensive_described_class?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#159 + def only_static_constants?; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#149 + def scope_change?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#155 + def skippable_block?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#76 +RuboCop::Cop::RSpec::DescribedClass::DESCRIBED_CLASS = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#77 +RuboCop::Cop::RSpec::DescribedClass::MSG = T.let(T.unsafe(nil), String) + +# Avoid opening modules and defining specs within them. +# +# @example +# # bad +# module MyModule +# RSpec.describe MyClass do +# # ... +# end +# end +# +# # good +# RSpec.describe MyModule::MyClass do +# # ... +# end +# @see https://github.com/rubocop/rubocop-rspec/issues/735 +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class_module_wrapping.rb#22 +class RuboCop::Cop::RSpec::DescribedClassModuleWrapping < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class_module_wrapping.rb#26 + def include_rspec_blocks?(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class_module_wrapping.rb#30 + def on_module(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class_module_wrapping.rb#23 +RuboCop::Cop::RSpec::DescribedClassModuleWrapping::MSG = T.let(T.unsafe(nil), String) + +# Enforces custom RSpec dialects. +# +# A dialect can be based on the following RSpec methods: +# +# - describe, context, feature, example_group +# - xdescribe, xcontext, xfeature +# - fdescribe, fcontext, ffeature +# - shared_examples, shared_examples_for, shared_context +# - it, specify, example, scenario, its +# - fit, fspecify, fexample, fscenario, focus +# - xit, xspecify, xexample, xscenario, skip +# - pending +# - prepend_before, before, append_before, +# - around +# - prepend_after, after, append_after +# - let, let! +# - subject, subject! +# - expect, is_expected, expect_any_instance_of +# +# By default all of the RSpec methods and aliases are allowed. By setting +# a config like: +# +# RSpec/Dialect: +# PreferredMethods: +# context: describe +# +# If you were previously using the `RSpec/Capybara/FeatureMethods` cop and +# want to keep disabling all Capybara-specific methods that have the same +# native RSpec method (e.g. are just aliases), use the following config: +# +# RSpec/Dialect: +# PreferredMethods: +# background: :before +# scenario: :it +# xscenario: :xit +# given: :let +# given!: :let! +# feature: :describe +# +# You can expect the following behavior: +# +# @example +# # bad +# context 'display name presence' do +# # ... +# end +# +# # good +# describe 'display name presence' do +# # ... +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#58 +class RuboCop::Cop::RSpec::Dialect < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::MethodPreference + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#67 + def on_send(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#65 + def rspec_method?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#62 +RuboCop::Cop::RSpec::Dialect::MSG = T.let(T.unsafe(nil), String) + +# Avoid duplicated metadata. +# +# @example +# # bad +# describe 'Something', :a, :a +# +# # good +# describe 'Something', :a +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/duplicated_metadata.rb#14 +class RuboCop::Cop::RSpec::DuplicatedMetadata < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::Metadata + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/duplicated_metadata.rb#22 + def on_metadata(symbols, _hash); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/duplicated_metadata.rb#38 + def autocorrect(corrector, node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/duplicated_metadata.rb#50 + def duplicated?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/duplicated_metadata.rb#30 + def on_metadata_symbol(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/duplicated_metadata.rb#20 +RuboCop::Cop::RSpec::DuplicatedMetadata::MSG = T.let(T.unsafe(nil), String) + +# Checks if an example group does not include any tests. +# +# @example usage +# # bad +# describe Bacon do +# let(:bacon) { Bacon.new(chunkiness) } +# let(:chunkiness) { false } +# +# context 'extra chunky' do # flagged by rubocop +# let(:chunkiness) { true } +# end +# +# it 'is chunky' do +# expect(bacon.chunky?).to be_truthy +# end +# end +# +# # good +# describe Bacon do +# let(:bacon) { Bacon.new(chunkiness) } +# let(:chunkiness) { false } +# +# it 'is chunky' do +# expect(bacon.chunky?).to be_truthy +# end +# end +# +# # good +# describe Bacon do +# pending 'will add tests later' +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#38 +class RuboCop::Cop::RSpec::EmptyExampleGroup < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # Match example group blocks and yield their body + # + # @example source that matches + # describe 'example group' do + # it { is_expected.to be } + # end + # @param node [RuboCop::AST::Node] + # @yield [RuboCop::AST::Node] example group body + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#55 + def example_group_body(param0 = T.unsafe(nil)); end + + # Match examples, example groups and includes + # + # @example source that matches + # it { is_expected.to fly } + # describe('non-empty example groups too') { } + # it_behaves_like 'an animal' + # it_behaves_like('a cat') { let(:food) { 'milk' } } + # it_has_root_access + # skip + # it 'will be implemented later' + # @param node [RuboCop::AST::Node] + # @return [Array] matching nodes + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#73 + def example_or_group_or_include?(param0 = T.unsafe(nil)); end + + # Matches examples defined in scopes where they could run + # + # @example source that matches + # it { expect(myself).to be_run } + # describe { it { i_run_as_well } } + # @example source that does not match + # before { it { whatever here won't run anyway } } + # @param node [RuboCop::AST::Node] + # @return [Array] matching nodes + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#130 + def examples?(param0 = T.unsafe(nil)); end + + # Match examples or examples inside blocks + # + # @example source that matches + # it { expect(drink).to be_cold } + # context('when winter') { it { expect(drink).to be_hot } } + # (1..5).each { |divisor| it { is_expected.to divide_by(divisor) } } + # @param node [RuboCop::AST::Node] + # @return [Array] matching nodes + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#111 + def examples_directly_or_in_block?(param0 = T.unsafe(nil)); end + + # Match examples defined inside a block which is not a hook + # + # @example source that matches + # %w(r g b).each do |color| + # it { is_expected.to have_color(color) } + # end + # @example source that does not match + # before do + # it { is_expected.to fall_into_oblivion } + # end + # @param node [RuboCop::AST::Node] + # @return [Array] matching nodes + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#97 + def examples_inside_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#138 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#164 + def conditionals_with_examples?(body); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#172 + def examples_in_branches?(condition_node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#153 + def offensive?(body); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#178 + def removed_range(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_example_group.rb#43 +RuboCop::Cop::RSpec::EmptyExampleGroup::MSG = T.let(T.unsafe(nil), String) + +# Checks for empty before and after hooks. +# +# @example +# # bad +# before {} +# after do; end +# before(:all) do +# end +# after(:all) { } +# +# # good +# before { create_users } +# after do +# cleanup_users +# end +# before(:all) do +# create_feed +# end +# after(:all) { cleanup_feed } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_hook.rb#26 +class RuboCop::Cop::RSpec::EmptyHook < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_hook.rb#33 + def empty_hook?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_hook.rb#37 + def on_block(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_hook.rb#30 +RuboCop::Cop::RSpec::EmptyHook::MSG = T.let(T.unsafe(nil), String) + +# Checks if there is an empty line after example blocks. +# +# @example +# # bad +# RSpec.describe Foo do +# it 'does this' do +# end +# it 'does that' do +# end +# end +# +# # good +# RSpec.describe Foo do +# it 'does this' do +# end +# +# it 'does that' do +# end +# end +# +# # fair - it's ok to have non-separated one-liners +# RSpec.describe Foo do +# it { one } +# it { two } +# end +# @example with AllowConsecutiveOneLiners configuration +# # rubocop.yml +# # RSpec/EmptyLineAfterExample: +# # AllowConsecutiveOneLiners: false +# +# # bad +# RSpec.describe Foo do +# it { one } +# it { two } +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example.rb#43 +class RuboCop::Cop::RSpec::EmptyLineAfterExample < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::EmptyLineSeparation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example.rb#49 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example.rb#64 + def allow_consecutive_one_liners?; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example.rb#60 + def allowed_one_liner?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example.rb#68 + def consecutive_one_liner?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example.rb#72 + def next_one_line_example?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example.rb#47 +RuboCop::Cop::RSpec::EmptyLineAfterExample::MSG = T.let(T.unsafe(nil), String) + +# Checks if there is an empty line after example group blocks. +# +# @example +# # bad +# RSpec.describe Foo do +# describe '#bar' do +# end +# describe '#baz' do +# end +# end +# +# # good +# RSpec.describe Foo do +# describe '#bar' do +# end +# +# describe '#baz' do +# end +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example_group.rb#26 +class RuboCop::Cop::RSpec::EmptyLineAfterExampleGroup < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::EmptyLineSeparation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example_group.rb#32 + def on_block(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_example_group.rb#30 +RuboCop::Cop::RSpec::EmptyLineAfterExampleGroup::MSG = T.let(T.unsafe(nil), String) + +# Checks if there is an empty line after the last let block. +# +# @example +# # bad +# let(:foo) { bar } +# let(:something) { other } +# it { does_something } +# +# # good +# let(:foo) { bar } +# let(:something) { other } +# +# it { does_something } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_final_let.rb#20 +class RuboCop::Cop::RSpec::EmptyLineAfterFinalLet < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::EmptyLineSeparation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_final_let.rb#26 + def on_block(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_final_let.rb#24 +RuboCop::Cop::RSpec::EmptyLineAfterFinalLet::MSG = T.let(T.unsafe(nil), String) + +# Checks if there is an empty line after hook blocks. +# +# `AllowConsecutiveOneLiners` configures whether adjacent +# one-line definitions are considered an offense. +# +# @example +# # bad +# before { do_something } +# it { does_something } +# +# # bad +# after { do_something } +# it { does_something } +# +# # bad +# around { |test| test.run } +# it { does_something } +# +# # good +# after { do_something } +# +# it { does_something } +# +# # fair - it's ok to have non-separated one-liners hooks +# around { |test| test.run } +# after { do_something } +# +# it { does_something } +# @example with AllowConsecutiveOneLiners configuration +# # rubocop.yml +# # RSpec/EmptyLineAfterHook: +# # AllowConsecutiveOneLiners: false +# +# # bad +# around { |test| test.run } +# after { do_something } +# +# it { does_something } +# +# # good +# around { |test| test.run } +# +# after { do_something } +# +# it { does_something } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_hook.rb#53 +class RuboCop::Cop::RSpec::EmptyLineAfterHook < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::EmptyLineSeparation + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_hook.rb#60 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_hook.rb#60 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_hook.rb#74 + def chained_single_line_hooks?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_hook.rb#58 +RuboCop::Cop::RSpec::EmptyLineAfterHook::MSG = T.let(T.unsafe(nil), String) + +# Checks if there is an empty line after subject block. +# +# @example +# # bad +# subject(:obj) { described_class } +# let(:foo) { bar } +# +# # good +# subject(:obj) { described_class } +# +# let(:foo) { bar } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_subject.rb#18 +class RuboCop::Cop::RSpec::EmptyLineAfterSubject < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::EmptyLineSeparation + include ::RuboCop::Cop::RSpec::InsideExampleGroup + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_subject.rb#25 + def on_block(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_line_after_subject.rb#23 +RuboCop::Cop::RSpec::EmptyLineAfterSubject::MSG = T.let(T.unsafe(nil), String) + +# Helps determine the offending location if there is not an empty line +# following the node. Allows comments to follow directly after +# in the following cases. +# - followed by empty line(s) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/empty_line_separation.rb#11 +module RuboCop::Cop::RSpec::EmptyLineSeparation + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/empty_line_separation.rb#51 + def last_child?(node); end + + # @yield [offending_loc(enable_directive_line || final_end_line)] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/empty_line_separation.rb#26 + def missing_separating_line(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/empty_line_separation.rb#15 + def missing_separating_line_offense(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/empty_line_separation.rb#41 + def offending_loc(last_line); end +end + +# Avoid empty metadata hash. +# +# @example EnforcedStyle: symbol (default) +# # bad +# describe 'Something', {} +# +# # good +# describe 'Something' +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_metadata.rb#14 +class RuboCop::Cop::RSpec::EmptyMetadata < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::Metadata + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_metadata.rb#22 + def on_metadata(_symbols, hash); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_metadata.rb#32 + def remove_empty_metadata(corrector, node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_metadata.rb#20 +RuboCop::Cop::RSpec::EmptyMetadata::MSG = T.let(T.unsafe(nil), String) + +# Check that the `output` matcher is not called with an empty string. +# +# @example +# # bad +# expect { foo }.to output('').to_stdout +# expect { bar }.not_to output('').to_stderr +# +# # good +# expect { foo }.not_to output.to_stdout +# expect { bar }.to output.to_stderr +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_output.rb#17 +class RuboCop::Cop::RSpec::EmptyOutput < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_output.rb#24 + def matching_empty_output(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_output.rb#34 + def on_send(send_node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_output.rb#20 +RuboCop::Cop::RSpec::EmptyOutput::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_output.rb#21 +RuboCop::Cop::RSpec::EmptyOutput::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Use `eq` instead of `be ==` to compare objects. +# +# @example +# # bad +# expect(foo).to be == 42 +# +# # good +# expect(foo).to eq 42 +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/eq.rb#15 +class RuboCop::Cop::RSpec::Eq < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/eq.rb#23 + def be_equals(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/eq.rb#27 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/eq.rb#38 + def offense_range(matcher); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/eq.rb#19 +RuboCop::Cop::RSpec::Eq::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/eq.rb#20 +RuboCop::Cop::RSpec::Eq::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for long examples. +# +# A long example is usually more difficult to understand. Consider +# extracting out some behavior, e.g. with a `let` block, or a helper +# method. +# +# You can set constructs you want to fold with `CountAsOne`. +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of +# its actual size. +# +# @example +# # bad +# it do +# service = described_class.new +# more_setup +# more_setup +# result = service.call +# expect(result).to be(true) +# end +# +# # good +# it do +# service = described_class.new +# result = service.call +# expect(result).to be(true) +# end +# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# +# it do +# array = [ # +1 +# 1, +# 2 +# ] +# +# hash = { # +3 +# key: 'value' +# } +# +# msg = <<~HEREDOC # +1 +# Heredoc +# content. +# HEREDOC +# +# foo( # +1 +# 1, +# 2 +# ) +# end # 6 points +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#57 +class RuboCop::Cop::RSpec::ExampleLength < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::CodeLength + + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#62 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#70 + def cop_label; end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_length.rb#60 +RuboCop::Cop::RSpec::ExampleLength::LABEL = T.let(T.unsafe(nil), String) + +# Checks for examples without a description. +# +# RSpec allows for auto-generated example descriptions when there is no +# description provided or the description is an empty one. +# It is acceptable to use `specify` without a description +# +# This cop removes empty descriptions. +# It also defines whether auto-generated description is allowed, based +# on the configured style. +# +# This cop can be configured using the `EnforcedStyle` option +# +# @example +# # always good +# specify do +# result = service.call +# expect(result).to be(true) +# end +# @example `EnforcedStyle: always_allow` (default) +# # bad +# it('') { is_expected.to be_good } +# specify '' do +# result = service.call +# expect(result).to be(true) +# end +# +# # good +# it { is_expected.to be_good } +# specify do +# result = service.call +# expect(result).to be(true) +# end +# @example `EnforcedStyle: single_line_only` +# # bad +# it('') { is_expected.to be_good } +# it do +# result = service.call +# expect(result).to be(true) +# end +# +# # good +# it { is_expected.to be_good } +# @example `EnforcedStyle: disallow` +# # bad +# it { is_expected.to be_good } +# it do +# result = service.call +# expect(result).to be(true) +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#59 +class RuboCop::Cop::RSpec::ExampleWithoutDescription < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#67 + def example_description(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#69 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#83 + def check_example_without_description(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#91 + def disallow_empty_description?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#64 +RuboCop::Cop::RSpec::ExampleWithoutDescription::MSG_ADD_DESCRIPTION = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#62 +RuboCop::Cop::RSpec::ExampleWithoutDescription::MSG_DEFAULT_ARGUMENT = T.let(T.unsafe(nil), String) + +# Checks for common mistakes in example descriptions. +# +# This cop will correct docstrings that begin with 'should' and 'it'. +# This cop will also look for insufficient examples and call them out. +# +# The autocorrect is experimental - use with care! It can be configured +# with CustomTransform (e.g. have => has) and IgnoredWords (e.g. only). +# +# Use the DisallowedExamples setting to prevent unclear or insufficient +# descriptions. Please note that this config will not be treated as +# case sensitive. +# +# @example +# # bad +# it 'should find nothing' do +# end +# +# it 'will find nothing' do +# end +# +# # good +# it 'finds nothing' do +# end +# @example +# # bad +# it 'it does things' do +# end +# +# # good +# it 'does things' do +# end +# @example `DisallowedExamples: ['works']` (default) +# # bad +# it 'works' do +# end +# +# # good +# it 'marks the task as done' do +# end +# @see http://betterspecs.org/#should +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#49 +class RuboCop::Cop::RSpec::ExampleWording < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # 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 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#89 + def add_wording_offense(node, message); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#136 + def custom_transform; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#99 + def docstring(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#140 + def ignored_words; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#144 + def insufficient_docstring?(description_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#148 + def insufficient_examples; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#153 + def preprocess(message); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#109 + 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 + def text(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#60 +RuboCop::Cop::RSpec::ExampleWording::IT_PREFIX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#55 +RuboCop::Cop::RSpec::ExampleWording::MSG_INSUFFICIENT_DESCRIPTION = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#54 +RuboCop::Cop::RSpec::ExampleWording::MSG_IT = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#52 +RuboCop::Cop::RSpec::ExampleWording::MSG_SHOULD = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#53 +RuboCop::Cop::RSpec::ExampleWording::MSG_WILL = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#58 +RuboCop::Cop::RSpec::ExampleWording::SHOULD_PREFIX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#59 +RuboCop::Cop::RSpec::ExampleWording::WILL_PREFIX = T.let(T.unsafe(nil), Regexp) + +# Checks for excessive whitespace in example descriptions. +# +# @example +# # bad +# it ' has excessive spacing ' do +# end +# +# # good +# it 'has excessive spacing' do +# end +# @example +# # bad +# context ' when a condition is met ' do +# end +# +# # good +# context 'when a condition is met' do +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#26 +class RuboCop::Cop::RSpec::ExcessiveDocstringSpacing < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#32 + def example_description(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#39 + def on_send(node); end + + private + + # @param node [RuboCop::AST::Node] + # @param text [String] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#76 + def add_whitespace_offense(node, text); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#85 + def docstring(node); end + + # @param text [String] + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#54 + def excessive_whitespace?(text); end + + # @param text [String] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#68 + def strip_excessive_whitespace(text); 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/excessive_docstring_spacing.rb#97 + def text(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/excessive_docstring_spacing.rb#29 +RuboCop::Cop::RSpec::ExcessiveDocstringSpacing::MSG = T.let(T.unsafe(nil), String) + +# Checks for `expect(...)` calls containing literal values. +# +# Autocorrection is performed when the expected is not a literal. +# +# @example +# # bad +# expect(5).to eq(price) +# expect(/foo/).to eq(pattern) +# expect("John").to eq(name) +# +# # good +# expect(price).to eq(5) +# expect(pattern).to eq(/foo/) +# expect(name).to eq("John") +# +# # bad (not supported autocorrection) +# expect(false).to eq(true) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#24 +class RuboCop::Cop::RSpec::ExpectActual < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#57 + def expect_literal(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#68 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#98 + def complex_literal?(node); end + + # This is not implemented using a NodePattern because it seems + # to not be able to match against an explicit (nil) sexp + # + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#90 + def literal?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#94 + def simple_literal?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#44 +RuboCop::Cop::RSpec::ExpectActual::COMPLEX_LITERALS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#54 +RuboCop::Cop::RSpec::ExpectActual::CORRECTABLE_MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#27 +RuboCop::Cop::RSpec::ExpectActual::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#29 +RuboCop::Cop::RSpec::ExpectActual::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#31 +RuboCop::Cop::RSpec::ExpectActual::SIMPLE_LITERALS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#53 +RuboCop::Cop::RSpec::ExpectActual::SKIPPED_MATCHERS = T.let(T.unsafe(nil), Array) + +# Checks for consistent style of change matcher. +# +# Enforces either passing object and attribute as arguments to the matcher +# or passing a block that reads the attribute value. +# +# This cop can be configured using the `EnforcedStyle` option. +# +# @example `EnforcedStyle: method_call` (default) +# # bad +# expect { run }.to change { Foo.bar } +# expect { run }.to change { foo.baz } +# +# # good +# expect { run }.to change(Foo, :bar) +# expect { run }.to change(foo, :baz) +# # also good when there are arguments or chained method calls +# expect { run }.to change { Foo.bar(:count) } +# expect { run }.to change { user.reload.name } +# @example `EnforcedStyle: block` +# # bad +# expect { run }.to change(Foo, :bar) +# +# # good +# expect { run }.to change { Foo.bar } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#32 +class RuboCop::Cop::RSpec::ExpectChange < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#41 + def expect_change_with_arguments(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#46 + def expect_change_with_block(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#72 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#60 + def on_send(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#36 +RuboCop::Cop::RSpec::ExpectChange::MSG_BLOCK = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#37 +RuboCop::Cop::RSpec::ExpectChange::MSG_CALL = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_change.rb#38 +RuboCop::Cop::RSpec::ExpectChange::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Do not use `expect` in hooks such as `before`. +# +# @example +# # bad +# before do +# expect(something).to eq 'foo' +# end +# +# # bad +# after do +# expect_any_instance_of(Something).to receive(:foo) +# end +# +# # good +# it do +# expect(something).to eq 'foo' +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_hook.rb#24 +class RuboCop::Cop::RSpec::ExpectInHook < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_hook.rb#28 + def expectation(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_hook.rb#30 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_hook.rb#30 + def on_numblock(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_hook.rb#44 + def message(expect, hook); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_hook.rb#25 +RuboCop::Cop::RSpec::ExpectInHook::MSG = T.let(T.unsafe(nil), String) + +# Do not use `expect` in let. +# +# @example +# # bad +# let(:foo) do +# expect(something).to eq 'foo' +# end +# +# # good +# it do +# expect(something).to eq 'foo' +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_let.rb#19 +class RuboCop::Cop::RSpec::ExpectInLet < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_let.rb#23 + def expectation(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_let.rb#25 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_let.rb#36 + def message(expect); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_let.rb#20 +RuboCop::Cop::RSpec::ExpectInLet::MSG = T.let(T.unsafe(nil), String) + +# Checks for opportunities to use `expect { ... }.to output`. +# +# @example +# # bad +# $stdout = StringIO.new +# my_app.print_report +# $stdout = STDOUT +# expect($stdout.string).to eq('Hello World') +# +# # good +# expect { my_app.print_report }.to output('Hello World').to_stdout +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_output.rb#18 +class RuboCop::Cop::RSpec::ExpectOutput < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_output.rb#22 + def on_gvasgn(node); end + + private + + # Detect if we are inside the scope of a single example + # + # We want to encourage using `expect { ... }.to output` so + # we only care about situations where you would replace with + # an expectation. Therefore, assignments to stderr or stdout + # within a `before(:all)` or otherwise outside of an example + # don't matter. + # + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_output.rb#40 + def inside_example_scope?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_output.rb#19 +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 +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 + def predicate_matcher?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#195 + def predicate_matcher_block?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#135 + def allowed_explicit_matchers; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#139 + def check_explicit(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#219 + def corrector_explicit(corrector, to_node, actual, matcher, block_child); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#175 + def heredoc_argument?(matcher); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#213 + def message_explicit(matcher); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#226 + def move_predicate(corrector, actual, matcher, block_child); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#204 + def predicate_matcher_name?(name); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#162 + def replaceable_matcher?(matcher); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#255 + def replacement_matcher(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#237 + def to_predicate_method(matcher); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#171 + def uncorrectable_matcher?(node, matcher); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#127 +RuboCop::Cop::RSpec::ExplicitHelper::BUILT_IN_MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#125 +RuboCop::Cop::RSpec::ExplicitHelper::MSG_EXPLICIT = T.let(T.unsafe(nil), String) + +# Help methods for file. +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/file_help.rb#7 +module RuboCop::Cop::RSpec::FileHelp + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/file_help.rb#8 + def expanded_file_path; end +end + +# Helps find the true end location of nodes which might contain heredocs. +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/final_end_location.rb#7 +module RuboCop::Cop::RSpec::FinalEndLocation + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/final_end_location.rb#8 + def final_end_location(start_node); end +end + +# Checks if examples are focused. +# +# This cop does not support autocorrection in some cases. +# +# @example +# # bad +# describe MyClass, focus: true do +# end +# +# describe MyClass, :focus do +# end +# +# fdescribe MyClass do +# end +# +# # good +# describe MyClass do +# end +# +# # bad +# fdescribe 'test' do; end +# +# # good +# describe 'test' do; end +# +# # bad +# fdescribe 'test' do; end +# +# # good +# describe 'test' do; end +# +# # bad +# shared_examples 'test', focus: true do; end +# +# # good +# shared_examples 'test' do; end +# +# # bad +# shared_context 'test', focus: true do; end +# +# # good +# shared_context 'test' do; end +# +# # bad (does not support autocorrection) +# focus 'test' do; end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#52 +class RuboCop::Cop::RSpec::Focus < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#59 + def focusable_selector?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#77 + def focused_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#71 + def metadata(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#81 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#110 + def correct_send(corrector, focus); end + + # @yield [node] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#97 + def focus_metadata(node, &block); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#103 + def with_surrounding(focus); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#56 +RuboCop::Cop::RSpec::Focus::MSG = T.let(T.unsafe(nil), String) + +# Checks the arguments passed to `before`, `around`, and `after`. +# +# This cop checks for consistent style when specifying RSpec +# hooks which run for each example. There are three supported +# styles: "implicit", "each", and "example." All styles have +# the same behavior. +# +# @example `EnforcedStyle: implicit` (default) +# # bad +# before(:each) do +# # ... +# end +# +# # bad +# before(:example) do +# # ... +# end +# +# # good +# before do +# # ... +# end +# @example `EnforcedStyle: each` +# # bad +# before(:example) do +# # ... +# end +# +# # bad +# before do +# # ... +# end +# +# # good +# before(:each) do +# # ... +# end +# @example `EnforcedStyle: example` +# # bad +# before(:each) do +# # ... +# end +# +# # bad +# before do +# # ... +# end +# +# # good +# before(:example) do +# # ... +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#61 +class RuboCop::Cop::RSpec::HookArgument < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#78 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#78 + def on_numblock(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#69 + def scoped_hook(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#74 + def unscoped_hook(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#95 + def autocorrect(corrector, _node, method_send); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#102 + def check_implicit(method_send); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#116 + def explicit_message(scope); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#128 + def hook(node, &block); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#124 + def implicit_style?; end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#66 +RuboCop::Cop::RSpec::HookArgument::EXPLICIT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/hook_argument.rb#65 +RuboCop::Cop::RSpec::HookArgument::IMPLICIT_MSG = T.let(T.unsafe(nil), String) + +# Checks for before/around/after hooks that come after an example. +# +# @example +# # bad +# it 'checks what foo does' do +# expect(foo).to be +# end +# +# before { prepare } +# after { clean_up } +# +# # good +# before { prepare } +# after { clean_up } +# +# it 'checks what foo does' do +# expect(foo).to be +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#25 +class RuboCop::Cop::RSpec::HooksBeforeExamples < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#31 + def example_or_group?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#41 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#41 + def on_numblock(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#73 + def autocorrect(corrector, node, first_example); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#55 + def check_hooks(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#69 + def find_first_example(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#51 + def multiline_block?(block); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/hooks_before_examples.rb#28 +RuboCop::Cop::RSpec::HooksBeforeExamples::MSG = T.let(T.unsafe(nil), String) + +# Checks for equality assertions with identical expressions on both sides. +# +# @example +# # bad +# expect(foo.bar).to eq(foo.bar) +# expect(foo.bar).to eql(foo.bar) +# +# # good +# expect(foo.bar).to eq(2) +# expect(foo.bar).to eql(2) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/identical_equality_assertion.rb#17 +class RuboCop::Cop::RSpec::IdenticalEqualityAssertion < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/identical_equality_assertion.rb#23 + def equality_check?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/identical_equality_assertion.rb#29 + def on_send(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/identical_equality_assertion.rb#18 +RuboCop::Cop::RSpec::IdenticalEqualityAssertion::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/identical_equality_assertion.rb#20 +RuboCop::Cop::RSpec::IdenticalEqualityAssertion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check that implicit block expectation syntax is not used. +# +# Prefer using explicit block expectations. +# +# @example +# # bad +# subject { -> { do_something } } +# it { is_expected.to change(something).to(new_value) } +# +# # good +# it 'changes something to a new value' do +# expect { do_something }.to change(something).to(new_value) +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#20 +class RuboCop::Cop::RSpec::ImplicitBlockExpectation < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#36 + def implicit_expect(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#25 + def lambda?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#33 + def lambda_subject?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#40 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#62 + def find_subject(block_node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#58 + def multi_statement_example_group?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#49 + def nearest_subject(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#21 +RuboCop::Cop::RSpec::ImplicitBlockExpectation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_block_expectation.rb#22 +RuboCop::Cop::RSpec::ImplicitBlockExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check that a consistent implicit expectation style is used. +# +# This cop can be configured using the `EnforcedStyle` option +# and supports the `--auto-gen-config` flag. +# +# @example `EnforcedStyle: is_expected` (default) +# # bad +# it { should be_truthy } +# +# # good +# it { is_expected.to be_truthy } +# @example `EnforcedStyle: should` +# # bad +# it { is_expected.to be_truthy } +# +# # good +# it { should be_truthy } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#25 +class RuboCop::Cop::RSpec::ImplicitExpect < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#34 + def implicit_expect(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#49 + def on_send(node); end + + 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#94 + def replacement_source(offending_source); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#47 +RuboCop::Cop::RSpec::ImplicitExpect::ENFORCED_REPLACEMENTS = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#29 +RuboCop::Cop::RSpec::ImplicitExpect::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_expect.rb#31 +RuboCop::Cop::RSpec::ImplicitExpect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for usage of implicit subject (`is_expected` / `should`). +# +# This cop can be configured using the `EnforcedStyle` option +# +# @example `EnforcedStyle: single_line_only` (default) +# # bad +# it do +# is_expected.to be_truthy +# end +# +# # good +# it { is_expected.to be_truthy } +# it do +# expect(subject).to be_truthy +# end +# @example `EnforcedStyle: single_statement_only` +# # bad +# it do +# foo = 1 +# is_expected.to be_truthy +# end +# +# # good +# it do +# foo = 1 +# expect(subject).to be_truthy +# end +# it do +# is_expected.to be_truthy +# end +# @example `EnforcedStyle: disallow` +# # bad +# it { is_expected.to be_truthy } +# +# # good +# it { expect(subject).to be_truthy } +# @example `EnforcedStyle: require_implicit` +# # bad +# it { expect(subject).to be_truthy } +# +# # good +# it { is_expected.to be_truthy } +# +# # bad +# it do +# expect(subject).to be_truthy +# end +# +# # good +# it do +# is_expected.to be_truthy +# end +# +# # good +# it { expect(named_subject).to be_truthy } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#65 +class RuboCop::Cop::RSpec::ImplicitSubject < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#81 + def explicit_unnamed_subject?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#86 + def implicit_subject?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#90 + def on_send(node); end + + private + + # 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 + def example_of(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#135 + def implicit_subject_in_non_its?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#139 + 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 + 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 + def invalid?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#147 + def its?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#113 + def message(_node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#151 + def single_line?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#155 + def single_statement?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#69 +RuboCop::Cop::RSpec::ImplicitSubject::MSG_REQUIRE_EXPLICIT = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#71 +RuboCop::Cop::RSpec::ImplicitSubject::MSG_REQUIRE_IMPLICIT = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/implicit_subject.rb#73 +RuboCop::Cop::RSpec::ImplicitSubject::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Do not set up test data using indexes (e.g., `item_1`, `item_2`). +# +# It makes reading the test harder because it's not clear what exactly +# is tested by this particular example. +# +# The configurable options `AllowedIdentifiers` and `AllowedPatterns` +# will also read those set in `Naming/VariableNumber`. +# +# @example `Max: 1 (default)` +# # bad +# let(:item_1) { create(:item) } +# let(:item_2) { create(:item) } +# +# let(:item1) { create(:item) } +# let(:item2) { create(:item) } +# +# # good +# +# let(:visible_item) { create(:item, visible: true) } +# let(:invisible_item) { create(:item, visible: false) } +# @example `Max: 2` +# # bad +# let(:item_1) { create(:item) } +# let(:item_2) { create(:item) } +# let(:item_3) { create(:item) } +# +# # good +# let(:item_1) { create(:item) } +# let(:item_2) { create(:item) } +# @example `AllowedIdentifiers: ['item_1', 'item_2']` +# # good +# let(:item_1) { create(:item) } +# let(:item_2) { create(:item) } +# @example `AllowedPatterns: ['item']` +# # good +# let(:item_1) { create(:item) } +# let(:item_2) { create(:item) } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#47 +class RuboCop::Cop::RSpec::IndexedLet < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::AllowedIdentifiers + include ::RuboCop::Cop::AllowedPattern + + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#55 + def let_name(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#62 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#105 + def allowed_identifiers; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#99 + def cop_config_patterns_values; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#79 + def filter_indexed_lets(candidates); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#88 + def indexed_let?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#95 + def let_name_stripped_index(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#77 +RuboCop::Cop::RSpec::IndexedLet::INDEX_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#51 +RuboCop::Cop::RSpec::IndexedLet::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#76 +RuboCop::Cop::RSpec::IndexedLet::SUFFIX_INDEX_REGEX = T.let(T.unsafe(nil), Regexp) + +# A helper for `inflected` style +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#7 +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 + def be_bool?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#44 + def be_boolthy?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#29 + def predicate_in_actual?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#48 + def boolean_matcher?(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 + def message_inflected(predicate); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#56 + def predicate?(sym); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#85 + def remove_predicate(corrector, predicate); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#96 + def rewrite_matcher(corrector, predicate, matcher); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#67 + def to_predicate_matcher(name); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#107 + def true?(to_symbol, matcher); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#11 +RuboCop::Cop::RSpec::InflectedHelper::MSG_INFLECTED = T.let(T.unsafe(nil), String) + +# Helps you identify whether a given node +# is within an example group or not. +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/inside_example_group.rb#8 +module RuboCop::Cop::RSpec::InsideExampleGroup + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/inside_example_group.rb#19 + def example_group_root?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/inside_example_group.rb#23 + def example_group_root_with_siblings?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/inside_example_group.rb#11 + def inside_example_group?(node); end +end + +# Checks for `instance_double` used with `have_received`. +# +# @example +# # bad +# it do +# foo = instance_double(Foo).as_null_object +# expect(foo).to have_received(:bar) +# end +# +# # good +# it do +# foo = instance_spy(Foo) +# expect(foo).to have_received(:bar) +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/instance_spy.rb#21 +class RuboCop::Cop::RSpec::InstanceSpy < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_spy.rb#36 + def have_received_usage(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_spy.rb#28 + def null_double(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_spy.rb#45 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_spy.rb#61 + def autocorrect(corrector, node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/instance_spy.rb#24 +RuboCop::Cop::RSpec::InstanceSpy::MSG = T.let(T.unsafe(nil), String) + +# Checks for instance variable usage in specs. +# +# This cop can be configured with the option `AssignmentOnly` which +# will configure the cop to only register offenses on instance +# variable usage if the instance variable is also assigned within +# the spec +# +# @example +# # bad +# describe MyClass do +# before { @foo = [] } +# it { expect(@foo).to be_empty } +# end +# +# # good +# describe MyClass do +# let(:foo) { [] } +# it { expect(foo).to be_empty } +# end +# @example with AssignmentOnly configuration +# # rubocop.yml +# # RSpec/InstanceVariable: +# # AssignmentOnly: true +# +# # bad +# describe MyClass do +# before { @foo = [] } +# it { expect(@foo).to be_empty } +# end +# +# # allowed +# describe MyClass do +# it { expect(@foo).to be_empty } +# end +# +# # good +# describe MyClass do +# let(:foo) { [] } +# it { expect(foo).to be_empty } +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#48 +class RuboCop::Cop::RSpec::InstanceVariable < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::TopLevelGroup + + # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#60 + def custom_matcher?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#55 + def dynamic_class?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#71 + def ivar_assigned?(param0, param1); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#68 + def ivar_usage(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#73 + def on_top_level_group(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#90 + def assignment_only?; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#84 + def valid_usage?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#51 +RuboCop::Cop::RSpec::InstanceVariable::MSG = T.let(T.unsafe(nil), String) + +# Check for `specify` with `is_expected` and one-liner expectations. +# +# @example +# # bad +# specify { is_expected.to be_truthy } +# +# # good +# it { is_expected.to be_truthy } +# +# # good +# specify do +# # ... +# end +# specify { expect(sqrt(4)).to eq(2) } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/is_expected_specify.rb#21 +class RuboCop::Cop::RSpec::IsExpectedSpecify < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/is_expected_specify.rb#29 + def offense?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/is_expected_specify.rb#33 + def on_send(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/is_expected_specify.rb#25 +RuboCop::Cop::RSpec::IsExpectedSpecify::IS_EXPECTED_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/is_expected_specify.rb#26 +RuboCop::Cop::RSpec::IsExpectedSpecify::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/is_expected_specify.rb#24 +RuboCop::Cop::RSpec::IsExpectedSpecify::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that only one `it_behaves_like` style is used. +# +# @example `EnforcedStyle: it_behaves_like` (default) +# # bad +# it_should_behave_like 'a foo' +# +# # good +# it_behaves_like 'a foo' +# @example `EnforcedStyle: it_should_behave_like` +# # bad +# it_behaves_like 'a foo' +# +# # good +# it_should_behave_like 'a foo' +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/it_behaves_like.rb#22 +class RuboCop::Cop::RSpec::ItBehavesLike < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/it_behaves_like.rb#31 + def example_inclusion_offense(param0 = T.unsafe(nil), param1); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/it_behaves_like.rb#33 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/it_behaves_like.rb#43 + def message(_node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/it_behaves_like.rb#26 +RuboCop::Cop::RSpec::ItBehavesLike::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/it_behaves_like.rb#28 +RuboCop::Cop::RSpec::ItBehavesLike::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check that `all` matcher is used instead of iterating over an array. +# +# @example +# # bad +# it 'validates users' do +# [user1, user2, user3].each { |user| expect(user).to be_valid } +# end +# +# # good +# it 'validates users' do +# expect([user1, user2, user3]).to all(be_valid) +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#19 +class RuboCop::Cop::RSpec::IteratedExpectation < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#24 + def each?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#33 + def each_numblock?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#40 + def expectation?(param0 = T.unsafe(nil), param1); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#44 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#52 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#66 + def only_expectations?(body, arg); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#62 + def single_expectation?(body, arg); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/iterated_expectation.rb#20 +RuboCop::Cop::RSpec::IteratedExpectation::MSG = T.let(T.unsafe(nil), String) + +# Enforce that subject is the first definition in the test. +# +# @example +# # bad +# let(:params) { blah } +# subject { described_class.new(params) } +# +# before { do_something } +# subject { described_class.new(params) } +# +# it { expect_something } +# subject { described_class.new(params) } +# it { expect_something_else } +# +# # good +# subject { described_class.new(params) } +# let(:params) { blah } +# +# # good +# subject { described_class.new(params) } +# before { do_something } +# +# # good +# subject { described_class.new(params) } +# it { expect_something } +# it { expect_something_else } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#34 +class RuboCop::Cop::RSpec::LeadingSubject < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::InsideExampleGroup + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#40 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#70 + def autocorrect(corrector, node, sibling); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#49 + def check_previous_nodes(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#76 + def offending?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#58 + def offending_node(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#66 + def parent(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/leading_subject.rb#38 +RuboCop::Cop::RSpec::LeadingSubject::MSG = T.let(T.unsafe(nil), String) + +# Checks that no class, module, or constant is declared. +# +# Constants, including classes and modules, when declared in a block +# scope, are defined in global namespace, and leak between examples. +# +# If several examples may define a `DummyClass`, instead of being a +# blank slate class as it will be in the first example, subsequent +# examples will be reopening it and modifying its behavior in +# unpredictable ways. +# Even worse when a class that exists in the codebase is reopened. +# +# Anonymous classes are fine, since they don't result in global +# namespace name clashes. +# +# @example Constants leak between examples +# # bad +# describe SomeClass do +# OtherClass = Struct.new +# CONSTANT_HERE = 'I leak into global namespace' +# end +# +# # good +# describe SomeClass do +# before do +# stub_const('OtherClass', Struct.new) +# stub_const('CONSTANT_HERE', 'I only exist during this example') +# end +# end +# @example +# # bad +# describe SomeClass do +# class FooClass < described_class +# def double_that +# some_base_method * 2 +# end +# end +# +# it { expect(FooClass.new.double_that).to eq(4) } +# end +# +# # good - anonymous class, no constant needs to be defined +# describe SomeClass do +# let(:foo_class) do +# Class.new(described_class) do +# def double_that +# some_base_method * 2 +# end +# end +# end +# +# it { expect(foo_class.new.double_that).to eq(4) } +# end +# +# # good - constant is stubbed +# describe SomeClass do +# before do +# foo_class = Class.new(described_class) do +# def do_something +# end +# end +# stub_const('FooClass', foo_class) +# end +# +# it { expect(FooClass.new.double_that).to eq(4) } +# end +# @example +# # bad +# describe SomeClass do +# module SomeModule +# class SomeClass +# def do_something +# end +# end +# end +# end +# +# # good +# describe SomeClass do +# before do +# foo_class = Class.new(described_class) do +# def do_something +# end +# end +# stub_const('SomeModule::SomeClass', foo_class) +# end +# end +# @see https://rspec.info/features/3-12/rspec-mocks/mutating-constants +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#96 +class RuboCop::Cop::RSpec::LeakyConstantDeclaration < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#101 + def on_casgn(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#107 + def on_class(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#113 + def on_module(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#121 + def inside_describe_block?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#98 +RuboCop::Cop::RSpec::LeakyConstantDeclaration::MSG_CLASS = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#97 +RuboCop::Cop::RSpec::LeakyConstantDeclaration::MSG_CONST = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/leaky_constant_declaration.rb#99 +RuboCop::Cop::RSpec::LeakyConstantDeclaration::MSG_MODULE = T.let(T.unsafe(nil), String) + +# Checks for `let` definitions that come after an example. +# +# @example +# # bad +# let(:foo) { bar } +# +# it 'checks what foo does' do +# expect(foo).to be +# end +# +# let(:some) { other } +# +# it 'checks what some does' do +# expect(some).to be +# end +# +# # good +# let(:foo) { bar } +# let(:some) { other } +# +# it 'checks what foo does' do +# expect(foo).to be +# end +# +# it 'checks what some does' do +# expect(some).to be +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#33 +class RuboCop::Cop::RSpec::LetBeforeExamples < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#39 + def example_or_group?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#47 + def include_examples?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#58 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#93 + def autocorrect(corrector, node, first_example); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#74 + def check_let_declarations(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#66 + def example_group_with_include_examples?(body); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#89 + def find_first_example(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#70 + def multiline_block?(block); end + + class << self + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#54 + def autocorrect_incompatible_with; end + end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/let_before_examples.rb#36 +RuboCop::Cop::RSpec::LetBeforeExamples::MSG = T.let(T.unsafe(nil), String) + +# Checks unreferenced `let!` calls being used for test setup. +# +# @example +# # bad +# let!(:my_widget) { create(:widget) } +# +# it 'counts widgets' do +# expect(Widget.count).to eq(1) +# end +# +# # good +# it 'counts widgets' do +# create(:widget) +# expect(Widget.count).to eq(1) +# end +# +# # good +# before { create(:widget) } +# +# it 'counts widgets' do +# expect(Widget.count).to eq(1) +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#28 +class RuboCop::Cop::RSpec::LetSetup < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#32 + def example_or_shared_group_or_including?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#40 + def let_bang(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#48 + def method_called?(param0, param1); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#50 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#66 + def child_let_bang(node, &block); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#60 + def unused_let_bang(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/let_setup.rb#29 +RuboCop::Cop::RSpec::LetSetup::MSG = T.let(T.unsafe(nil), String) + +# Helper methods to location. +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/location_help.rb#7 +module RuboCop::Cop::RSpec::LocationHelp + private + + # @example + # foo 1, 2 + # ^^^^^ + # @param node [RuboCop::AST::SendNode] + # @return [Parser::Source::Range] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/location_help.rb#15 + def arguments_with_whitespace(node); end + + # @example + # foo { bar } + # ^^^^^^^^ + # @param node [RuboCop::AST::SendNode] + # @return [Parser::Source::Range] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/location_help.rb#26 + def block_with_whitespace(node); end + + class << self + # @example + # foo 1, 2 + # ^^^^^ + # @param node [RuboCop::AST::SendNode] + # @return [Parser::Source::Range] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/location_help.rb#15 + def arguments_with_whitespace(node); end + + # @example + # foo { bar } + # ^^^^^^^^ + # @param node [RuboCop::AST::SendNode] + # @return [Parser::Source::Range] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/location_help.rb#26 + def block_with_whitespace(node); end + end +end + +# Checks where `match_array` is used. +# +# This cop checks for the following: +# - Prefer `contain_exactly` when matching an array with values. +# - Prefer `eq` when using `match_array` with an empty array literal. +# +# @example +# # bad +# it { is_expected.to match_array([content1, content2]) } +# +# # good +# it { is_expected.to contain_exactly(content1, content2) } +# +# # good +# it { is_expected.to match_array([content] + array) } +# +# # good +# it { is_expected.to match_array(%w(tremble in fear foolish mortals)) } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#25 +class RuboCop::Cop::RSpec::MatchArray < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#32 + def match_array_with_empty_array?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#36 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#45 + def check_populated_array(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#28 +RuboCop::Cop::RSpec::MatchArray::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/match_array.rb#29 +RuboCop::Cop::RSpec::MatchArray::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check that chains of messages are not being stubbed. +# +# @example +# # bad +# allow(foo).to receive_message_chain(:bar, :baz).and_return(42) +# +# # good +# thing = Thing.new(baz: 42) +# allow(foo).to receive(:bar).and_return(thing) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/message_chain.rb#16 +class RuboCop::Cop::RSpec::MessageChain < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_chain.rb#20 + def on_send(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/message_chain.rb#17 +RuboCop::Cop::RSpec::MessageChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/message_chain.rb#18 +RuboCop::Cop::RSpec::MessageChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for consistent message expectation style. +# +# This cop can be configured in your configuration using the +# `EnforcedStyle` option and supports `--auto-gen-config`. +# +# @example `EnforcedStyle: allow` (default) +# +# # bad +# expect(foo).to receive(:bar) +# +# # good +# allow(foo).to receive(:bar) +# @example `EnforcedStyle: expect` +# +# # bad +# allow(foo).to receive(:bar) +# +# # good +# expect(foo).to receive(:bar) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#27 +class RuboCop::Cop::RSpec::MessageExpectation < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#35 + def message_expectation(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#42 + def on_send(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#40 + def receive_message?(param0); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#55 + def preferred_style?(expectation); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#30 +RuboCop::Cop::RSpec::MessageExpectation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#32 +RuboCop::Cop::RSpec::MessageExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that message expectations are set using spies. +# +# This cop can be configured in your configuration using the +# `EnforcedStyle` option and supports `--auto-gen-config`. +# +# @example `EnforcedStyle: have_received` (default) +# +# # bad +# expect(foo).to receive(:bar) +# do_something +# +# # good +# allow(foo).to receive(:bar) # or use instance_spy +# do_something +# expect(foo).to have_received(:bar) +# @example `EnforcedStyle: receive` +# +# # bad +# allow(foo).to receive(:bar) +# do_something +# expect(foo).to have_received(:bar) +# +# # good +# expect(foo).to receive(:bar) +# do_something +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#33 +class RuboCop::Cop::RSpec::MessageSpies < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#45 + def message_expectation(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#54 + def on_send(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#50 + def receive_message(param0); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#77 + def error_message(receiver); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#73 + def preferred_style?(expectation); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#67 + def receive_message_matcher(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#38 +RuboCop::Cop::RSpec::MessageSpies::MSG_HAVE_RECEIVED = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#36 +RuboCop::Cop::RSpec::MessageSpies::MSG_RECEIVE = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#42 +RuboCop::Cop::RSpec::MessageSpies::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Helper methods to find RSpec metadata. +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#7 +module RuboCop::Cop::RSpec::Metadata + include ::RuboCop::RSpec::Language + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#26 + def metadata_in_block(param0, param1); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#30 + def on_block(node); end + + # @raise [::NotImplementedError] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#43 + def on_metadata(_symbols, _hash); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#30 + def on_numblock(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#21 + def rspec_configure(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#13 + def rspec_metadata(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/metadata.rb#49 + def on_metadata_arguments(metadata_arguments); end +end + +# Use consistent metadata style. +# +# This cop does not support autocorrection in the case of +# `EnforcedStyle: hash` where the trailing metadata type is ambiguous. +# (e.g. `describe 'Something', :a, b`) +# +# @example EnforcedStyle: symbol (default) +# # bad +# describe 'Something', a: true +# +# # good +# describe 'Something', :a +# @example EnforcedStyle: hash +# # bad +# describe 'Something', :a +# +# # good +# describe 'Something', a: true +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#25 +class RuboCop::Cop::RSpec::MetadataStyle < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RSpec::Metadata + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#33 + def extract_metadata_hash(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#43 + def match_ambiguous_trailing_metadata?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#38 + def match_boolean_metadata_pair?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#47 + def on_metadata(symbols, hash); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#61 + def autocorrect_pair(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#66 + def autocorrect_symbol(corrector, node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#73 + def bad_metadata_pair?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#77 + def bad_metadata_symbol?(_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#81 + def format_symbol_to_pair_source(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#85 + def insert_pair(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#96 + def insert_pair_as_last_argument(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#105 + def insert_pair_to_empty_hash_metadata(corrector, node, hash_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#112 + def insert_pair_to_non_empty_hash_metadata(corrector, node, hash_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#119 + def insert_symbol(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#126 + def message_for_style; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#133 + def on_metadata_pair(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#141 + def on_metadata_symbol(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#149 + def remove_pair(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#159 + def remove_pair_following(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#171 + def remove_pair_preceding(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#183 + def remove_symbol(corrector, node); end +end + +# Checks that the first argument to an example group is not empty. +# +# @example +# # bad +# describe do +# end +# +# RSpec.describe do +# end +# +# # good +# describe TestedClass do +# end +# +# describe "A feature example" do +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/missing_example_group_argument.rb#23 +class RuboCop::Cop::RSpec::MissingExampleGroupArgument < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/missing_example_group_argument.rb#26 + def on_block(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/missing_example_group_argument.rb#24 +RuboCop::Cop::RSpec::MissingExampleGroupArgument::MSG = T.let(T.unsafe(nil), String) + +# Checks if `.to`, `not_to` or `to_not` are used. +# +# The RSpec::Expectations::ExpectationTarget must use `to`, `not_to` or +# `to_not` to run. Therefore, this cop checks if other methods are used. +# +# @example +# # bad +# expect(something).kind_of? Foo +# is_expected == 42 +# expect{something}.eq? BarError +# +# # good +# expect(something).to be_a Foo +# is_expected.to eq 42 +# expect{something}.to raise_error BarError +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/missing_expectation_target_method.rb#22 +class RuboCop::Cop::RSpec::MissingExpectationTargetMethod < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/missing_expectation_target_method.rb#27 + def expect?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/missing_expectation_target_method.rb#35 + def expect_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/missing_expectation_target_method.rb#40 + def expectation_without_runner?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/missing_expectation_target_method.rb#44 + def on_send(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/missing_expectation_target_method.rb#23 +RuboCop::Cop::RSpec::MissingExpectationTargetMethod::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/missing_expectation_target_method.rb#24 +RuboCop::Cop::RSpec::MissingExpectationTargetMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for multiple top-level example groups. +# +# Multiple descriptions for the same class or module should either +# be nested or separated into different test files. +# +# @example +# # bad +# describe MyClass, '.do_something' do +# end +# describe MyClass, '.do_something_else' do +# end +# +# # good +# describe MyClass do +# describe '.do_something' do +# end +# describe '.do_something_else' do +# end +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_describes.rb#26 +class RuboCop::Cop::RSpec::MultipleDescribes < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::TopLevelGroup + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_describes.rb#31 + def on_top_level_group(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_describes.rb#29 +RuboCop::Cop::RSpec::MultipleDescribes::MSG = T.let(T.unsafe(nil), String) + +# Checks if examples contain too many `expect` calls. +# +# This cop is configurable using the `Max` option +# and works with `--auto-gen-config`. +# +# @example +# # bad +# describe UserCreator do +# it 'builds a user' do +# expect(user.name).to eq("John") +# expect(user.age).to eq(22) +# end +# end +# +# # good +# describe UserCreator do +# it 'sets the users name' do +# expect(user.name).to eq("John") +# end +# +# it 'sets the users age' do +# expect(user.age).to eq(22) +# end +# end +# @example `aggregate_failures: true` (default) +# # good - the cop ignores when RSpec aggregates failures +# describe UserCreator do +# it 'builds a user', :aggregate_failures do +# expect(user.name).to eq("John") +# expect(user.age).to eq(22) +# end +# end +# @example `aggregate_failures: false` +# # Detected as an offense +# describe UserCreator do +# it 'builds a user', aggregate_failures: false do +# expect(user.name).to eq("John") +# expect(user.age).to eq(22) +# end +# end +# @example `Max: 1` (default) +# # bad +# describe UserCreator do +# it 'builds a user' do +# expect(user.name).to eq("John") +# expect(user.age).to eq(22) +# end +# end +# @example `Max: 2` +# # good +# describe UserCreator do +# it 'builds a user' do +# expect(user.name).to eq("John") +# expect(user.age).to eq(22) +# end +# end +# @see http://betterspecs.org/#single Single expectation test +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#69 +class RuboCop::Cop::RSpec::MultipleExpectations < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#78 + def aggregate_failures?(param0 = T.unsafe(nil), param1); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#89 + def aggregate_failures_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#86 + def expect?(param0 = T.unsafe(nil)); end + + # source://rubocop/1.66.1/lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#93 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#109 + def example_with_aggregate_failures?(example_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#116 + def find_aggregate_failures(example_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#121 + def find_expectation(node, &block); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#132 + def flag_example(node, expectation_count:); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#143 + def max_expectations; end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#72 +RuboCop::Cop::RSpec::MultipleExpectations::ANYTHING = T.let(T.unsafe(nil), Proc) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#70 +RuboCop::Cop::RSpec::MultipleExpectations::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#73 +RuboCop::Cop::RSpec::MultipleExpectations::TRUE_NODE = T.let(T.unsafe(nil), Proc) + +# Checks if example groups contain too many `let` and `subject` calls. +# +# This cop is configurable using the `Max` option and the `AllowSubject` +# which will configure the cop to only register offenses on calls to +# `let` and not calls to `subject`. +# +# @example +# # bad +# describe MyClass do +# let(:foo) { [] } +# let(:bar) { [] } +# let!(:baz) { [] } +# let(:qux) { [] } +# let(:quux) { [] } +# let(:quuz) { {} } +# end +# +# describe MyClass do +# let(:foo) { [] } +# let(:bar) { [] } +# let!(:baz) { [] } +# +# context 'when stuff' do +# let(:qux) { [] } +# let(:quux) { [] } +# let(:quuz) { {} } +# end +# end +# +# # good +# describe MyClass do +# let(:bar) { [] } +# let!(:baz) { [] } +# let(:qux) { [] } +# let(:quux) { [] } +# let(:quuz) { {} } +# end +# +# describe MyClass do +# context 'when stuff' do +# let(:foo) { [] } +# let(:bar) { [] } +# let!(:booger) { [] } +# end +# +# context 'when other stuff' do +# let(:qux) { [] } +# let(:quux) { [] } +# let(:quuz) { {} } +# end +# end +# @example when disabling AllowSubject configuration +# # rubocop.yml +# # RSpec/MultipleMemoizedHelpers: +# # AllowSubject: false +# +# # bad - `subject` counts towards memoized helpers +# describe MyClass do +# subject { {} } +# let(:foo) { [] } +# let(:bar) { [] } +# let!(:baz) { [] } +# let(:qux) { [] } +# let(:quux) { [] } +# end +# @example with Max configuration +# # rubocop.yml +# # RSpec/MultipleMemoizedHelpers: +# # Max: 1 +# +# # bad +# describe MyClass do +# let(:foo) { [] } +# let(:bar) { [] } +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#84 +class RuboCop::Cop::RSpec::MultipleMemoizedHelpers < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::Variable + + # source://rubocop/1.66.1/lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#91 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#102 + def on_new_investigation; end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#111 + def all_helpers(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#141 + def allow_subject?; end + + # Returns the value of attribute example_group_memoized_helpers. + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#109 + def example_group_memoized_helpers; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#116 + def helpers(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#137 + def max; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#127 + def variable_nodes(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#87 +RuboCop::Cop::RSpec::MultipleMemoizedHelpers::MSG = T.let(T.unsafe(nil), String) + +# Checks if an example group defines `subject` multiple times. +# +# This cop does not support autocorrection in some cases. +# The autocorrect behavior for this cop depends on the type of +# duplication: +# +# - If multiple named subjects are defined then this probably indicates +# that the overwritten subjects (all subjects except the last +# definition) are effectively being used to define helpers. In this +# case they are replaced with `let`. +# +# - If multiple unnamed subjects are defined though then this can *only* +# be dead code and we remove the overwritten subject definitions. +# +# - If subjects are defined with `subject!` then we don't autocorrect. +# This is enough of an edge case that people can just move this to +# a `before` hook on their own +# +# @example +# # bad +# describe Foo do +# subject(:user) { User.new } +# subject(:post) { Post.new } +# end +# +# # good +# describe Foo do +# let(:user) { User.new } +# subject(:post) { Post.new } +# end +# +# # bad (does not support autocorrection) +# describe Foo do +# subject!(:user) { User.new } +# subject!(:post) { Post.new } +# end +# +# # good +# describe Foo do +# before do +# User.new +# Post.new +# end +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_subjects.rb#51 +class RuboCop::Cop::RSpec::MultipleSubjects < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_subjects.rb#57 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_subjects.rb#71 + def autocorrect(corrector, subject); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_subjects.rb#81 + def named_subject?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_subjects.rb#89 + def remove_autocorrect(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_subjects.rb#85 + def rename_autocorrect(corrector, node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_subjects.rb#55 +RuboCop::Cop::RSpec::MultipleSubjects::MSG = T.let(T.unsafe(nil), String) + +# Checks for explicitly referenced test subjects. +# +# RSpec lets you declare an "implicit subject" using `subject { ... }` +# which allows for tests like `it { is_expected.to be_valid }`. +# If you need to reference your test subject you should explicitly +# name it using `subject(:your_subject_name) { ... }`. Your test subjects +# should be the most important object in your tests so they deserve +# a descriptive name. +# +# This cop can be configured in your configuration using `EnforcedStyle`, +# and `IgnoreSharedExamples` which will not report offenses for implicit +# subjects in shared example groups. +# +# @example `EnforcedStyle: always` (default) +# # bad +# RSpec.describe User do +# subject { described_class.new } +# +# it 'is valid' do +# expect(subject.valid?).to be(true) +# end +# end +# +# # good +# RSpec.describe User do +# subject(:user) { described_class.new } +# +# it 'is valid' do +# expect(user.valid?).to be(true) +# end +# end +# +# # also good +# RSpec.describe User do +# subject(:user) { described_class.new } +# +# it { is_expected.to be_valid } +# end +# @example `EnforcedStyle: named_only` +# # bad +# RSpec.describe User do +# subject(:user) { described_class.new } +# +# it 'is valid' do +# expect(subject.valid?).to be(true) +# end +# end +# +# # good +# RSpec.describe User do +# subject(:user) { described_class.new } +# +# it 'is valid' do +# expect(user.valid?).to be(true) +# end +# end +# +# # also good +# RSpec.describe User do +# subject { described_class.new } +# +# it { is_expected.to be_valid } +# end +# +# # acceptable +# RSpec.describe User do +# subject { described_class.new } +# +# it 'is valid' do +# expect(subject.valid?).to be(true) +# end +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#79 +class RuboCop::Cop::RSpec::NamedSubject < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#85 + def example_or_hook_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#97 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#90 + def shared_example?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#95 + def subject_usage(param0); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#123 + def allow_explicit_subject?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#127 + def always?; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#117 + def check_explicit_subject(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#150 + def find_subject(block_node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#109 + def ignored_shared_example?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#131 + def named_only?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#142 + def nearest_subject(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#136 + def subject_definition_is_named?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#82 +RuboCop::Cop::RSpec::NamedSubject::MSG = T.let(T.unsafe(nil), String) + +# Helps to find namespace of the node. +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/namespace.rb#7 +module RuboCop::Cop::RSpec::Namespace + private + + # @example + # namespace(node) # => ['A', 'B', 'C'] + # @param node [RuboCop::AST::Node] + # @return [Array] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/namespace.rb#14 + def namespace(node); end +end + +# Checks for nested example groups. +# +# This cop is configurable using the `Max` option +# and supports `--auto-gen-config`. +# +# @example +# # bad +# context 'when using some feature' do +# let(:some) { :various } +# let(:feature) { :setup } +# +# context 'when user is signed in' do # flagged by rubocop +# let(:user) do +# UserCreate.call(user_attributes) +# end +# +# let(:user_attributes) do +# { +# name: 'John', +# age: 22, +# role: role +# } +# end +# +# context 'when user is an admin' do # flagged by rubocop +# let(:role) { 'admin' } +# +# it 'blah blah' +# it 'yada yada' +# end +# end +# end +# +# # good +# context 'using some feature as an admin' do +# let(:some) { :various } +# let(:feature) { :setup } +# +# let(:user) do +# UserCreate.call( +# name: 'John', +# age: 22, +# role: 'admin' +# ) +# end +# +# it 'blah blah' +# it 'yada yada' +# end +# @example `Max: 3` (default) +# # bad +# describe Foo do +# context 'foo' do +# context 'bar' do +# context 'baz' do # flagged by rubocop +# end +# end +# end +# end +# @example `Max: 2` +# # bad +# describe Foo do +# context 'foo' do +# context 'bar' do # flagged by rubocop +# context 'baz' do # flagged by rubocop +# end +# end +# end +# end +# @example `AllowedGroups: [] (default)` +# describe Foo do # <-- nested groups 1 +# context 'foo' do # <-- nested groups 2 +# context 'bar' do # <-- nested groups 3 +# end +# end +# end +# @example `AllowedGroups: [path]` +# describe Foo do # <-- nested groups 1 +# path '/foo' do # <-- nested groups 1 (not counted) +# context 'bar' do # <-- nested groups 2 +# end +# end +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#94 +class RuboCop::Cop::RSpec::NestedGroups < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::TopLevelGroup + + # source://rubocop/1.66.1/lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#107 + def on_top_level_group(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#157 + def allowed_groups; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#134 + def count_up_nesting?(node, example_group); end + + # @yield [node, nesting] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#119 + def find_nested_example_groups(node, nesting: T.unsafe(nil), &block); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#144 + def max_nesting; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#148 + def max_nesting_config; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#140 + def message(nesting); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#99 +RuboCop::Cop::RSpec::NestedGroups::DEPRECATED_MAX_KEY = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#101 +RuboCop::Cop::RSpec::NestedGroups::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#97 +RuboCop::Cop::RSpec::NestedGroups::MSG = T.let(T.unsafe(nil), String) + +# Checks if an example contains any expectation. +# +# All RSpec's example and expectation methods are covered by default. +# If you are using your own custom methods, +# add the following configuration: +# +# RSpec: +# Language: +# Examples: +# Regular: +# - custom_it +# Expectations: +# - custom_expect +# +# This cop can be customized with an allowed expectation methods pattern +# with an `AllowedPatterns` option. ^expect_ and ^assert_ are allowed +# by default. +# +# @example +# # bad +# it do +# a? +# end +# +# # good +# it do +# expect(a?).to be(true) +# end +# @example `AllowedPatterns` configuration +# +# # .rubocop.yml +# # RSpec/NoExpectationExample: +# # AllowedPatterns: +# # - ^expect_ +# # - ^assert_ +# @example +# # bad +# it do +# not_expect_something +# end +# +# # good +# it do +# expect_something +# end +# +# it do +# assert_something +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/no_expectation_example.rb#58 +class RuboCop::Cop::RSpec::NoExpectationExample < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RSpec::SkipOrPending + + # @param node [RuboCop::AST::Node] + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/no_expectation_example.rb#74 + def includes_expectation?(param0); end + + # @param node [RuboCop::AST::Node] + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/no_expectation_example.rb#84 + def includes_skip_example?(param0); end + + # @param node [RuboCop::AST::BlockNode] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/no_expectation_example.rb#89 + def on_block(node); end + + # @param node [RuboCop::AST::BlockNode] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/no_expectation_example.rb#89 + def on_numblock(node); end + + # @param node [RuboCop::AST::Node] + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/no_expectation_example.rb#67 + def regular_or_focused_example?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/no_expectation_example.rb#62 +RuboCop::Cop::RSpec::NoExpectationExample::MSG = T.let(T.unsafe(nil), String) + +# Checks for consistent method usage for negating expectations. +# +# @example `EnforcedStyle: not_to` (default) +# # bad +# it '...' do +# expect(false).to_not be_true +# end +# +# # good +# it '...' do +# expect(false).not_to be_true +# end +# @example `EnforcedStyle: to_not` +# # bad +# it '...' do +# expect(false).not_to be_true +# end +# +# # good +# it '...' do +# expect(false).to_not be_true +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/not_to_not.rb#30 +class RuboCop::Cop::RSpec::NotToNot < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/not_to_not.rb#38 + def not_to_not_offense(param0 = T.unsafe(nil), param1); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/not_to_not.rb#40 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/not_to_not.rb#50 + def message(_node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/not_to_not.rb#34 +RuboCop::Cop::RSpec::NotToNot::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/not_to_not.rb#35 +RuboCop::Cop::RSpec::NotToNot::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks if there is a let/subject that overwrites an existing one. +# +# @example +# # bad +# let(:foo) { bar } +# let(:foo) { baz } +# +# subject(:foo) { bar } +# let(:foo) { baz } +# +# let(:foo) { bar } +# let!(:foo) { baz } +# +# # good +# subject(:test) { something } +# let(:foo) { bar } +# let(:baz) { baz } +# let!(:other) { other } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/overwriting_setup.rb#25 +class RuboCop::Cop::RSpec::OverwritingSetup < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/overwriting_setup.rb#34 + def first_argument_name(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/overwriting_setup.rb#36 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/overwriting_setup.rb#29 + def setup?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/overwriting_setup.rb#64 + def common_setup?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/overwriting_setup.rb#49 + def find_duplicates(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/overwriting_setup.rb#26 +RuboCop::Cop::RSpec::OverwritingSetup::MSG = T.let(T.unsafe(nil), String) + +# Checks for any pending or skipped examples. +# +# @example +# # bad +# describe MyClass do +# it "should be true" +# end +# +# describe MyClass do +# it "should be true", skip: true do +# expect(1).to eq(2) +# end +# end +# +# describe MyClass do +# it "should be true" do +# pending +# end +# end +# +# describe MyClass do +# xit "should be true" do +# end +# end +# +# # good +# describe MyClass do +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#35 +class RuboCop::Cop::RSpec::Pending < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::SkipOrPending + + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#61 + def on_send(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#54 + def pending_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#41 + def skippable?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#49 + def skippable_example?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#69 + def skipped?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#74 + def skipped_regular_example_without_body?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/pending.rb#38 +RuboCop::Cop::RSpec::Pending::MSG = T.let(T.unsafe(nil), String) + +# Checks for pending or skipped examples without reason. +# +# @example +# # bad +# pending 'does something' do +# end +# +# # bad +# it 'does something', :pending do +# end +# +# # bad +# it 'does something' do +# pending +# end +# +# # bad +# xdescribe 'something' do +# end +# +# # bad +# skip 'does something' do +# end +# +# # bad +# it 'does something', :skip do +# end +# +# # bad +# it 'does something' do +# skip +# end +# +# # bad +# it 'does something' +# +# # good +# it 'does something' do +# pending 'reason' +# end +# +# # good +# it 'does something' do +# skip 'reason' +# end +# +# # good +# it 'does something', pending: 'reason' do +# end +# +# # good +# it 'does something', skip: 'reason' do +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#59 +class RuboCop::Cop::RSpec::PendingWithoutReason < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#82 + def metadata_without_reason?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#102 + def on_send(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#98 + def pending_step_without_reason?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#93 + def skipped_by_example_group_method?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#72 + def skipped_by_example_method?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#77 + def skipped_by_example_method_with_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#63 + def skipped_in_example?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#123 + def block_node_example_group?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#135 + def on_pending_by_metadata(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#151 + def on_skipped_by_example_group_method(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#141 + def on_skipped_by_example_method(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#129 + def on_skipped_by_in_example_method(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#116 + def parent_node(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/pending_without_reason.rb#60 +RuboCop::Cop::RSpec::PendingWithoutReason::MSG = T.let(T.unsafe(nil), String) + +# Prefer using predicate matcher over using predicate method directly. +# +# RSpec defines magic matchers for predicate methods. +# This cop recommends to use the predicate matcher instead of using +# predicate method directly. +# +# @example Strict: true, EnforcedStyle: inflected (default) +# # bad +# expect(foo.something?).to be_truthy +# +# # good +# expect(foo).to be_something +# +# # also good - It checks "true" strictly. +# expect(foo.something?).to be(true) +# @example Strict: false, EnforcedStyle: inflected +# # bad +# expect(foo.something?).to be_truthy +# expect(foo.something?).to be(true) +# +# # good +# expect(foo).to be_something +# @example Strict: true, EnforcedStyle: explicit +# # bad +# expect(foo).to be_something +# +# # good - the above code is rewritten to it by this cop +# expect(foo.something?).to be(true) +# +# # bad - no autocorrect +# expect(foo) +# .to be_something(<<~TEXT) +# bar +# TEXT +# +# # good +# expect(foo.something?(<<~TEXT)).to be(true) +# bar +# TEXT +# @example Strict: false, EnforcedStyle: explicit +# # bad +# expect(foo).to be_something +# +# # 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 +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 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#326 + def on_send(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#324 +RuboCop::Cop::RSpec::PredicateMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check for `once` and `twice` receive counts matchers usage. +# +# @example +# # bad +# expect(foo).to receive(:bar).exactly(1).times +# expect(foo).to receive(:bar).exactly(2).times +# expect(foo).to receive(:bar).at_least(1).times +# expect(foo).to receive(:bar).at_least(2).times +# expect(foo).to receive(:bar).at_most(1).times +# expect(foo).to receive(:bar).at_most(2).times +# +# # good +# expect(foo).to receive(:bar).once +# expect(foo).to receive(:bar).twice +# expect(foo).to receive(:bar).at_least(:once) +# expect(foo).to receive(:bar).at_least(:twice) +# expect(foo).to receive(:bar).at_most(:once) +# expect(foo).to receive(:bar).at_most(:twice).times +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#25 +class RuboCop::Cop::RSpec::ReceiveCounts < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#40 + def on_send(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#33 + def receive_counts(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#38 + def stub?(param0); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#55 + def autocorrect(corrector, node, range); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#72 + def matcher_for(method, count); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#64 + def message_for(node, source); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#81 + def range(node, offending_node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#28 +RuboCop::Cop::RSpec::ReceiveCounts::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_counts.rb#30 +RuboCop::Cop::RSpec::ReceiveCounts::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for multiple messages stubbed on the same object. +# +# @example +# # bad +# before do +# allow(Service).to receive(:foo).and_return(bar) +# allow(Service).to receive(:baz).and_return(qux) +# end +# +# # good +# before do +# allow(Service).to receive_messages(foo: bar, baz: qux) +# end +# +# # good - ignore same message +# before do +# allow(Service).to receive(:foo).and_return(bar) +# allow(Service).to receive(:foo).and_return(qux) +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#31 +class RuboCop::Cop::RSpec::ReceiveMessages < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#44 + def allow_argument(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#39 + def allow_receive_message?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#63 + def on_begin(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#59 + def receive_and_return_argument(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#54 + def receive_arg(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#49 + def receive_node(param0); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#83 + def add_repeated_lines_and_arguments(items); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#100 + def arguments(items); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#150 + def heredoc_or_splat?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#146 + def item_range_by_whole_lines(item); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#135 + def message(repeated_lines); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#109 + def normalize_receive_arg(receive_arg); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#117 + def normalize_return_arg(return_arg); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#125 + def register_offense(item, repeated_lines, args); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#73 + def repeated_receive_message(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#139 + def replace_to_receive_messages(corrector, item, args); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#155 + def requires_quotes?(value); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#91 + def uniq_items(items); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_messages.rb#35 +RuboCop::Cop::RSpec::ReceiveMessages::MSG = T.let(T.unsafe(nil), String) + +# Prefer `not_to receive(...)` over `receive(...).never`. +# +# @example +# # bad +# expect(foo).to receive(:bar).never +# +# # good +# expect(foo).not_to receive(:bar) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_never.rb#15 +class RuboCop::Cop::RSpec::ReceiveNever < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_never.rb#21 + def method_on_stub?(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_never.rb#23 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/receive_never.rb#33 + def autocorrect(corrector, node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_never.rb#17 +RuboCop::Cop::RSpec::ReceiveNever::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/receive_never.rb#18 +RuboCop::Cop::RSpec::ReceiveNever::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Remove redundant `around` hook. +# +# @example +# # bad +# around do |example| +# example.run +# end +# +# # good +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#16 +class RuboCop::Cop::RSpec::RedundantAround < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#43 + def match_redundant_around_hook_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#48 + def match_redundant_around_hook_send?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#23 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#23 + def on_numblock(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#32 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#59 + def autocorrect(corrector, node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#19 +RuboCop::Cop::RSpec::RedundantAround::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#21 +RuboCop::Cop::RSpec::RedundantAround::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for redundant predicate matcher. +# +# @example +# # bad +# expect(foo).to be_exist(bar) +# expect(foo).not_to be_include(bar) +# expect(foo).to be_all(bar) +# +# # good +# expect(foo).to exist(bar) +# expect(foo).not_to include(bar) +# expect(foo).to all be(bar) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_predicate_matcher.rb#19 +class RuboCop::Cop::RSpec::RedundantPredicateMatcher < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_predicate_matcher.rb#28 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_predicate_matcher.rb#44 + def message(bad_method, good_method); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_predicate_matcher.rb#48 + def replaceable_arguments?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_predicate_matcher.rb#56 + def replaced_method_name(method_name); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_predicate_matcher.rb#22 +RuboCop::Cop::RSpec::RedundantPredicateMatcher::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_predicate_matcher.rb#23 +RuboCop::Cop::RSpec::RedundantPredicateMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that `remove_const` is not used in specs. +# +# @example +# # bad +# it 'does something' do +# Object.send(:remove_const, :SomeConstant) +# end +# +# before do +# SomeClass.send(:remove_const, :SomeConstant) +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/remove_const.rb#18 +class RuboCop::Cop::RSpec::RemoveConst < ::RuboCop::Cop::RSpec::Base + # Check for offenses + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/remove_const.rb#31 + def on_send(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/remove_const.rb#26 + def remove_const(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/remove_const.rb#21 +RuboCop::Cop::RSpec::RemoveConst::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/remove_const.rb#23 +RuboCop::Cop::RSpec::RemoveConst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Check for repeated description strings in example groups. +# +# @example +# # bad +# RSpec.describe User do +# it 'is valid' do +# # ... +# end +# +# it 'is valid' do +# # ... +# end +# end +# +# # good +# RSpec.describe User do +# it 'is valid when first and last name are present' do +# # ... +# end +# +# it 'is valid when last name only is present' do +# # ... +# end +# end +# +# # good +# RSpec.describe User do +# it 'is valid' do +# # ... +# end +# +# it 'is valid', :flag do +# # ... +# end +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_description.rb#42 +class RuboCop::Cop::RSpec::RepeatedDescription < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_description.rb#45 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_description.rb#88 + def example_signature(example); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_description.rb#92 + def its_signature(example); end + + # Select examples in the current scope with repeated description strings + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_description.rb#60 + def repeated_descriptions(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_description.rb#74 + def repeated_its(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_description.rb#43 +RuboCop::Cop::RSpec::RepeatedDescription::MSG = T.let(T.unsafe(nil), String) + +# Check for repeated examples within example groups. +# +# @example +# +# it 'is valid' do +# expect(user).to be_valid +# end +# +# it 'validates the user' do +# expect(user).to be_valid +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example.rb#18 +class RuboCop::Cop::RSpec::RepeatedExample < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example.rb#21 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example.rb#41 + def example_signature(example); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example.rb#31 + def repeated_examples(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example.rb#19 +RuboCop::Cop::RSpec::RepeatedExample::MSG = T.let(T.unsafe(nil), String) + +# Check for repeated describe and context block body. +# +# @example +# # bad +# describe 'cool feature x' do +# it { cool_predicate } +# end +# +# describe 'cool feature y' do +# it { cool_predicate } +# end +# +# # good +# describe 'cool feature' do +# it { cool_predicate } +# end +# +# describe 'another cool feature' do +# it { another_predicate } +# end +# +# # good +# context 'when case x', :tag do +# it { cool_predicate } +# end +# +# context 'when case y' do +# it { cool_predicate } +# end +# +# # good +# context Array do +# it { is_expected.to respond_to :each } +# end +# +# context Hash do +# it { is_expected.to respond_to :each } +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#45 +class RuboCop::Cop::RSpec::RepeatedExampleGroupBody < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::SkipOrPending + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#59 + def body(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#62 + def const_arg(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#56 + def metadata(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#64 + def on_begin(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#51 + def several_example_groups?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#85 + def add_repeated_lines(groups); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#94 + def message(group, repeats); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#74 + def repeated_group_bodies(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#90 + def signature_keys(group); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_body.rb#48 +RuboCop::Cop::RSpec::RepeatedExampleGroupBody::MSG = T.let(T.unsafe(nil), String) + +# Check for repeated example group descriptions. +# +# @example +# # bad +# describe 'cool feature' do +# # example group +# end +# +# describe 'cool feature' do +# # example group +# end +# +# # bad +# context 'when case x' do +# # example group +# end +# +# describe 'when case x' do +# # example group +# end +# +# # good +# describe 'cool feature' do +# # example group +# end +# +# describe 'another cool feature' do +# # example group +# end +# +# # good +# context 'when case x' do +# # example group +# end +# +# context 'when another case' do +# # example group +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#45 +class RuboCop::Cop::RSpec::RepeatedExampleGroupDescription < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::SkipOrPending + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#56 + def doc_string_and_metadata(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#61 + def empty_description?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#63 + def on_begin(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#51 + def several_example_groups?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#85 + def add_repeated_lines(groups); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#90 + def message(group, repeats); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#73 + def repeated_group_descriptions(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_example_group_description.rb#48 +RuboCop::Cop::RSpec::RepeatedExampleGroupDescription::MSG = T.let(T.unsafe(nil), String) + +# Check for repeated include of shared examples. +# +# @example +# # bad +# describe 'foo' do +# include_examples 'cool stuff' +# include_examples 'cool stuff' +# end +# +# # bad +# describe 'foo' do +# it_behaves_like 'a cool', 'thing' +# it_behaves_like 'a cool', 'thing' +# end +# +# # bad +# context 'foo' do +# it_should_behave_like 'a duck' +# it_should_behave_like 'a duck' +# end +# +# # good +# describe 'foo' do +# include_examples 'cool stuff' +# end +# +# describe 'bar' do +# include_examples 'cool stuff' +# end +# +# # good +# describe 'foo' do +# it_behaves_like 'a cool', 'thing' +# it_behaves_like 'a cool', 'person' +# end +# +# # good +# context 'foo' do +# it_should_behave_like 'a duck' +# it_should_behave_like 'a goose' +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#48 +class RuboCop::Cop::RSpec::RepeatedIncludeExample < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#58 + def include_examples?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#65 + def on_begin(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#53 + def several_include_examples?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#62 + def shared_examples_name(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#90 + def add_repeated_lines(items); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#85 + def literal_include_examples?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#99 + def message(item, repeats); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#75 + def repeated_include_examples(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#95 + def signature_keys(item); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#49 +RuboCop::Cop::RSpec::RepeatedIncludeExample::MSG = T.let(T.unsafe(nil), String) + +# Checks for repeated calls to subject missing that it is memoized. +# +# @example +# # bad +# it do +# subject +# expect { subject }.to not_change { A.count } +# end +# +# it do +# expect { subject }.to change { A.count } +# expect { subject }.to not_change { A.count } +# end +# +# # good +# it do +# expect { my_method }.to change { A.count } +# expect { my_method }.to not_change { A.count } +# end +# +# # also good +# it do +# expect { subject.a }.to change { A.count } +# expect { subject.b }.to not_change { A.count } +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#32 +class RuboCop::Cop::RSpec::RepeatedSubjectCall < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::TopLevelGroup + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#65 + def on_top_level_group(node); end + + # Find a named or unnamed subject definition + # + # @example anonymous subject + # subject?(parse('subject { foo }').ast) do |name| + # name # => :subject + # end + # @example named subject + # subject?(parse('subject(:thing) { foo }').ast) do |name| + # name # => :thing + # end + # @param node [RuboCop::AST::Node] + # @yield [Symbol] subject name + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#53 + def subject?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#61 + def subject_calls(param0, param1); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#73 + def detect_offense(subject_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#85 + def detect_offenses_in_block(node, subject_names = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#97 + def detect_offenses_in_example(node, subject_names); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#111 + def detect_subjects_in_scope(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#81 + def expect_block(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#35 +RuboCop::Cop::RSpec::RepeatedSubjectCall::MSG = T.let(T.unsafe(nil), String) + +# Checks for consistent style of stub's return setting. +# +# Enforces either `and_return` or block-style return in the cases +# where the returned value is constant. Ignores dynamic returned values +# are the result would be different +# +# This cop can be configured using the `EnforcedStyle` option +# +# @example `EnforcedStyle: and_return` (default) +# # bad +# allow(Foo).to receive(:bar) { "baz" } +# expect(Foo).to receive(:bar) { "baz" } +# +# # good +# allow(Foo).to receive(:bar).and_return("baz") +# expect(Foo).to receive(:bar).and_return("baz") +# # also good as the returned value is dynamic +# allow(Foo).to receive(:bar) { bar.baz } +# @example `EnforcedStyle: block` +# # bad +# allow(Foo).to receive(:bar).and_return("baz") +# expect(Foo).to receive(:bar).and_return("baz") +# +# # good +# allow(Foo).to receive(:bar) { "baz" } +# expect(Foo).to receive(:bar) { "baz" } +# # also good as the returned value is dynamic +# allow(Foo).to receive(:bar).and_return(bar.baz) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#36 +class RuboCop::Cop::RSpec::ReturnFromStub < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#51 + def and_return_value(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#45 + def contains_stub?(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#62 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#55 + def on_send(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#48 + def stub_with_block?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#71 + def check_and_return_call(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#81 + def check_block_body(block); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#90 + def dynamic?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#95 +class RuboCop::Cop::RSpec::ReturnFromStub::AndReturnCallCorrector + # @return [AndReturnCallCorrector] a new instance of AndReturnCallCorrector + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#96 + def initialize(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#102 + def call(corrector); end + + private + + # Returns the value of attribute arg. + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#111 + def arg; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#133 + def hash_without_braces?; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#113 + def heredoc?; end + + # Returns the value of attribute node. + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#111 + def node; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#117 + def range; end + + # Returns the value of attribute receiver. + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#111 + def receiver; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#125 + def replacement; end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#139 +class RuboCop::Cop::RSpec::ReturnFromStub::BlockBodyCorrector + # @return [BlockBodyCorrector] a new instance of BlockBodyCorrector + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#140 + def initialize(block); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#146 + def call(corrector); end + + private + + # Returns the value of attribute block. + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#158 + def block; end + + # Returns the value of attribute body. + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#158 + def body; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#160 + def heredoc?; end + + # Returns the value of attribute node. + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#158 + def node; end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#164 +RuboCop::Cop::RSpec::ReturnFromStub::BlockBodyCorrector::NULL_BLOCK_BODY = T.let(T.unsafe(nil), T.untyped) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#40 +RuboCop::Cop::RSpec::ReturnFromStub::MSG_AND_RETURN = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#41 +RuboCop::Cop::RSpec::ReturnFromStub::MSG_BLOCK = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/return_from_stub.rb#42 +RuboCop::Cop::RSpec::ReturnFromStub::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for let scattered across the example group. +# +# Group lets together +# +# @example +# # bad +# describe Foo do +# let(:foo) { 1 } +# subject { Foo } +# let(:bar) { 2 } +# before { prepare } +# let!(:baz) { 3 } +# end +# +# # good +# describe Foo do +# subject { Foo } +# before { prepare } +# let(:foo) { 1 } +# let(:bar) { 2 } +# let!(:baz) { 3 } +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_let.rb#29 +class RuboCop::Cop::RSpec::ScatteredLet < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_let.rb#34 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_let.rb#42 + def check_let_declarations(body); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_let.rb#32 +RuboCop::Cop::RSpec::ScatteredLet::MSG = T.let(T.unsafe(nil), String) + +# Checks for setup scattered across multiple hooks in an example group. +# +# Unify `before`, `after`, and `around` hooks when possible. +# +# @example +# # bad +# describe Foo do +# before { setup1 } +# before { setup2 } +# end +# +# # good +# describe Foo do +# before do +# setup1 +# setup2 +# end +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#25 +class RuboCop::Cop::RSpec::ScatteredSetup < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#33 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#76 + def autocorrect(corrector, first_occurrence, occurrence); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#61 + def lines_msg(numbers); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#69 + def message(occurrences, occurrence); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#48 + def repeated_hooks(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#30 +RuboCop::Cop::RSpec::ScatteredSetup::MSG = T.let(T.unsafe(nil), String) + +# Checks for proper shared_context and shared_examples usage. +# +# If there are no examples defined, use shared_context. +# If there is no setup defined, use shared_examples. +# +# @example +# # bad +# RSpec.shared_context 'only examples here' do +# it 'does x' do +# end +# +# it 'does y' do +# end +# end +# +# # good +# RSpec.shared_examples 'only examples here' do +# it 'does x' do +# end +# +# it 'does y' do +# end +# end +# @example +# # bad +# RSpec.shared_examples 'only setup here' do +# subject(:foo) { :bar } +# +# let(:baz) { :bazz } +# +# before do +# something +# end +# end +# +# # good +# RSpec.shared_context 'only setup here' do +# subject(:foo) { :bar } +# +# let(:baz) { :bazz } +# +# before do +# something +# end +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#53 +class RuboCop::Cop::RSpec::SharedContext < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#65 + def context?(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#60 + def examples?(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#81 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#72 + def shared_context(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#77 + def shared_example(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#97 + def context_with_only_examples(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#101 + def examples_with_only_context(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#57 +RuboCop::Cop::RSpec::SharedContext::MSG_CONTEXT = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#56 +RuboCop::Cop::RSpec::SharedContext::MSG_EXAMPLES = T.let(T.unsafe(nil), String) + +# Checks for consistent style for shared example names. +# +# Enforces either `string` or `symbol` for shared example names. +# +# This cop can be configured using the `EnforcedStyle` option +# +# @example `EnforcedStyle: string` (default) +# # bad +# it_behaves_like :foo_bar_baz +# it_should_behave_like :foo_bar_baz +# shared_examples :foo_bar_baz +# shared_examples_for :foo_bar_baz +# include_examples :foo_bar_baz +# +# # good +# it_behaves_like 'foo bar baz' +# it_should_behave_like 'foo bar baz' +# shared_examples 'foo bar baz' +# shared_examples_for 'foo bar baz' +# include_examples 'foo bar baz' +# @example `EnforcedStyle: symbol` +# # bad +# it_behaves_like 'foo bar baz' +# it_should_behave_like 'foo bar baz' +# shared_examples 'foo bar baz' +# shared_examples_for 'foo bar baz' +# include_examples 'foo bar baz' +# +# # good +# it_behaves_like :foo_bar_baz +# it_should_behave_like :foo_bar_baz +# shared_examples :foo_bar_baz +# shared_examples_for :foo_bar_baz +# include_examples :foo_bar_baz +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#42 +class RuboCop::Cop::RSpec::SharedExamples < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#54 + def on_send(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#47 + def shared_examples(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#75 + def new_checker(ast_node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#67 + def offense?(ast_node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#104 +class RuboCop::Cop::RSpec::SharedExamples::StringChecker + # @return [StringChecker] a new instance of StringChecker + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#110 + def initialize(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#114 + def message; end + + # Returns the value of attribute node. + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#108 + def node; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#118 + def preferred_style; end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#105 +RuboCop::Cop::RSpec::SharedExamples::StringChecker::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#84 +class RuboCop::Cop::RSpec::SharedExamples::SymbolChecker + # @return [SymbolChecker] a new instance of SymbolChecker + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#90 + def initialize(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#94 + def message; end + + # Returns the value of attribute node. + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#88 + def node; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#98 + def preferred_style; end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#85 +RuboCop::Cop::RSpec::SharedExamples::SymbolChecker::MSG = T.let(T.unsafe(nil), String) + +# Checks that chains of messages contain more than one element. +# +# @example +# # bad +# allow(foo).to receive_message_chain(:bar).and_return(42) +# +# # good +# allow(foo).to receive(:bar).and_return(42) +# +# # also good +# allow(foo).to receive(:bar, :baz) +# allow(foo).to receive("bar.baz") +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#19 +class RuboCop::Cop::RSpec::SingleArgumentMessageChain < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#27 + def message_chain(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#34 + def on_send(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#32 + def single_key_hash?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#49 + def autocorrect(corrector, node, method, arg); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#77 + def autocorrect_array_arg(corrector, arg); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#69 + def autocorrect_hash_arg(corrector, arg); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#83 + def key_to_arg(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#87 + def replacement(method); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#65 + def single_element_array?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#55 + def valid_usage?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#22 +RuboCop::Cop::RSpec::SingleArgumentMessageChain::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#24 +RuboCop::Cop::RSpec::SingleArgumentMessageChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for passing a block to `skip` within examples. +# +# @example +# # bad +# it 'does something' do +# skip 'not yet implemented' do +# do_something +# end +# end +# +# # good +# it 'does something' do +# skip 'not yet implemented' +# do_something +# end +# +# # good - when outside example +# skip 'not yet implemented' do +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/skip_block_inside_example.rb#26 +class RuboCop::Cop::RSpec::SkipBlockInsideExample < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/skip_block_inside_example.rb#29 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/skip_block_inside_example.rb#29 + def on_numblock(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/skip_block_inside_example.rb#40 + def inside_example?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/skip_block_inside_example.rb#27 +RuboCop::Cop::RSpec::SkipBlockInsideExample::MSG = T.let(T.unsafe(nil), String) + +# Helps check offenses with variable definitions +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/skip_or_pending.rb#7 +module RuboCop::Cop::RSpec::SkipOrPending + extend ::RuboCop::AST::NodePattern::Macros + + # Match skip/pending statements inside a block (e.g. `context`) + # + # @example source that matches + # context 'when color is blue' do + # skip 'not implemented yet' + # pending 'not implemented yet' + # end + # @example source that does not match + # skip 'not implemented yet' + # pending 'not implemented yet' + # @param node [RuboCop::AST::Node] + # @return [Array] matching nodes + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/skip_or_pending.rb#33 + def skip_or_pending_inside_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/skip_or_pending.rb#11 + def skipped_in_metadata?(param0 = T.unsafe(nil)); end +end + +# Sort RSpec metadata alphabetically. +# +# @example +# # bad +# describe 'Something', :b, :a +# context 'Something', foo: 'bar', baz: true +# it 'works', :b, :a, foo: 'bar', baz: true +# +# # good +# describe 'Something', :a, :b +# context 'Something', baz: true, foo: 'bar' +# it 'works', :a, :b, baz: true, foo: 'bar' +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#19 +class RuboCop::Cop::RSpec::SortMetadata < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::Metadata + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#26 + def on_metadata(symbols, hash); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#38 + def crime_scene(symbols, pairs); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#47 + def replacement(symbols, pairs); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#55 + def sort_pairs(pairs); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#59 + def sort_symbols(symbols); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#51 + def sorted?(symbols, pairs); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/sort_metadata.rb#24 +RuboCop::Cop::RSpec::SortMetadata::MSG = T.let(T.unsafe(nil), String) + +# Checks that spec file paths are consistent and well-formed. +# +# @example +# # bad +# whatever_spec.rb # describe MyClass +# my_class_spec.rb # describe MyClass, '#method' +# +# # good +# my_class_spec.rb # describe MyClass +# my_class_method_spec.rb # describe MyClass, '#method' +# my_class/method_spec.rb # describe MyClass, '#method' +# @example `CustomTransform: {RuboCop=>rubocop, RSpec=>rspec}` (default) +# # good +# rubocop_spec.rb # describe RuboCop +# rspec_spec.rb # describe RSpec +# @example `IgnoreMethods: false` (default) +# # bad +# my_class_spec.rb # describe MyClass, '#method' +# @example `IgnoreMethods: true` +# # good +# my_class_spec.rb # describe MyClass, '#method' +# @example `IgnoreMetadata: {type=>routing}` (default) +# # good +# whatever_spec.rb # describe MyClass, type: :routing do; end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#35 +class RuboCop::Cop::RSpec::SpecFilePathFormat < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::TopLevelGroup + include ::RuboCop::Cop::RSpec::Namespace + include ::RuboCop::Cop::RSpec::FileHelp + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#43 + def example_group_arguments(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#48 + def metadata_key_value(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#50 + def on_top_level_example_group(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#108 + def camel_to_snake_case(string); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#81 + def correct_path_pattern(class_name, arguments); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#115 + def custom_transform; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#62 + def ensure_correct_file_path(send_node, class_name, arguments); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#98 + def expected_path(constant); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#127 + def filename_ends_with?(pattern); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#94 + def ignore?(method_name); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#123 + def ignore_metadata; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#73 + def ignore_metadata?(arguments); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#119 + def ignore_methods?; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#88 + def name_pattern(method_name); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_format.rb#40 +RuboCop::Cop::RSpec::SpecFilePathFormat::MSG = T.let(T.unsafe(nil), String) + +# Checks that spec file paths suffix are consistent and well-formed. +# +# @example +# # bad +# my_class/foo_specorb.rb # describe MyClass +# spec/models/user.rb # describe User +# spec/models/user_specxrb # describe User +# +# # good +# my_class_spec.rb # describe MyClass +# +# # good - shared examples are allowed +# spec/models/user.rb # shared_examples_for 'foo' +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_suffix.rb#20 +class RuboCop::Cop::RSpec::SpecFilePathSuffix < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::TopLevelGroup + include ::RuboCop::Cop::RSpec::FileHelp + + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_suffix.rb#26 + def on_top_level_example_group(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_suffix.rb#34 + def correct_path?; end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_suffix.rb#24 +RuboCop::Cop::RSpec::SpecFilePathSuffix::MSG = T.let(T.unsafe(nil), String) + +# Checks that message expectations do not have a configured response. +# +# @example +# # bad +# expect(foo).to receive(:bar).with(42).and_return("hello world") +# +# # good (without spies) +# allow(foo).to receive(:bar).with(42).and_return("hello world") +# expect(foo).to receive(:bar).with(42) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#16 +class RuboCop::Cop::RSpec::StubbedMock < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#42 + def configured_response?(param0 = T.unsafe(nil)); end + + # Match expectation + # + # @example source that matches + # is_expected.to be_in_the_bar + # @example source that matches + # expect(cocktail).to contain_exactly(:fresh_orange_juice, :campari) + # @example source that matches + # expect_any_instance_of(Officer).to be_alert + # @param node [RuboCop::AST::Node] + # @yield [RuboCop::AST::Node] expectation, method name, matcher + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#61 + def expectation(param0 = T.unsafe(nil)); end + + # Match matcher with a configured response in block-pass + # + # @example source that matches + # receive(:foo, &canned) + # @example source that matches + # receive_message_chain(:foo, :bar, &canned) + # @example source that matches + # receive(:foo).with('bar', &canned) + # @param node [RuboCop::AST::Node] + # @yield [RuboCop::AST::Node] matcher + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#129 + def matcher_with_blockpass(param0 = T.unsafe(nil)); end + + # Match matcher with a configured response + # + # @example source that matches + # receive(:foo).and_return('bar') + # @example source that matches + # receive(:lower).and_raise(SomeError) + # @example source that matches + # receive(:redirect).and_call_original + # @param node [RuboCop::AST::Node] + # @yield [RuboCop::AST::Node] matcher + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#81 + def matcher_with_configured_response(param0 = T.unsafe(nil)); end + + # Match matcher with a configured response defined as a hash + # + # @example source that matches + # receive_messages(foo: 'bar', baz: 'qux') + # @example source that matches + # receive_message_chain(:foo, bar: 'baz') + # @param node [RuboCop::AST::Node] + # @yield [RuboCop::AST::Node] matcher + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#108 + def matcher_with_hash(param0 = T.unsafe(nil)); end + + # Match matcher with a return block + # + # @example source that matches + # receive(:foo) { 'bar' } + # @param node [RuboCop::AST::Node] + # @yield [RuboCop::AST::Node] matcher + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#93 + def matcher_with_return_block(param0 = T.unsafe(nil)); end + + # Match message expectation matcher + # + # @example source that matches + # receive(:foo) + # @example source that matches + # receive_message_chain(:foo, :bar) + # @example source that matches + # receive(:foo).with('bar') + # @param node [RuboCop::AST::Node] + # @return [Array] matching nodes + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#34 + def message_expectation?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#138 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#157 + def msg(method_name); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#146 + def on_expectation(expectation, method_name, matcher); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#163 + def replacement(method_name); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#17 +RuboCop::Cop::RSpec::StubbedMock::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#136 +RuboCop::Cop::RSpec::StubbedMock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Ensure that subject is defined using subject helper. +# +# @example +# # bad +# let(:subject) { foo } +# let!(:subject) { foo } +# subject(:subject) { foo } +# subject!(:subject) { foo } +# +# # bad +# block = -> {} +# let(:subject, &block) +# +# # good +# subject(:test_subject) { foo } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/subject_declaration.rb#22 +class RuboCop::Cop::RSpec::SubjectDeclaration < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_declaration.rb#27 + def offensive_subject_declaration?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_declaration.rb#31 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_declaration.rb#40 + def message_for(offense); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/subject_declaration.rb#23 +RuboCop::Cop::RSpec::SubjectDeclaration::MSG_LET = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/subject_declaration.rb#24 +RuboCop::Cop::RSpec::SubjectDeclaration::MSG_REDUNDANT = T.let(T.unsafe(nil), String) + +# Checks for stubbed test subjects. +# +# Checks nested subject stubs for innermost subject definition +# when subject is also defined in parent example groups. +# +# @example +# # bad +# describe Article do +# subject(:article) { Article.new } +# +# it 'indicates that the author is unknown' do +# allow(article).to receive(:author).and_return(nil) +# expect(article.description).to include('by an unknown author') +# end +# end +# +# # bad +# describe Article do +# subject(:foo) { Article.new } +# +# context 'nested subject' do +# subject(:article) { Article.new } +# +# it 'indicates that the author is unknown' do +# allow(article).to receive(:author).and_return(nil) +# expect(article.description).to include('by an unknown author') +# end +# end +# end +# +# # good +# describe Article do +# subject(:article) { Article.new(author: nil) } +# +# it 'indicates that the author is unknown' do +# expect(article.description).to include('by an unknown author') +# end +# end +# @see https://robots.thoughtbot.com/don-t-stub-the-system-under-test +# @see https://penelope.zone/2015/12/27/introducing-rspec-smells-and-where-to-find-them.html#smell-1-stubjec +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#50 +class RuboCop::Cop::RSpec::SubjectStub < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::TopLevelGroup + + # Find a memoized helper + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#80 + def let?(param0 = T.unsafe(nil)); end + + # Match `allow` and `expect(...).to receive` + # + # @example source that matches + # allow(foo).to receive(:bar) + # allow(foo).to receive(:bar).with(1) + # allow(foo).to receive(:bar).with(1).and_return(2) + # expect(foo).to receive(:bar) + # expect(foo).to receive(:bar).with(1) + # expect(foo).to receive(:bar).with(1).and_return(2) + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#97 + def message_expectation?(param0 = T.unsafe(nil), param1); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#109 + def message_expectation_matcher?(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#115 + def on_top_level_group(node); end + + # Find a named or unnamed subject definition + # + # @example anonymous subject + # subject?(parse('subject { foo }').ast) do |name| + # name # => :subject + # end + # @example named subject + # subject?(parse('subject(:thing) { foo }').ast) do |name| + # name # => :thing + # end + # @param node [RuboCop::AST::Node] + # @yield [Symbol] subject name + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#71 + def subject?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#126 + def find_all_explicit(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#140 + def find_subject_expectations(node, subject_names = T.unsafe(nil), &block); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/subject_stub.rb#53 +RuboCop::Cop::RSpec::SubjectStub::MSG = T.let(T.unsafe(nil), String) + +# Helper methods for top level example group cops +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#7 +module RuboCop::Cop::RSpec::TopLevelGroup + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#10 + def on_new_investigation; end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#19 + def top_level_groups; end + + private + + # Dummy methods to be overridden in the consumer + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#27 + def on_top_level_example_group(_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#29 + def on_top_level_group(_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#48 + def root_node; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#31 + def top_level_group?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/top_level_group.rb#35 + def top_level_nodes(node); end +end + +# Description should be descriptive. +# +# If example group or example contains only `execute string`, numbers +# and regular expressions, the description is not clear. +# +# @example +# # bad +# describe `time` do +# # ... +# end +# +# # bad +# context /when foo/ do +# # ... +# end +# +# # bad +# it 10000 do +# # ... +# end +# +# # good +# describe Foo do +# # ... +# end +# +# # good +# describe '#foo' do +# # ... +# end +# +# # good +# context "when #{foo} is bar" do +# # ... +# end +# +# # good +# it 'does something' do +# # ... +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/undescriptive_literals_description.rb#47 +class RuboCop::Cop::RSpec::UndescriptiveLiteralsDescription < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/undescriptive_literals_description.rb#51 + def example_groups_or_example?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/undescriptive_literals_description.rb#55 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/undescriptive_literals_description.rb#63 + def offense?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/undescriptive_literals_description.rb#48 +RuboCop::Cop::RSpec::UndescriptiveLiteralsDescription::MSG = T.let(T.unsafe(nil), String) + +# Checks for a specified error in checking raised errors. +# +# Enforces one of an Exception type, a string, or a regular +# expression to match against the exception message as a parameter +# to `raise_error` +# +# @example +# # bad +# expect { +# raise StandardError.new('error') +# }.to raise_error +# +# # good +# expect { +# raise StandardError.new('error') +# }.to raise_error(StandardError) +# +# expect { +# raise StandardError.new('error') +# }.to raise_error('error') +# +# expect { +# raise StandardError.new('error') +# }.to raise_error(/err/) +# +# expect { do_something }.not_to raise_error +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#33 +class RuboCop::Cop::RSpec::UnspecifiedException < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#42 + def expect_to?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#46 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#54 + def empty_exception_matcher?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#64 + def find_expect_to(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#34 +RuboCop::Cop::RSpec::UnspecifiedException::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#36 +RuboCop::Cop::RSpec::UnspecifiedException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Helps check offenses with variable definitions +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/variable.rb#7 +module RuboCop::Cop::RSpec::Variable + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/variable.rb#14 + def variable_definition?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/variable.rb#11 +RuboCop::Cop::RSpec::Variable::Helpers = RuboCop::RSpec::Language::Helpers + +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/variable.rb#10 +RuboCop::Cop::RSpec::Variable::Subjects = RuboCop::RSpec::Language::Subjects + +# Checks that memoized helpers names are symbols or strings. +# +# @example EnforcedStyle: symbols (default) +# # bad +# subject('user') { create_user } +# let('user_name') { 'Adam' } +# +# # good +# subject(:user) { create_user } +# let(:user_name) { 'Adam' } +# @example EnforcedStyle: strings +# # bad +# subject(:user) { create_user } +# let(:user_name) { 'Adam' } +# +# # good +# subject('user') { create_user } +# let('user_name') { 'Adam' } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/variable_definition.rb#26 +class RuboCop::Cop::RSpec::VariableDefinition < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RSpec::Variable + include ::RuboCop::Cop::RSpec::InsideExampleGroup + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/variable_definition.rb#34 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/variable_definition.rb#51 + def correct_variable(variable); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/variable_definition.rb#67 + def string?(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/variable_definition.rb#62 + def style_offense?(variable); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/variable_definition.rb#71 + def symbol?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/variable_definition.rb#32 +RuboCop::Cop::RSpec::VariableDefinition::MSG = T.let(T.unsafe(nil), String) + +# Checks that memoized helper names use the configured style. +# +# Variables can be excluded from checking using the `AllowedPatterns` +# option. +# +# @example EnforcedStyle: snake_case (default) +# # bad +# subject(:userName1) { 'Adam' } +# let(:userName2) { 'Adam' } +# +# # good +# subject(:user_name_1) { 'Adam' } +# let(:user_name_2) { 'Adam' } +# @example EnforcedStyle: camelCase +# # bad +# subject(:user_name_1) { 'Adam' } +# let(:user_name_2) { 'Adam' } +# +# # good +# subject(:userName1) { 'Adam' } +# let(:userName2) { 'Adam' } +# @example AllowedPatterns configuration +# # rubocop.yml +# # RSpec/VariableName: +# # EnforcedStyle: snake_case +# # AllowedPatterns: +# # - ^userFood +# @example +# # okay because it matches the `^userFood` regex in `AllowedPatterns` +# subject(:userFood_1) { 'spaghetti' } +# let(:userFood_2) { 'fettuccine' } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/variable_name.rb#41 +class RuboCop::Cop::RSpec::VariableName < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::ConfigurableFormatting + include ::RuboCop::Cop::ConfigurableNaming + include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RSpec::Variable + include ::RuboCop::Cop::RSpec::InsideExampleGroup + + # source://rubocop-rspec//lib/rubocop/cop/rspec/variable_name.rb#49 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/variable_name.rb#62 + def message(style); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/variable_name.rb#47 +RuboCop::Cop::RSpec::VariableName::MSG = T.let(T.unsafe(nil), String) + +# Checks for consistent verified double reference style. +# +# Only investigates references that are one of the supported styles. +# +# This cop can be configured in your configuration using the +# `EnforcedStyle` option and supports `--auto-gen-config`. +# +# @example `EnforcedStyle: constant` (default) +# # bad +# let(:foo) do +# instance_double('ClassName', method_name: 'returned_value') +# end +# +# # good +# let(:foo) do +# instance_double(ClassName, method_name: 'returned_value') +# end +# @example `EnforcedStyle: string` +# # bad +# let(:foo) do +# instance_double(ClassName, method_name: 'returned_value') +# end +# +# # good +# let(:foo) do +# instance_double('ClassName', method_name: 'returned_value') +# end +# @example Reference is not in the supported style list. No enforcement +# +# # good +# let(:foo) do +# instance_double(@klass, method_name: 'returned_value') +# end +# @see https://rspec.info/features/3-12/rspec-mocks/verifying-doubles +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#43 +class RuboCop::Cop::RSpec::VerifiedDoubleReference < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#74 + def on_send(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#66 + def verified_double(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#101 + def correct_style(offense); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#92 + def opposing_style?(class_reference); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#47 +RuboCop::Cop::RSpec::VerifiedDoubleReference::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#60 +RuboCop::Cop::RSpec::VerifiedDoubleReference::REFERENCE_TYPE_STYLES = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_double_reference.rb#49 +RuboCop::Cop::RSpec::VerifiedDoubleReference::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# Prefer using verifying doubles over normal doubles. +# +# @example +# # bad +# let(:foo) do +# double(method_name: 'returned value') +# end +# +# # bad +# let(:foo) do +# double("ClassName", method_name: 'returned value') +# end +# +# # good +# let(:foo) do +# instance_double("ClassName", method_name: 'returned value') +# end +# @see https://rspec.info/features/3-12/rspec-mocks/verifying-doubles +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_doubles.rb#26 +class RuboCop::Cop::RSpec::VerifiedDoubles < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_doubles.rb#35 + def on_send(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_doubles.rb#31 + def unverified_double(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/verified_doubles.rb#46 + def symbol?(name); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_doubles.rb#27 +RuboCop::Cop::RSpec::VerifiedDoubles::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/verified_doubles.rb#28 +RuboCop::Cop::RSpec::VerifiedDoubles::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks void `expect()`. +# +# @example +# # bad +# expect(something) +# +# # good +# expect(something).to be(1) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#15 +class RuboCop::Cop::RSpec::VoidExpect < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#21 + def expect?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#26 + def expect_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#36 + def on_block(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#30 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#44 + def check_expect(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#50 + def void?(expect); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#16 +RuboCop::Cop::RSpec::VoidExpect::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/void_expect.rb#18 +RuboCop::Cop::RSpec::VoidExpect::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks for calling a block within a stub. +# +# @example +# # bad +# allow(foo).to receive(:bar) { |&block| block.call(1) } +# +# # good +# expect(foo).to receive(:bar).and_yield(1) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#15 +class RuboCop::Cop::RSpec::Yield < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#25 + def block_arg(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#28 + def block_call?(param0 = T.unsafe(nil), param1); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#22 + def method_on_stub?(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#30 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#46 + def autocorrect(corrector, node, range); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#61 + def block_range(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#53 + def calling_block?(node, block); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#73 + def convert_block_to_yield(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#65 + def generate_replacement(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#19 +RuboCop::Cop::RSpec::Yield::MSG = T.let(T.unsafe(nil), String) + +# RuboCop RSpec project namespace +# +# source://rubocop-rspec//lib/rubocop/rspec.rb#5 +module RuboCop::RSpec; end + +# Shared behavior for aligning braces for single line lets +# +# source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#6 +class RuboCop::RSpec::AlignLetBrace + include ::RuboCop::RSpec::Language + include ::RuboCop::PathUtil + include ::RuboCop::Cop::Util + + # @return [AlignLetBrace] a new instance of AlignLetBrace + # + # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#10 + def initialize(root, token); end + + # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#21 + def indent_for(node); end + + # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#15 + def offending_tokens; end + + private + + # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#43 + def adjacent_let_chunks; end + + # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#35 + def let_group_for(let); end + + # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#27 + def let_token(node); end + + # Returns the value of attribute root. + # + # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#60 + def root; end + + # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#53 + def single_line_lets; end + + # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#31 + def target_column_for(let); end + + # Returns the value of attribute token. + # + # source://rubocop-rspec//lib/rubocop/rspec/align_let_brace.rb#60 + 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 +class RuboCop::RSpec::Concept + include ::RuboCop::RSpec::Language + extend ::RuboCop::AST::NodePattern::Macros + + # @return [Concept] a new instance of Concept + # + # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#10 + def initialize(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#14 + def ==(other); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#14 + def eql?(other); end + + # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#20 + def hash; end + + # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#24 + def to_node; end + + protected + + # Returns the value of attribute node. + # + # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#30 + def node; end +end + +# source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#5 +module RuboCop::RSpec::Corrector; end + +# Helper methods to move a node +# +# source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#7 +class RuboCop::RSpec::Corrector::MoveNode + include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::RSpec::FinalEndLocation + include ::RuboCop::Cop::RSpec::CommentsHelp + + # @return [MoveNode] a new instance of MoveNode + # + # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#14 + def initialize(node, corrector, processed_source); end + + # Returns the value of attribute corrector. + # + # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#12 + def corrector; end + + # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#27 + def move_after(other); end + + # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#20 + def move_before(other); end + + # Returns the value of attribute original. + # + # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#12 + def original; end + + # Returns the value of attribute processed_source. + # + # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#12 + def processed_source; end + + private + + # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#40 + def node_range(node); end + + # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#44 + def node_range_with_surrounding_space(node); end + + # source://rubocop-rspec//lib/rubocop/rspec/corrector/move_node.rb#36 + def source(node); end +end + +# Wrapper for RSpec examples +# +# source://rubocop-rspec//lib/rubocop/rspec/example.rb#6 +class RuboCop::RSpec::Example < ::RuboCop::RSpec::Concept + # source://rubocop-rspec//lib/rubocop/rspec/example.rb#28 + def definition; end + + # source://rubocop-rspec//lib/rubocop/rspec/example.rb#16 + def doc_string; end + + # source://rubocop-rspec//lib/rubocop/rspec/example.rb#8 + def extract_doc_string(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/rspec/example.rb#14 + def extract_implementation(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/rspec/example.rb#11 + def extract_metadata(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/rspec/example.rb#24 + def implementation; end + + # source://rubocop-rspec//lib/rubocop/rspec/example.rb#20 + def metadata; end +end + +# Wrapper for RSpec example groups +# +# source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#6 +class RuboCop::RSpec::ExampleGroup < ::RuboCop::RSpec::Concept + # source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#28 + def examples; end + + # source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#34 + def hooks; end + + # source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#20 + def lets; end + + # Detect if the node is an example group or shared example + # + # Selectors which indicate that we should stop searching + # + # source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#13 + def scope_change?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#24 + def subjects; end + + private + + # source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#56 + def find_all(node, predicate); end + + # Recursively search for predicate within the current scope + # + # Searches node and halts when a scope change is detected + # + # @param node [RuboCop::AST::Node] node to recursively search + # @param predicate [Symbol] method to call with node as argument + # @return [Array] discovered nodes + # + # source://rubocop-rspec//lib/rubocop/rspec/example_group.rb#50 + def find_all_in_scope(node, predicate); end +end + +# Wrapper for RSpec hook +# +# source://rubocop-rspec//lib/rubocop/rspec/hook.rb#6 +class RuboCop::RSpec::Hook < ::RuboCop::RSpec::Concept + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#24 + def example?; end + + # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#8 + def extract_metadata(param0 = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#18 + def knowable_scope?; end + + # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#38 + def metadata; end + + # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#14 + def name; end + + # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#28 + def scope; end + + private + + # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#74 + def scope_argument; end + + # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#70 + def scope_name; end + + # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#51 + def transform_metadata(meta); end + + # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#66 + def transform_true(node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/rspec/hook.rb#47 + 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. +# example groups and hooks. It is possible to configure RuboCop RSpec to +# be able to properly detect these elements in the `RSpec/Language` section +# of the RuboCop YAML configuration file. +# +# In addition to providing useful matchers, this class is responsible for +# using the configured aliases. +# +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#14 +module RuboCop::RSpec::Language + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#49 + def example?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#28 + def example_group?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#44 + def example_group_with_body?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#25 + def explicit_rspec?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#52 + def hook?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#68 + def include?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#60 + def let?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#22 + def rspec?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#33 + def shared_group?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#37 + def spec_group?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#76 + def subject?(param0 = T.unsafe(nil)); end + + class << self + # Returns the value of attribute config. + # + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#18 + def config; end + + # Sets the attribute config + # + # @param value the value to set the attribute config to. + # + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#18 + def config=(_arg0); end + end +end + +# This is used in Dialect and DescribeClass cops to detect RSpec blocks. +# +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#204 +module RuboCop::RSpec::Language::ALL + class << self + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#205 + def all(element); end + end +end + +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#78 +module RuboCop::RSpec::Language::ExampleGroups + class << self + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#80 + def all(element); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#90 + def focused(element); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#86 + def regular(element); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#94 + def skipped(element); end + end +end + +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#100 +module RuboCop::RSpec::Language::Examples + class << self + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#102 + def all(element); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#113 + def focused(element); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#121 + def pending(element); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#109 + def regular(element); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#117 + def skipped(element); end + end +end + +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#127 +module RuboCop::RSpec::Language::Expectations + class << self + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#128 + def all(element); end + end +end + +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#133 +module RuboCop::RSpec::Language::Helpers + class << self + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#134 + def all(element); end + end +end + +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#145 +module RuboCop::RSpec::Language::HookScopes + class << self + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#147 + def all(element); end + end +end + +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#146 +RuboCop::RSpec::Language::HookScopes::ALL = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#139 +module RuboCop::RSpec::Language::Hooks + class << self + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#140 + def all(element); end + end +end + +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#152 +module RuboCop::RSpec::Language::Includes + class << self + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#154 + def all(element); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#163 + def context(element); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#159 + def examples(element); end + end +end + +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#169 +module RuboCop::RSpec::Language::Runners + class << self + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#172 + def all(element = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#170 +RuboCop::RSpec::Language::Runners::ALL = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#180 +module RuboCop::RSpec::Language::SharedGroups + class << self + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#182 + def all(element); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#191 + def context(element); end + + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#187 + def examples(element); end + end +end + +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#197 +module RuboCop::RSpec::Language::Subjects + class << self + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#198 + def all(element); end + end +end + +# RuboCop RSpec specific extensions of RuboCop::AST::Node +# +# source://rubocop-rspec//lib/rubocop/rspec/node.rb#6 +module RuboCop::RSpec::Node + # In various cops we want to regard const as literal although it's not + # strictly literal. + # + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/rspec/node.rb#9 + 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) + +# Version information for the RSpec RuboCop plugin. +# +# source://rubocop-rspec//lib/rubocop/rspec/version.rb#6 +module RuboCop::RSpec::Version; end + +# source://rubocop-rspec//lib/rubocop/rspec/version.rb#7 +RuboCop::RSpec::Version::STRING = T.let(T.unsafe(nil), String) + +# RSpec example wording rewriter +# +# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#6 +class RuboCop::RSpec::Wording + # @return [Wording] a new instance of 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 + def rewrite; end + + private + + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#80 + def append_suffix(word, suffix); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#65 + def ignored_word?(word); end + + # Returns the value of attribute ignores. + # + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#39 + def ignores; end + + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#51 + def remove_should_and_pluralize; end + + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#41 + def replace_prefix(pattern, replacement); end + + # Returns the value of attribute replacements. + # + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#39 + def replacements; end + + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#69 + def substitute(word); end + + # Returns the value of attribute text. + # + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#39 + def text; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#47 + def uppercase?(word); end +end + +# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#11 +RuboCop::RSpec::Wording::ES_SUFFIX_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#12 +RuboCop::RSpec::Wording::IES_SUFFIX_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#8 +RuboCop::RSpec::Wording::SHOULDNT_BE_PREFIX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#7 +RuboCop::RSpec::Wording::SHOULDNT_PREFIX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#9 +RuboCop::RSpec::Wording::WILL_NOT_PREFIX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#10 +RuboCop::RSpec::Wording::WONT_PREFIX = T.let(T.unsafe(nil), Regexp) From ada5e2d2199e23cc55ff8b3a174ed87f2496a722 Mon Sep 17 00:00:00 2001 From: Patrick Linnane Date: Wed, 2 Oct 2024 10:01:03 -0700 Subject: [PATCH 7/7] `brew style --fix` Signed-off-by: Patrick Linnane --- Library/Homebrew/extend/kernel.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/extend/kernel.rb b/Library/Homebrew/extend/kernel.rb index 7bf0c0d9da..2f2d9a6de1 100644 --- a/Library/Homebrew/extend/kernel.rb +++ b/Library/Homebrew/extend/kernel.rb @@ -156,7 +156,7 @@ module Kernel require "tap" - tap = Tap.fetch(match[:user], match[:repo]) + tap = Tap.fetch(match[:user], match[:repository]) tap_message = "\nPlease report this issue to the #{tap.full_name} tap" tap_message += " (not Homebrew/brew or Homebrew/homebrew-core)" unless tap.official? tap_message += ", or even better, submit a PR to fix it" if replacement