From 840db1db18ab449385ac91e9ec69494fdf3fd907 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Nov 2021 18:03:01 +0000 Subject: [PATCH 1/4] build(deps): bump rubocop from 1.22.0 to 1.23.0 in /Library/Homebrew Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.22.0 to 1.23.0. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.22.0...v1.23.0) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Library/Homebrew/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 8138799766..ddf410ab0b 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -124,7 +124,7 @@ GEM rspec (>= 3, < 4) rspec_junit_formatter (0.4.1) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.22.0) + rubocop (1.23.0) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) From 7e6c6fee33f2860b694c6783c502ed46addca5dd Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Mon, 15 Nov 2021 18:05:50 +0000 Subject: [PATCH 2/4] brew vendor-gems: commit updates. --- Library/Homebrew/vendor/bundle/bundler/setup.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index b44452a779..444703cced 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -86,7 +86,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec_junit_formatter $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.13.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.11.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-2.1.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.22.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.23.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.12.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.12.4/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.6.0/lib" From 68f1685b97a574559157eed389c5c7393babafaa Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Mon, 15 Nov 2021 18:11:04 +0000 Subject: [PATCH 3/4] Update RBI files for rubocop. --- ...{rubocop@1.22.0.rbi => rubocop@1.23.0.rbi} | 123 ++++++++++++++++-- .../sorbet/rbi/hidden-definitions/hidden.rbi | 10 ++ 2 files changed, 121 insertions(+), 12 deletions(-) rename Library/Homebrew/sorbet/rbi/gems/{rubocop@1.22.0.rbi => rubocop@1.23.0.rbi} (99%) diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.22.0.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.23.0.rbi similarity index 99% rename from Library/Homebrew/sorbet/rbi/gems/rubocop@1.22.0.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop@1.23.0.rbi index 8ba1c79139..2413336b52 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.22.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.23.0.rbi @@ -1,9 +1,9 @@ +# typed: true + # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `rubocop` gem. # Please instead update this file by running `bin/tapioca gem rubocop`. -# typed: true - module RuboCop; end class RuboCop::CLI @@ -1502,9 +1502,9 @@ module RuboCop::Cop::Gemspec; end class RuboCop::Cop::Gemspec::DateAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::GemspecHelp extend ::RuboCop::Cop::AutoCorrector - def gem_specification(param0 = T.unsafe(nil)); end def on_block(block_node); end end @@ -1512,9 +1512,9 @@ RuboCop::Cop::Gemspec::DateAssignment::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Gemspec::DuplicatedAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::GemspecHelp def assignment_method_declarations(param0); end - def gem_specification(param0); end def on_new_investigation; end private @@ -1542,24 +1542,48 @@ end RuboCop::Cop::Gemspec::OrderedDependencies::MSG = T.let(T.unsafe(nil), String) +class RuboCop::Cop::Gemspec::RequireMFA < ::RuboCop::Cop::Base + include ::RuboCop::Cop::GemspecHelp + extend ::RuboCop::Cop::AutoCorrector + + def metadata(param0 = T.unsafe(nil)); end + def on_block(node); end + def rubygems_mfa_required(param0); end + def true_string?(param0 = T.unsafe(nil)); end + + private + + def autocorrect(corrector, node, block_var, metadata); end + def change_value(corrector, value); end + def correct_metadata(corrector, metadata); end + def correct_missing_metadata(corrector, node, block_var); end + def mfa_value(metadata_value); end +end + +RuboCop::Cop::Gemspec::RequireMFA::MSG = T.let(T.unsafe(nil), String) + class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp def defined_ruby_version(param0 = T.unsafe(nil)); end def on_new_investigation; end - def required_ruby_version(param0); end + def on_send(node); end + def required_ruby_version?(param0); end private + def dynamic_version?(node); end def extract_ruby_version(required_ruby_version); end def not_equal_message(required_ruby_version, target_ruby_version); end end RuboCop::Cop::Gemspec::RequiredRubyVersion::MISSING_MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Gemspec::RequiredRubyVersion::NOT_EQUAL_MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Gemspec::RequiredRubyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage < ::RuboCop::Cop::Base - def gem_specification?(param0); end + include ::RuboCop::Cop::GemspecHelp + def on_const(node); end def ruby_version?(param0 = T.unsafe(nil)); end @@ -1570,6 +1594,13 @@ end RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage::MSG = T.let(T.unsafe(nil), String) +module RuboCop::Cop::GemspecHelp + extend ::RuboCop::AST::NodePattern::Macros + + def gem_specification(param0); end + def gem_specification?(param0 = T.unsafe(nil)); end +end + class RuboCop::Cop::Generator def initialize(name, output: T.unsafe(nil)); end @@ -2165,6 +2196,7 @@ class RuboCop::Cop::Layout::DotPosition < ::RuboCop::Cop::Base def ampersand_dot?(node); end def autocorrect(corrector, dot, node); end def correct_dot_position_style?(dot_line, selector_line); end + def end_range(node); end def heredoc?(node); end def last_heredoc_line(node); end def line_between?(first_line, second_line); end @@ -2499,7 +2531,7 @@ class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCo private - def check_body(node); end + def check_body(body, line_of_def_or_kwbegin); end def keyword_locations(node); end def keyword_locations_in_ensure(node); end def keyword_locations_in_rescue(node); end @@ -3675,6 +3707,7 @@ class RuboCop::Cop::Layout::SpaceInLambdaLiteral < ::RuboCop::Cop::Base private def arrow_lambda_with_args?(node); end + def lambda_arguments(node); end def range_of_offense(node); end def space_after_arrow(lambda_node); end def space_after_arrow?(lambda_node); end @@ -3804,7 +3837,6 @@ class RuboCop::Cop::Layout::SpaceInsideParens < ::RuboCop::Cop::Base def process_with_compact_style(tokens); end def process_with_space_style(tokens); end def right_parens?(token1, token2); end - def same_line?(token1, token2); end end RuboCop::Cop::Layout::SpaceInsideParens::MSG = T.let(T.unsafe(nil), String) @@ -5865,6 +5897,20 @@ end RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String) +class RuboCop::Cop::Lint::UselessRuby2Keywords < ::RuboCop::Cop::Base + def method_definition(param0 = T.unsafe(nil), param1); end + def on_send(node); end + + private + + def allowed_arguments(arguments); end + def inspect_def(node, def_node); end + def inspect_sym(node, sym_node); end +end + +RuboCop::Cop::Lint::UselessRuby2Keywords::MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Lint::UselessRuby2Keywords::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + class RuboCop::Cop::Lint::UselessSetterCall < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector @@ -6447,15 +6493,19 @@ class RuboCop::Cop::Naming::FileName < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp def on_new_investigation; end + def struct_definition(param0 = T.unsafe(nil)); end private def allowed_acronyms; end def bad_filename_allowed?; end def check_definition_path_hierarchy?; end + def defined_struct(node); end + def definition_path_hierarchy_roots; end def expect_matching_definition?; end def filename_good?(basename); end def find_class_or_module(node, namespace); end + def find_definition(node); end def for_bad_filename(file_path); end def ignore_executable_scripts?; end def match?(expected); end @@ -7850,9 +7900,9 @@ class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base private - def line(comment); end def offensive?(comment); end def register_offense(comment, matched_keyword); end + def source_line(comment); end end RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENTS = T.let(T.unsafe(nil), Array) @@ -7860,6 +7910,7 @@ RuboCop::Cop::Style::CommentedKeyword::ALLOWED_COMMENT_REGEXES = T.let(T.unsafe( RuboCop::Cop::Style::CommentedKeyword::KEYWORDS = T.let(T.unsafe(nil), Array) RuboCop::Cop::Style::CommentedKeyword::KEYWORD_REGEXES = T.let(T.unsafe(nil), Array) RuboCop::Cop::Style::CommentedKeyword::MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Style::CommentedKeyword::REGEXP = T.let(T.unsafe(nil), Regexp) class RuboCop::Cop::Style::ConditionalAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::Style::ConditionalAssignmentHelper @@ -9881,6 +9932,17 @@ end RuboCop::Cop::Style::OneLineConditional::MSG = T.let(T.unsafe(nil), String) +class RuboCop::Cop::Style::OpenStructUse < ::RuboCop::Cop::Base + def on_const(node); end + def uses_open_struct?(param0 = T.unsafe(nil)); end + + private + + def custom_class_or_module_definition?(node); end +end + +RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String) + class RuboCop::Cop::Style::OptionHash < ::RuboCop::Cop::Base def on_args(node); end def option_hash(param0 = T.unsafe(nil)); end @@ -10018,6 +10080,7 @@ end class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base include ::RuboCop::Cop::SafeAssignment include ::RuboCop::Cop::Parentheses + include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector def control_op_condition(param0 = T.unsafe(nil)); end @@ -10032,6 +10095,7 @@ class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base def modifier_op?(node); end def parens_allowed?(node); end def process_control_op(node); end + def semicolon_separated_expressions?(first_exp, rest_exps); end end class RuboCop::Cop::Style::PercentLiteralDelimiters < ::RuboCop::Cop::Base @@ -10137,6 +10201,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base def autocorrect(corrector, node); end def correct_quotes(str); end def hash_colon_key?(node); end + def invalid_double_quotes?(source); end def quoted?(sym_node); end def style; end def wrong_quotes?(node); end @@ -10822,13 +10887,16 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector def calls_lvar?(param0 = T.unsafe(nil), param1); end + def creates_hash?(param0 = T.unsafe(nil)); end def on_send(node); end def regexp_match?(param0 = T.unsafe(nil)); end private def extract_send_node(block_node); end - def find_regexp(node); end + def find_regexp(node, block); end + def match_predicate_without_receiver?(node); end + def receiver_allowed?(node); end def register_offense(node, block_node, regexp); end end @@ -11861,6 +11929,7 @@ module RuboCop::Cop::Util def first_part_of_call_chain(node); end def indent(node, offset: T.unsafe(nil)); end def interpret_string_escapes(string); end + def line(node_or_range); end def line_range(node); end def needs_escaping?(string); end def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end @@ -11882,6 +11951,7 @@ module RuboCop::Cop::Util def first_part_of_call_chain(node); end def indent(node, offset: T.unsafe(nil)); end def interpret_string_escapes(string); end + def line(node_or_range); end def line_range(node); end def needs_escaping?(string); end def on_node(syms, sexp, excludes = T.unsafe(nil), &block); end @@ -12609,6 +12679,37 @@ end RuboCop::Formatter::HTMLFormatter::ERBContext::LOGO_IMAGE_PATH = T.let(T.unsafe(nil), String) RuboCop::Formatter::HTMLFormatter::ERBContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash) + +class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct + def offenses; end + def offenses=(_); end + def path; end + def path=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def members; end + def new(*_arg0); end + end +end + +class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct + def inspected_files; end + def inspected_files=(_); end + def offense_count; end + def offense_count=(_); end + def target_files; end + def target_files=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def members; end + def new(*_arg0); end + end +end + RuboCop::Formatter::HTMLFormatter::TEMPLATE_PATH = T.let(T.unsafe(nil), String) class RuboCop::Formatter::JSONFormatter < ::RuboCop::Formatter::BaseFormatter @@ -13247,10 +13348,8 @@ end class String include ::Comparable - include ::Colorize::InstanceMethods include ::JSON::Ext::Generator::GeneratorMethods::String include ::MessagePack::CoreExt - extend ::Colorize::ClassMethods extend ::JSON::Ext::Generator::GeneratorMethods::String::Extend end diff --git a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi index ddb95d684b..ada0b4123a 100644 --- a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi +++ b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi @@ -5105,7 +5105,10 @@ module RuboCop::AST::NodePattern::Sets SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped) SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped) SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped) + SET_NEW_ = ::T.let(nil, ::T.untyped) SET_SYSTEM_SHELL_OUTPUT_PIPE_OUTPUT = ::T.let(nil, ::T.untyped) + SET_TO_H_TO_HASH = ::T.let(nil, ::T.untyped) + SET_TO_I_TO_F_TO_C_TO_R = ::T.let(nil, ::T.untyped) SET_WITH_WITHOUT = ::T.let(nil, ::T.untyped) end @@ -5350,6 +5353,13 @@ end module RuboCop::RSpec::ExpectOffense end +class RuboCop::RSpec::ParallelFormatter + def dump_pending(*arg); end +end + +class RuboCop::RSpec::ParallelFormatter +end + class RubyLex include ::RubyToken def Fail(err=T.unsafe(nil), *rest); end From a2e2ea4b51622ac8e210e15a41ca998fc864d2f0 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 16 Nov 2021 12:07:50 +0000 Subject: [PATCH 4/4] .rubocop.yml: allow OpenStruct. --- Library/.rubocop.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index 08897f8522..e9f5880f0e 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -471,6 +471,10 @@ Style/GuardClause: Style/HashSyntax: EnforcedStyle: ruby19 +# OpenStruct is a nice helper. +Style/OpenStructUse: + Enabled: false + # so many of these in formulae and can't be autocorrected Style/StringConcatenation: Exclude: