From c30a6f9a6417d64fd2f002ef76d8e1cb054f4b55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Feb 2023 19:00:53 +0000 Subject: [PATCH 1/5] build(deps): bump rubocop from 1.44.1 to 1.45.1 in /Library/Homebrew Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.44.1 to 1.45.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.44.1...v1.45.1) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Library/Homebrew/Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 44e2e02433..8a71f5f789 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -100,7 +100,7 @@ GEM sorbet-runtime (>= 0.5.9204) unparser rdiscount (2.2.7) - regexp_parser (2.6.2) + regexp_parser (2.7.0) rexml (3.2.5) ronn (0.7.3) hpricot (>= 0.8.2) @@ -130,7 +130,7 @@ GEM rspec-support (3.12.0) rspec_junit_formatter (0.6.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.44.1) + rubocop (1.45.1) json (~> 2.3) parallel (~> 1.10) parser (>= 3.2.0.0) From 83ea0de8f9887a9c2c4bb5e78cbfb5b5f3eaee7d Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Thu, 9 Feb 2023 19:04:37 +0000 Subject: [PATCH 2/5] brew vendor-gems: commit updates. --- Library/Homebrew/vendor/bundle/bundler/setup.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index c096316f50..f710d217d9 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -50,7 +50,7 @@ $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unf_ext-0.0.8.2/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unf-0.1.4/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/domain_name-0.5.20190701/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/regexp_parser-2.6.2/lib") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/regexp_parser-2.7.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ecma-re-validator-0.4.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/elftools-1.2.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/hana-1.3.7/lib") @@ -103,7 +103,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.24.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/ruby-progressbar-1.11.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/unicode-display_width-2.4.2/lib") -$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.44.1/lib") +$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-1.45.1/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-capybara-2.17.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-performance-1.16.0/lib") $:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/rubocop-rails-2.17.4/lib") From fb336da538c025dcb8446ba518114aeac812bec4 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Thu, 9 Feb 2023 19:11:57 +0000 Subject: [PATCH 3/5] Update RBI files for rubocop. Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow. --- ...rser@2.6.2.rbi => regexp_parser@2.7.0.rbi} | 40 +++++++--- ...{rubocop@1.44.1.rbi => rubocop@1.45.1.rbi} | 73 ++++++++++++++----- 2 files changed, 85 insertions(+), 28 deletions(-) rename Library/Homebrew/sorbet/rbi/gems/{regexp_parser@2.6.2.rbi => regexp_parser@2.7.0.rbi} (97%) rename Library/Homebrew/sorbet/rbi/gems/{rubocop@1.44.1.rbi => rubocop@1.45.1.rbi} (99%) diff --git a/Library/Homebrew/sorbet/rbi/gems/regexp_parser@2.6.2.rbi b/Library/Homebrew/sorbet/rbi/gems/regexp_parser@2.7.0.rbi similarity index 97% rename from Library/Homebrew/sorbet/rbi/gems/regexp_parser@2.6.2.rbi rename to Library/Homebrew/sorbet/rbi/gems/regexp_parser@2.7.0.rbi index be8c4b85b4..8a102b65b7 100644 --- a/Library/Homebrew/sorbet/rbi/gems/regexp_parser@2.6.2.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/regexp_parser@2.7.0.rbi @@ -90,6 +90,7 @@ class Regexp::Expression::Backreference::Base < ::Regexp::Expression::Base def match_length; end def referenced_expression; end def referenced_expression=(_arg0); end + def referential?; end private @@ -284,6 +285,7 @@ class Regexp::Expression::Conditional::Condition < ::Regexp::Expression::Base def reference; end def referenced_expression; end def referenced_expression=(_arg0); end + def referential?; end private @@ -303,6 +305,7 @@ class Regexp::Expression::Conditional::Expression < ::Regexp::Expression::Subexp def reference; end def referenced_expression; end def referenced_expression=(_arg0); end + def referential?; end private @@ -548,6 +551,7 @@ module Regexp::Expression::Shared def quantified?; end def quantifier=(qtf); end def quantifier_affix(expression_format); end + def referential?; end def starts_at; end def terminal?; end def to_s(format = T.unsafe(nil)); end @@ -581,7 +585,7 @@ class Regexp::Expression::Subexpression < ::Regexp::Expression::Base def at(*args, &block); end def dig(*indices); end def each(*args, &block); end - def each_expression(include_self = T.unsafe(nil)); end + def each_expression(include_self = T.unsafe(nil), &block); end def empty?(*args, &block); end def expressions; end def expressions=(_arg0); end @@ -597,6 +601,7 @@ class Regexp::Expression::Subexpression < ::Regexp::Expression::Base def strfre_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end def strfregexp_tree(format = T.unsafe(nil), include_self = T.unsafe(nil), separator = T.unsafe(nil)); end def te; end + def terminal?; end def to_h; end def traverse(include_self = T.unsafe(nil), &block); end def values_at(*args, &block); end @@ -700,19 +705,28 @@ class Regexp::Expression::WhiteSpace < ::Regexp::Expression::FreeSpace end class Regexp::Lexer - def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end + def emit(token); end + def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end private def ascend(type, token); end + def block; end + def block=(_arg0); end def break_codepoint_list(token); end def break_literal(token); end + def collect_tokens; end + def collect_tokens=(_arg0); end def conditional_nesting; end def conditional_nesting=(_arg0); end def descend(type, token); end - def merge_condition(current); end + def merge_condition(current, last); end def nesting; end def nesting=(_arg0); end + def preprev_token; end + def preprev_token=(_arg0); end + def prev_token; end + def prev_token=(_arg0); end def set_nesting; end def set_nesting=(_arg0); end def shift; end @@ -721,8 +735,8 @@ class Regexp::Lexer def tokens=(_arg0); end class << self - def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end - def scan(input, syntax = T.unsafe(nil), options: T.unsafe(nil), &block); end + def lex(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end + def scan(input, syntax = T.unsafe(nil), options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end end end @@ -848,7 +862,9 @@ Regexp::Parser::VERSION = T.let(T.unsafe(nil), String) class Regexp::Scanner def emit(type, token, text); end - def scan(input_object, options: T.unsafe(nil), &block); end + def literal_run; end + def literal_run=(_arg0); end + def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end private @@ -857,6 +873,8 @@ class Regexp::Scanner def block=(_arg0); end def char_pos; end def char_pos=(_arg0); end + def collect_tokens; end + def collect_tokens=(_arg0); end def conditional_stack; end def conditional_stack=(_arg0); end def copy(data, ts, te); end @@ -870,8 +888,8 @@ class Regexp::Scanner def group_depth=(_arg0); end def in_group?; end def in_set?; end - def literal; end - def literal=(_arg0); end + def prev_token; end + def prev_token=(_arg0); end def set_depth; end def set_depth=(_arg0); end def spacing_stack; end @@ -884,7 +902,7 @@ class Regexp::Scanner def long_prop_map; end def parse_prop_map(name); end def posix_classes; end - def scan(input_object, options: T.unsafe(nil), &block); end + def scan(input_object, options: T.unsafe(nil), collect_tokens: T.unsafe(nil), &block); end def short_prop_map; end end end @@ -934,7 +952,6 @@ module Regexp::Syntax def specified_versions; end def supported?(name); end def version_class(version); end - def warn_if_future_version(const_name); end class << self def comparable(name); end @@ -945,7 +962,6 @@ module Regexp::Syntax def specified_versions; end def supported?(name); end def version_class(version); end - def warn_if_future_version(const_name); end end end @@ -985,6 +1001,8 @@ class Regexp::Syntax::Base end end +Regexp::Syntax::CURRENT = Regexp::Syntax::V2_6_3 + class Regexp::Syntax::InvalidVersionNameError < ::Regexp::Syntax::SyntaxError def initialize(name); end end diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.44.1.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.45.1.rbi similarity index 99% rename from Library/Homebrew/sorbet/rbi/gems/rubocop@1.44.1.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop@1.45.1.rbi index 2a687f87d8..8fccd00963 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.44.1.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.45.1.rbi @@ -32,6 +32,8 @@ class RuboCop::CLI def execute_runners; end def handle_exiting_options; end def parallel_by_default!; end + def profile_if_needed; end + def require_gem(name); end def run_command(name); end def set_options_to_config_loader; end def suggest_extensions; end @@ -441,7 +443,7 @@ RuboCop::ConfigLoader::DOTFILE = T.let(T.unsafe(nil), String) RuboCop::ConfigLoader::RUBOCOP_HOME = T.let(T.unsafe(nil), String) class RuboCop::ConfigLoaderResolver - def fix_include_paths(base_config_path, hash, path, key, value); end + def fix_include_paths(base_config_path, hash, key, value); end def merge(base_hash, derived_hash, **opts); end def merge_with_default(config, config_file, unset_nil:); end def override_department_setting_for_cops(base_hash, derived_hash); end @@ -852,6 +854,7 @@ class RuboCop::Cop::Base def active_support_extensions_enabled?; end def add_global_offense(message = T.unsafe(nil), severity: T.unsafe(nil)); end def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end + def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end def callbacks_needed; end def config; end def config_to_allow_offenses; end @@ -878,7 +881,6 @@ class RuboCop::Cop::Base def annotate(message); end def apply_correction(corrector); end def attempt_correction(range, corrector); end - def begin_investigation(processed_source); end def callback_argument(range); end def complete_investigation; end def correct(range); end @@ -893,6 +895,7 @@ class RuboCop::Cop::Base def file_name_matches_any?(file, parameter, default_result); end def find_message(range, message); end def find_severity(_range, severity); end + def range_for_original(range); end def range_from_node_or_range(node_or_range); end def reset_investigation; end def use_corrector(range, corrector); end @@ -1147,7 +1150,7 @@ class RuboCop::Cop::Commissioner def initialize(cops, forces = T.unsafe(nil), options = T.unsafe(nil)); end def errors; end - def investigate(processed_source); end + def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end def on___ENCODING__(node); end def on___FILE__(node); end def on___LINE__(node); end @@ -1278,6 +1281,7 @@ class RuboCop::Cop::Commissioner private + def begin_investigation(processed_source, offset:, original:); end def build_callbacks(cops); end def initialize_callbacks; end def invoke(callback, cops); end @@ -1377,6 +1381,7 @@ RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash) class RuboCop::Cop::Cop < ::RuboCop::Cop::Base def add_offense(node_or_range, location: T.unsafe(nil), message: T.unsafe(nil), severity: T.unsafe(nil), &block); end + def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end def corrections; end def find_location(node, loc); end def offenses; end @@ -1387,11 +1392,11 @@ class RuboCop::Cop::Cop < ::RuboCop::Cop::Base private def apply_correction(corrector); end - def begin_investigation(processed_source); end def callback_argument(_range); end def correction_lambda; end def dedup_on_node(node); end def emulate_v0_callsequence(corrector); end + def range_for_original(range); end def suppress_clobbering; end class << self @@ -1929,6 +1934,8 @@ module RuboCop::Cop::HashShorthandSyntax def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end def ignore_hash_shorthand_syntax?(pair_node); end def ignore_mixed_hash_shorthand_syntax?(hash_node); end + def last_expression?(ancestor); end + def method_dispatch_as_argument?(method_dispatch_node); end def mixed_shorthand_syntax_check(hash_value_type_breakdown); end def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end def register_offense(node, message, replacement); end @@ -1936,7 +1943,6 @@ module RuboCop::Cop::HashShorthandSyntax def require_hash_value_for_around_hash_literal?(node); end def use_element_of_hash_literal_as_receiver?(ancestor, parent); end def use_modifier_form_without_parenthesized_method_call?(ancestor); end - def without_parentheses_call_expr_follows?(ancestor); end end RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_EXPLICIT_VALUE_MSG = T.let(T.unsafe(nil), String) @@ -2294,6 +2300,7 @@ RuboCop::Cop::Layout::CaseIndentation::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base include ::RuboCop::Cop::VisibilityHelp + include ::RuboCop::Cop::CommentsHelp extend ::RuboCop::Cop::AutoCorrector def on_class(class_node); end @@ -2316,7 +2323,6 @@ class RuboCop::Cop::Layout::ClassStructure < ::RuboCop::Cop::Base def ignore_for_autocorrect?(node, sibling); end def marked_as_private_constant?(node, name); end def private_constant?(node); end - def source_range_with_comment(node); end def start_line_position(node); end def walk_over_nested_class_definition(class_node); end def whole_line_comment_at_line?(line); end @@ -4088,14 +4094,12 @@ class RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets < ::RuboCop::Cop::Ba def end_has_own_line?(token); end def index_for(node, token); end def issue_offenses(node, left, right, start_ok, end_ok); end - def left_array_bracket(node); end def line_and_column_for(token); end def multi_dimensional_array?(node, token, side: T.unsafe(nil)); end def next_to_bracket?(token, side: T.unsafe(nil)); end def next_to_comment?(node, token); end def next_to_newline?(node, token); end def qualifies_for_compact?(node, token, side: T.unsafe(nil)); end - def right_array_bracket(node); end end RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets::EMPTY_MSG = T.let(T.unsafe(nil), String) @@ -4590,10 +4594,10 @@ class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base private + def chained_method_name(send_node); end def debugger_method?(send_node); end def debugger_methods; end def message(node); end - def receiver_chain(send_node); end end RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) @@ -5287,7 +5291,7 @@ class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern - def class_or_module_or_struct_new_call?(param0 = T.unsafe(nil)); end + def class_constructor?(param0 = T.unsafe(nil)); end def eval_call?(param0 = T.unsafe(nil)); end def exec_call?(param0 = T.unsafe(nil)); end def on_def(node); end @@ -6312,8 +6316,8 @@ class RuboCop::Cop::Lint::UselessAccessModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector + def class_constructor?(param0 = T.unsafe(nil)); end def class_or_instance_eval?(param0 = T.unsafe(nil)); end - def class_or_module_or_struct_new_call?(param0 = T.unsafe(nil)); end def dynamic_method_definition?(param0 = T.unsafe(nil)); end def on_block(node); end def on_class(node); end @@ -7864,6 +7868,7 @@ class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base def offense?(node); end def remove_node(corrector, node); end def replace_def(corrector, node, def_node); end + def right_siblings_same_inline_method?(node); end def select_grouped_def_nodes(node); end end @@ -10424,12 +10429,15 @@ end RuboCop::Cop::Style::MultilineMethodSignature::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::MultilineTernaryOperator < ::RuboCop::Cop::Base + include ::RuboCop::Cop::CommentsHelp extend ::RuboCop::Cop::AutoCorrector def on_if(node); end private + def autocorrect(corrector, node); end + def comments_in_condition(node); end def enforce_single_line_ternary_operator?(node); end def offense?(node); end def replacement(node); end @@ -10801,10 +10809,12 @@ class RuboCop::Cop::Style::NumberedParametersLimit < ::RuboCop::Cop::Base private def max_count; end + def numbered_parameter_nodes(node); end end RuboCop::Cop::Style::NumberedParametersLimit::DEFAULT_MAX_VALUE = T.let(T.unsafe(nil), Integer) RuboCop::Cop::Style::NumberedParametersLimit::MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Style::NumberedParametersLimit::NUMBERED_PARAMETER_PATTERN = T.let(T.unsafe(nil), Regexp) class RuboCop::Cop::Style::NumericLiteralPrefix < ::RuboCop::Cop::Base include ::RuboCop::Cop::IntegerNode @@ -11356,6 +11366,7 @@ class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base private + def argument_with_operator?(argument); end def asgn_type?(node); end def branches_have_assignment?(node); end def branches_have_method?(node); end @@ -11381,6 +11392,7 @@ class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base def without_argument_parentheses_method?(node); end end +RuboCop::Cop::Style::RedundantCondition::ARGUMENT_WITH_OPERATOR_TYPES = T.let(T.unsafe(nil), Array) RuboCop::Cop::Style::RedundantCondition::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Style::RedundantCondition::REDUNDANT_CONDITION = T.let(T.unsafe(nil), String) @@ -11519,6 +11531,20 @@ end RuboCop::Cop::Style::RedundantFreeze::MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Style::RedundantFreeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +class RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Heredoc + extend ::RuboCop::Cop::AutoCorrector + + def on_heredoc(node); end + + private + + def need_heredoc_delimiter_quotes?(node); end +end + +RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes::MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Style::RedundantHeredocDelimiterQuotes::STRING_INTERPOLATION_OR_ESCAPED_CHARACTER_PATTERN = T.let(T.unsafe(nil), Regexp) + class RuboCop::Cop::Style::RedundantInitialize < ::RuboCop::Cop::Base include ::RuboCop::Cop::CommentsHelp include ::RuboCop::Cop::RangeHelp @@ -12910,6 +12936,7 @@ class RuboCop::Cop::Style::YodaCondition < ::RuboCop::Cop::Base private def actual_code_range(node); end + def constant_portion?(node); end def corrected_code(node); end def enforce_yoda?; end def equality_only?; end @@ -12939,9 +12966,11 @@ class RuboCop::Cop::Style::YodaExpression < ::RuboCop::Cop::Base private + def constant_portion?(node); end def offended_ancestor?(node); end def offended_nodes; end def supported_operators; end + def yoda_expression_constant?(lhs, rhs); end end RuboCop::Cop::Style::YodaExpression::MSG = T.let(T.unsafe(nil), String) @@ -12975,7 +13004,7 @@ module RuboCop::Cop::SurroundingSpace private - def empty_brackets?(left_bracket_token, right_bracket_token); end + def empty_brackets?(left_bracket_token, right_bracket_token, tokens: T.unsafe(nil)); end def empty_offense(node, range, message, command); end def empty_offenses(node, left, right, message); end def extra_space?(token, side); end @@ -13015,21 +13044,21 @@ class RuboCop::Cop::Team def external_dependency_checksum; end def forces; end def inspect_file(processed_source); end - def investigate(processed_source); end + def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end def updated_source_file; end def updated_source_file?; end def warnings; end private - def autocorrect(processed_source, report); end - def autocorrect_report(report); end + def autocorrect(processed_source, report, original:, offset:); end + def autocorrect_report(report, offset:, original:); end def be_ready; end - def collate_corrections(report); end + def collate_corrections(report, offset:, original:); end def each_corrector(report); end def handle_error(error, location, cop); end def handle_warning(error, location); end - def investigate_partial(cops, processed_source); end + def investigate_partial(cops, processed_source, offset:, original:); end def process_errors(file, errors); end def reset; end def roundup_relevant_cops(filename); end @@ -14269,6 +14298,7 @@ class RuboCop::Options def add_cop_selection_csv_option(option, opts); end def add_general_options(opts); end def add_output_options(opts); end + def add_profile_options(opts); end def add_server_options(opts); end def add_severity_option(opts); end def define_options; end @@ -14441,6 +14471,7 @@ class RuboCop::Runner def do_inspection_loop(file); end def each_inspected_file(files); end def except_redundant_cop_disable_directive?; end + def extract_ruby_sources(processed_source); end def file_finished(file, offenses); end def file_offense_cache(file); end def file_offenses(file); end @@ -14467,6 +14498,14 @@ class RuboCop::Runner def supports_safe_autocorrect?(offense); end def team_for_redundant_disables(file, offenses, source); end def warm_cache(target_files); end + + class << self + def ruby_extractors; end + + private + + def default_ruby_extractor; end + end end class RuboCop::Runner::InfiniteCorrectionLoop < ::StandardError From b9b3bd25710af8559c7fd79a4e5ff95973b062e4 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 10 Feb 2023 08:59:51 +0000 Subject: [PATCH 4/5] brew style --fix --- Library/Homebrew/cmd/update-report.rb | 4 ++-- Library/Homebrew/test/rubocops/io_read_spec.rb | 6 +++--- Library/Homebrew/test/style_spec.rb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index 474db0052d..a8e3ca3d38 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -55,7 +55,7 @@ module Homebrew ENV["HOMEBREW_LINUXBREW_CORE_MIGRATION"].blank? ohai "Re-running `brew update` for linuxbrew-core migration" - if HOMEBREW_CORE_DEFAULT_GIT_REMOTE != Homebrew::EnvConfig.core_git_remote + if Homebrew::EnvConfig.core_git_remote != HOMEBREW_CORE_DEFAULT_GIT_REMOTE opoo <<~EOS HOMEBREW_CORE_GIT_REMOTE was set: #{Homebrew::EnvConfig.core_git_remote}. It has been unset for the migration. @@ -65,7 +65,7 @@ module Homebrew end ENV.delete("HOMEBREW_CORE_GIT_REMOTE") - if HOMEBREW_BOTTLE_DEFAULT_DOMAIN != Homebrew::EnvConfig.bottle_domain + if Homebrew::EnvConfig.bottle_domain != HOMEBREW_BOTTLE_DEFAULT_DOMAIN opoo <<~EOS HOMEBREW_BOTTLE_DOMAIN was set: #{Homebrew::EnvConfig.bottle_domain}. It has been unset for the migration. diff --git a/Library/Homebrew/test/rubocops/io_read_spec.rb b/Library/Homebrew/test/rubocops/io_read_spec.rb index 7817d34c31..98a00f3709 100644 --- a/Library/Homebrew/test/rubocops/io_read_spec.rb +++ b/Library/Homebrew/test/rubocops/io_read_spec.rb @@ -51,7 +51,7 @@ describe RuboCop::Cop::Homebrew::IORead do end it "reports an offense when `IO.read` is used with a concatenated string starting with a pipe character" do - expect_offense(<<~'RUBY') + expect_offense(<<~RUBY) input = "|echo test" IO.read("|echo " + input) ^^^^^^^^^^^^^^^^^^^^^^^^^ The use of `IO.read` is a security risk. @@ -59,7 +59,7 @@ describe RuboCop::Cop::Homebrew::IORead do end it "reports an offense when `IO.read` is used with a concatenated string starting with untrustworthy input" do - expect_offense(<<~'RUBY') + expect_offense(<<~RUBY) input = "|echo test" IO.read(input + ".txt") ^^^^^^^^^^^^^^^^^^^^^^^ The use of `IO.read` is a security risk. @@ -67,7 +67,7 @@ describe RuboCop::Cop::Homebrew::IORead do end it "does not report an offense when `IO.read` is used with a concatenated string safely" do - expect_no_offenses(<<~'RUBY') + expect_no_offenses(<<~RUBY) input = "test" IO.read("somefile" + input + ".txt") RUBY diff --git a/Library/Homebrew/test/style_spec.rb b/Library/Homebrew/test/style_spec.rb index f536a38cc7..9867bc1e19 100644 --- a/Library/Homebrew/test/style_spec.rb +++ b/Library/Homebrew/test/style_spec.rb @@ -24,7 +24,7 @@ describe Homebrew::Style do it "returns offenses when RuboCop reports offenses" do formula = dir/"my-formula.rb" - formula.write <<~'EOS' + formula.write <<~EOS class MyFormula < Formula end From fe37be6c30299c6bafd164435e9b4b9cc3d30d49 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 10 Feb 2023 09:05:10 +0000 Subject: [PATCH 5/5] github_packages: improve schema debugging. --- Library/Homebrew/github_packages.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/github_packages.rb b/Library/Homebrew/github_packages.rb index e50a1cbb62..f5ea7cea12 100644 --- a/Library/Homebrew/github_packages.rb +++ b/Library/Homebrew/github_packages.rb @@ -176,9 +176,9 @@ class GitHubPackages puts ofail "#{Formatter.url(schema_uri)} JSON schema validation failed!" oh1 "Errors" - pp schema.validate(json).to_a + puts schema.validate(json).to_a.inspect oh1 "JSON" - pp json + puts json.inspect exit 1 end