From d329e48d7195b2b1a754ff5d788809798d1ad822 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Jul 2021 17:52:22 +0000 Subject: [PATCH 1/7] build(deps): bump rubocop from 1.17.0 to 1.18.2 in /Library/Homebrew Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.17.0 to 1.18.2. - [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.17.0...v1.18.2) --- 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 4a7653aa79d87..5563fad548d0f 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -112,7 +112,7 @@ GEM rspec (>= 3, < 4) rspec_junit_formatter (0.4.1) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (1.17.0) + rubocop (1.18.2) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) From 8d7ecbb03a16c1e6df6e8982f51ef8d06f6b2226 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Fri, 2 Jul 2021 17:55:18 +0000 Subject: [PATCH 2/7] 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 b1a28ddbf72d8..0cee2edce3420 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -81,7 +81,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-ast-1.7.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.0.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.17.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-1.18.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.11.3/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rails-2.11.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-2.4.0/lib" From f09e6c8892d08107065a4fb3761c16a8f7a843c3 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Fri, 2 Jul 2021 17:57:21 +0000 Subject: [PATCH 3/7] Update RBI files for rubocop. --- ...{rubocop@1.17.0.rbi => rubocop@1.18.2.rbi} | 89 ++++++++++++++++++- .../sorbet/rbi/hidden-definitions/hidden.rbi | 1 + 2 files changed, 87 insertions(+), 3 deletions(-) rename Library/Homebrew/sorbet/rbi/gems/{rubocop@1.17.0.rbi => rubocop@1.18.2.rbi} (99%) diff --git a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.17.0.rbi b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.18.2.rbi similarity index 99% rename from Library/Homebrew/sorbet/rbi/gems/rubocop@1.17.0.rbi rename to Library/Homebrew/sorbet/rbi/gems/rubocop@1.18.2.rbi index 068da1a2fc5ba..12411a4c6e864 100644 --- a/Library/Homebrew/sorbet/rbi/gems/rubocop@1.17.0.rbi +++ b/Library/Homebrew/sorbet/rbi/gems/rubocop@1.18.2.rbi @@ -1075,6 +1075,7 @@ class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::GemDeclaration + def includes_commit_reference?(param0 = T.unsafe(nil)); end def includes_version_specification?(param0 = T.unsafe(nil)); end def on_send(node); end @@ -1082,9 +1083,11 @@ class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base def allowed_gem?(node); end def allowed_gems; end + def forbidden_offense?(node); end def forbidden_style?; end def message(range); end def offense?(node); end + def required_offense?(node); end def required_style?; end def version_specification?(expression); end end @@ -1153,6 +1156,7 @@ module RuboCop::Cop::CheckLineBreakable def contained_by_multiline_collection_that_could_be_broken_up?(node); end def extract_breakable_node_from_elements(node, elements, max); end def extract_first_element_over_column_limit(node, elements, max); end + def first_argument_is_heredoc?(node); end def process_args(args); end def safe_to_ignore?(node); end def shift_elements_for_heredoc_arg(node, elements, index); end @@ -3177,6 +3181,29 @@ end RuboCop::Cop::Layout::LeadingEmptyLines::MSG = T.let(T.unsafe(nil), String) +class RuboCop::Cop::Layout::LineEndStringConcatenationIndentation < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + def autocorrect(corrector, node); end + def on_dstr(node); end + + private + + def add_offense_and_correction(node, message); end + def always_aligned?(dstr_node); end + def always_indented?(dstr_node); end + def check_aligned(children, start_index); end + def check_indented(children); end + def single_string_literal?(dstr_node); end + def strings_concatenated_with_backslash?(dstr_node); end +end + +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_ALIGN = T.let(T.unsafe(nil), String) +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::MSG_INDENT = T.let(T.unsafe(nil), String) +RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_INDENTED = T.let(T.unsafe(nil), Array) + class RuboCop::Cop::Layout::LineLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CheckLineBreakable include ::RuboCop::Cop::IgnoredPattern @@ -6571,6 +6598,53 @@ end RuboCop::Cop::Naming::HeredocDelimiterNaming::MSG = T.let(T.unsafe(nil), String) +class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + + def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end + + def on_new_investigation; end + + private + + def add_offenses_for_token(token, word_locations); end + def add_to_flagged_term_hash(regex_string, term, term_definition); end + def array_to_ignorecase_regex(strings); end + def check_token?(type); end + def create_message(word); end + def create_message_for_file(word); end + def create_multiple_word_message_for_file(words); end + def create_single_word_message_for_file(word); end + def ensure_regex_string(regex); end + def find_flagged_term(word); end + def format_suggestions(suggestions); end + def investigate_filepath; end + def investigate_tokens; end + def mask_input(str); end + def preprocess_check_config; end + def preprocess_flagged_terms; end + def preprocess_suggestions(suggestions); end + def process_allowed_regex(allowed); end + def scan_for_words(input); end + def set_regexes(flagged_term_strings, allowed_strings); end +end + +RuboCop::Cop::Naming::InclusiveLanguage::EMPTY_ARRAY = T.let(T.unsafe(nil), Array) + +class RuboCop::Cop::Naming::InclusiveLanguage::WordLocation < ::Struct + def position; end + def position=(_); end + def word; end + def word=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def members; end + def new(*_arg0); end + end +end + class RuboCop::Cop::Naming::MemoizedInstanceVariableName < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle @@ -7625,6 +7699,7 @@ class RuboCop::Cop::Style::ClassAndModuleChildren < ::RuboCop::Cop::Base def compact_node(corrector, node); end def compact_node_name?(node); end def compact_replacement(node); end + def configured_indentation_width; end def indent_width; end def leading_spaces(node); end def needs_compacting?(body); end @@ -7633,6 +7708,7 @@ class RuboCop::Cop::Style::ClassAndModuleChildren < ::RuboCop::Cop::Base def remove_end(corrector, body); end def replace_namespace_keyword(corrector, node); end def split_on_double_colon(corrector, node, padding); end + def unindent(corrector, node); end end RuboCop::Cop::Style::ClassAndModuleChildren::COMPACT_MSG = T.let(T.unsafe(nil), String) @@ -7818,13 +7894,18 @@ class RuboCop::Cop::Style::CommentAnnotation < ::RuboCop::Cop::Base def annotation_range(comment, margin, first_word, colon, space); end def concat_length(*args); end def correct_annotation?(first_word, colon, space, note); end + def correct_colon_annotation?(first_word, colon, space, note); end + def correct_offense(corrector, range, first_word); end + def correct_space_annotation?(first_word, colon, space, note); end def first_comment_line?(comments, index); end def inline_comment?(comment); end def register_offense(range, note, first_word); end + def requires_colon?; end end RuboCop::Cop::Style::CommentAnnotation::MISSING_NOTE = T.let(T.unsafe(nil), String) -RuboCop::Cop::Style::CommentAnnotation::MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Style::CommentAnnotation::MSG_COLON_STYLE = T.let(T.unsafe(nil), String) +RuboCop::Cop::Style::CommentAnnotation::MSG_SPACE_STYLE = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp @@ -10577,6 +10658,7 @@ class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base def allow_inner_slashes?; end def allowed_mixed_percent_r?(node); end def allowed_mixed_slash?(node); end + def allowed_omit_parentheses_with_percent_r_literal?(node); end def allowed_percent_r_literal?(node); end def allowed_slash_literal?(node); end def calculate_replacement(node); end @@ -10589,7 +10671,6 @@ class RuboCop::Cop::Style::RegexpLiteral < ::RuboCop::Cop::Base def inner_slash_for(opening_delimiter); end def inner_slash_indices(node); end def node_body(node, include_begin_nodes: T.unsafe(nil)); end - def omit_parentheses_style?(node); end def preferred_delimiters; end def slash_literal?(node); end end @@ -10981,12 +11062,14 @@ class RuboCop::Cop::Style::StringConcatenation < ::RuboCop::Cop::Base private - def collect_parts(node, parts); end + def collect_parts(node, parts = T.unsafe(nil)); end def corrected_ancestor?(node); end def find_topmost_plus_node(node); end def handle_quotes(parts); end def line_end_concatenation?(node); end + def offensive_for_mode?(receiver_node); end def plus_node?(node); end + def register_offense(topmost_plus_node, parts); end def replacement(parts); end def single_quoted?(str_node); end def uncorrectable?(part); end diff --git a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi index 5b6f696e4b9ee..0acbfe37bc32b 100644 --- a/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi +++ b/Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi @@ -26901,6 +26901,7 @@ end module RuboCop::AST::NodePattern::Sets SET_BEGINNING_OF_DAY_BEGINNING_OF_WEEK_BEGINNING_OF_MONTH_ETC = ::T.let(nil, ::T.untyped) + SET_BRANCH_REF_TAG = ::T.let(nil, ::T.untyped) SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped) SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped) SET_END_OF_DAY_END_OF_WEEK_END_OF_MONTH_ETC = ::T.let(nil, ::T.untyped) From 0f78c49d6c09124006e52004267fae8fef2dac5d Mon Sep 17 00:00:00 2001 From: Nanda H Krishna Date: Fri, 2 Jul 2021 23:32:21 +0530 Subject: [PATCH 4/7] Autocorrect style issues with `brew style --fix` --- Library/Homebrew/formulary.rb | 2 +- Library/Homebrew/rubocops/components_order.rb | 4 ++-- Library/Homebrew/rubocops/lines.rb | 4 ++-- Library/Homebrew/test/dev-cmd/audit_spec.rb | 14 +++++++------- .../cask/homepage_url_trailing_slash_spec.rb | 2 +- .../test/rubocops/cask/stanza_order_spec.rb | 2 +- Library/Homebrew/test/utils/pypi_spec.rb | 4 ++-- Library/Homebrew/uninstall.rb | 2 +- Library/Homebrew/utils/analytics.rb | 8 ++++---- Library/Homebrew/utils/pypi.rb | 2 +- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 45b6136723b45..3a54b0465fc9f 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -275,7 +275,7 @@ def initialize(url) def load_file(flags:, ignore_errors:) if %r{githubusercontent.com/[\w-]+/[\w-]+/[a-f0-9]{40}(?:/Formula)?/(?[\w+-.@]+).rb} =~ url raise UsageError, "Installation of #{formula_name} from a GitHub commit URL is unsupported! " \ - "`brew extract #{formula_name}` to a stable tap on GitHub instead." + "`brew extract #{formula_name}` to a stable tap on GitHub instead." elsif url.match?(%r{^(https?|ftp)://}) raise UsageError, "Non-checksummed download of #{name} formula file from an arbitrary URL is unsupported! ", "`brew extract` or `brew create` and `brew tap-new` to create a "\ diff --git a/Library/Homebrew/rubocops/components_order.rb b/Library/Homebrew/rubocops/components_order.rb index 0156072f9b8c9..60616b61bb7cb 100644 --- a/Library/Homebrew/rubocops/components_order.rb +++ b/Library/Homebrew/rubocops/components_order.rb @@ -196,8 +196,8 @@ def component_problem(c1, c2) return if tap_style_exception? :components_order_exceptions problem "`#{format_component(c1)}` (line #{line_number(c1)}) " \ - "should be put before `#{format_component(c2)}` " \ - "(line #{line_number(c2)})" do |corrector| + "should be put before `#{format_component(c2)}` " \ + "(line #{line_number(c2)})" do |corrector| reorder_components(corrector, c1, c2) end end diff --git a/Library/Homebrew/rubocops/lines.rb b/Library/Homebrew/rubocops/lines.rb index 5b8f586b42f32..7bdb0e3d7a491 100644 --- a/Library/Homebrew/rubocops/lines.rb +++ b/Library/Homebrew/rubocops/lines.rb @@ -205,7 +205,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node) find_method_with_args(body_node, :depends_on, "mpich") do problem "Formulae in homebrew/core should use 'depends_on \"open-mpi\"' " \ - "instead of '#{@offensive_node.source}'." do |corrector| + "instead of '#{@offensive_node.source}'." do |corrector| corrector.replace(@offensive_node.source_range, "depends_on \"open-mpi\"") end end @@ -340,7 +340,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node) offending_node(str) problem "References to `#{content}` should "\ - "match the specified python dependency (`#{fix}`)" do |corrector| + "match the specified python dependency (`#{fix}`)" do |corrector| corrector.replace(str.source_range, "\"#{fix}\"") end end diff --git a/Library/Homebrew/test/dev-cmd/audit_spec.rb b/Library/Homebrew/test/dev-cmd/audit_spec.rb index 7ed678d25404e..b5392fdd69d36 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -293,7 +293,7 @@ class Foo < Formula end it "checks online and verifies that a standard license id is the same "\ - "as what is indicated on its Github repo", :needs_network do + "as what is indicated on its Github repo", :needs_network do formula_text = <<~RUBY class Cask < Formula url "https://github.com/cask/cask/archive/v0.8.4.tar.gz" @@ -309,7 +309,7 @@ class Cask < Formula end it "checks online and verifies that a standard license id with AND is the same "\ - "as what is indicated on its Github repo", :needs_network do + "as what is indicated on its Github repo", :needs_network do formula_text = <<~RUBY class Cask < Formula url "https://github.com/cask/cask/archive/v0.8.4.tar.gz" @@ -325,7 +325,7 @@ class Cask < Formula end it "checks online and verifies that a standard license id with WITH is the same "\ - "as what is indicated on its Github repo", :needs_network do + "as what is indicated on its Github repo", :needs_network do formula_text = <<~RUBY class Cask < Formula url "https://github.com/cask/cask/archive/v0.8.4.tar.gz" @@ -407,7 +407,7 @@ class Cask < Formula end it "checks online and detects that a formula-specified license is not "\ - "the same as what is indicated on its Github repository", :needs_network do + "the same as what is indicated on its Github repository", :needs_network do formula_text = <<~RUBY class Cask < Formula url "https://github.com/cask/cask/archive/v0.8.4.tar.gz" @@ -441,7 +441,7 @@ class Cask < Formula end it "checks online and detects that an array of license does not contain "\ - "what is indicated on its Github repository", :needs_network do + "what is indicated on its Github repository", :needs_network do formula_text = <<~RUBY class Cask < Formula url "https://github.com/cask/cask/archive/v0.8.4.tar.gz" @@ -454,11 +454,11 @@ class Cask < Formula fa.audit_license expect(fa.problems.first[:message]).to match "Formula license [\"0BSD\", \"MIT\"] "\ - "does not match GitHub license [\"GPL-3.0\"]." + "does not match GitHub license [\"GPL-3.0\"]." end it "checks online and verifies that an array of license contains "\ - "what is indicated on its Github repository", :needs_network do + "what is indicated on its Github repository", :needs_network do formula_text = <<~RUBY class Cask < Formula url "https://github.com/cask/cask/archive/v0.8.4.tar.gz" diff --git a/Library/Homebrew/test/rubocops/cask/homepage_url_trailing_slash_spec.rb b/Library/Homebrew/test/rubocops/cask/homepage_url_trailing_slash_spec.rb index 148c6a6077cb1..c05f24844d09d 100644 --- a/Library/Homebrew/test/rubocops/cask/homepage_url_trailing_slash_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/homepage_url_trailing_slash_spec.rb @@ -51,7 +51,7 @@ let(:expected_offenses) do [{ message: "'https://foo.brew.sh' must have a slash "\ - "after the domain.", + "after the domain.", severity: :convention, line: 2, column: 11, diff --git a/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb b/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb index 0afabf03867bb..aa08a97ec2e44 100644 --- a/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/stanza_order_spec.rb @@ -110,7 +110,7 @@ line: 3, column: 2, source: "uninstall :quit => 'com.example.foo',\n" \ - " :kext => 'com.example.foo.kext'", + " :kext => 'com.example.foo.kext'", }, { message: "`version` stanza out of order", severity: :convention, diff --git a/Library/Homebrew/test/utils/pypi_spec.rb b/Library/Homebrew/test/utils/pypi_spec.rb index 348f9dd10dae3..31a1fd2c44f69 100644 --- a/Library/Homebrew/test/utils/pypi_spec.rb +++ b/Library/Homebrew/test/utils/pypi_spec.rb @@ -6,11 +6,11 @@ describe PyPI do let(:package_url) do "https://files.pythonhosted.org/packages/b0/3f/2e1dad67eb172b6443b5eb37eb885a054a55cfd733393071499514140282/"\ - "snakemake-5.29.0.tar.gz" + "snakemake-5.29.0.tar.gz" end let(:old_package_url) do "https://files.pythonhosted.org/packages/6f/c4/da52bfdd6168ea46a0fe2b7c983b6c34c377a8733ec177cc00b197a96a9f/"\ - "snakemake-5.28.0.tar.gz" + "snakemake-5.28.0.tar.gz" end describe PyPI::Package do diff --git a/Library/Homebrew/uninstall.rb b/Library/Homebrew/uninstall.rb index 0e835b2013337..5f662bfe7352d 100644 --- a/Library/Homebrew/uninstall.rb +++ b/Library/Homebrew/uninstall.rb @@ -137,7 +137,7 @@ def sample_command def are_required_by_deps "#{"is".pluralize(reqs.count)} required by #{deps.to_sentence}, " \ - "which #{"is".pluralize(deps.count)} currently installed" + "which #{"is".pluralize(deps.count)} currently installed" end end diff --git a/Library/Homebrew/utils/analytics.rb b/Library/Homebrew/utils/analytics.rb index 3d20136514f2a..a1efb5b9bdeac 100644 --- a/Library/Homebrew/utils/analytics.rb +++ b/Library/Homebrew/utils/analytics.rb @@ -274,10 +274,10 @@ def table_output(category, days, results, os_version: false, cask_install: false formatted_percent_header = format "%#{percent_width}s", percent_header puts "#{formatted_index_header} | #{formatted_name_with_options_header} | "\ - "#{formatted_count_header} | #{formatted_percent_header}" + "#{formatted_count_header} | #{formatted_percent_header}" columns_line = "#{"-"*index_width}:|-#{"-"*name_with_options_width}-|-"\ - "#{"-"*count_width}:|-#{"-"*percent_width}:" + "#{"-"*count_width}:|-#{"-"*percent_width}:" puts columns_line index = 0 @@ -296,7 +296,7 @@ def table_output(category, days, results, os_version: false, cask_install: false format_percent((count.to_i * 100) / total_count.to_f) end puts "#{formatted_index} | #{formatted_name_with_options} | " \ - "#{formatted_count} | #{formatted_percent}%" + "#{formatted_count} | #{formatted_percent}%" next if index > 10 end return unless results.length > 1 @@ -310,7 +310,7 @@ def table_output(category, days, results, os_version: false, cask_install: false formatted_total_percent_footer = format "%#{percent_width}s", formatted_total_percent puts "#{formatted_total_footer} | #{formatted_blank_footer} | "\ - "#{formatted_total_count_footer} | #{formatted_total_percent_footer}%" + "#{formatted_total_count_footer} | #{formatted_total_percent_footer}%" end def config_true?(key) diff --git a/Library/Homebrew/utils/pypi.rb b/Library/Homebrew/utils/pypi.rb index 8783284f5714a..e7782048b2b19 100644 --- a/Library/Homebrew/utils/pypi.rb +++ b/Library/Homebrew/utils/pypi.rb @@ -195,7 +195,7 @@ def update_python_resources!(formula, version: nil, package_name: nil, extra_pac input_packages.each do |existing_package| if existing_package.same_package?(extra_package) && existing_package.version != extra_package.version odie "Conflicting versions specified for the `#{extra_package.name}` package: "\ - "#{existing_package.version}, #{extra_package.version}" + "#{existing_package.version}, #{extra_package.version}" end end From f2ca012c6412aadb8e02fa7269b02dec720cb001 Mon Sep 17 00:00:00 2001 From: Nanda H Krishna Date: Fri, 2 Jul 2021 23:36:50 +0530 Subject: [PATCH 5/7] Rename `metadata_master_container_path` to `metadata_main_container_path` --- Library/Homebrew/cask/cask.rb | 4 ++-- Library/Homebrew/cask/installer.rb | 2 +- Library/Homebrew/cask/metadata.rb | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/cask/cask.rb b/Library/Homebrew/cask/cask.rb index caf666397c1a9..cb789407cb23d 100644 --- a/Library/Homebrew/cask/cask.rb +++ b/Library/Homebrew/cask/cask.rb @@ -102,11 +102,11 @@ def install_time def installed_caskfile installed_version = timestamped_versions.last - metadata_master_container_path.join(*installed_version, "Casks", "#{token}.rb") + metadata_main_container_path.join(*installed_version, "Casks", "#{token}.rb") end def config_path - metadata_master_container_path/"config.json" + metadata_main_container_path/"config.json" end def caskroom_path diff --git a/Library/Homebrew/cask/installer.rb b/Library/Homebrew/cask/installer.rb index f9faefe9cd980..ec1a00405889e 100644 --- a/Library/Homebrew/cask/installer.rb +++ b/Library/Homebrew/cask/installer.rb @@ -538,7 +538,7 @@ def purge_versioned_files @cask.metadata_versioned_path.rmdir_if_possible end - @cask.metadata_master_container_path.rmdir_if_possible unless upgrade? + @cask.metadata_main_container_path.rmdir_if_possible unless upgrade? # toplevel staged distribution @cask.caskroom_path.rmdir_if_possible unless upgrade? diff --git a/Library/Homebrew/cask/metadata.rb b/Library/Homebrew/cask/metadata.rb index 20e5b8953ffe0..c2db2e2cc0e30 100644 --- a/Library/Homebrew/cask/metadata.rb +++ b/Library/Homebrew/cask/metadata.rb @@ -9,8 +9,8 @@ module Metadata METADATA_SUBDIR = ".metadata" TIMESTAMP_FORMAT = "%Y%m%d%H%M%S.%L" - def metadata_master_container_path - @metadata_master_container_path ||= caskroom_path.join(METADATA_SUBDIR) + def metadata_main_container_path + @metadata_main_container_path ||= caskroom_path.join(METADATA_SUBDIR) end def metadata_versioned_path(version: self.version) @@ -18,7 +18,7 @@ def metadata_versioned_path(version: self.version) raise CaskError, "Cannot create metadata path with empty version." if cask_version.empty? - metadata_master_container_path.join(cask_version) + metadata_main_container_path.join(cask_version) end def metadata_timestamped_path(version: self.version, timestamp: :latest, create: false) From 4afdacd9c21c0f648dde76770e6ccfad5175cc8a Mon Sep 17 00:00:00 2001 From: Nanda H Krishna Date: Fri, 2 Jul 2021 23:37:31 +0530 Subject: [PATCH 6/7] cmd/install: tweak `--HEAD` description --- Library/Homebrew/cmd/install.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 276700e6bcd8f..f10795f30f888 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -74,7 +74,7 @@ def install_args description: "Install testing dependencies required to run `brew test` .", }], [:switch, "--HEAD", { - description: "If defines it, install the HEAD version, aka. master, trunk, unstable.", + description: "If defines it, install the HEAD version, aka. main, trunk, unstable, master.", }], [:switch, "--fetch-HEAD", { description: "Fetch the upstream repository to detect if the HEAD installation of the " \ From 0dbf112ef33fec0b54e3dfe71cb07e835036506f Mon Sep 17 00:00:00 2001 From: Nanda H Krishna Date: Fri, 2 Jul 2021 23:40:27 +0530 Subject: [PATCH 7/7] Update configuration in `Library/.rubocop.yml` --- Library/.rubocop.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index 5541d33e87784..ed43ecd1e3743 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -84,6 +84,25 @@ Naming/HeredocDelimiterNaming: ForbiddenDelimiters: - END, EOD, EOF +Naming/InclusiveLanguage: + CheckStrings: true + FlaggedTerms: + # TODO: If possible, make this stricter. + slave: + AllowedRegex: + - "gitslave" # Used in formula `gitslave` + - "log_slave" # Used in formula `ssdb` + - "ssdb_slave" # Used in formula `ssdb` + - "var_slave" # Used in formula `ssdb` + - "patches/13_fix_scope_for_show_slave_status_data.patch" # Used in formula `mytop` + blacklist: + AllowedRegex: + - "--listBlacklist" # Used in formula `xmlsectool` + whitelist: + AllowedRegex: + - "--error-white-list" # For an option passed to `srb` in dev-cmd/typecheck.rb + - "--repo-whitelist" # Used in formula `atlantis` + Naming/MethodName: IgnoredPatterns: - '\A(fetch_)?HEAD\?\Z'