language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/--prefix.rb
@@ -12,7 +12,7 @@ module Homebrew def __prefix_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `--prefix` [<formula>] + `--prefix` [<formula>] [<formula> ...] Display Homebrew's install path. *Default:*
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/--repository.rb
@@ -12,7 +12,7 @@ module Homebrew def __repository_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `--repository`, `--repo` [<user>`/`<repo>] + `--repository`, `--repo` [<user>`/`<repo>] [<user>`/`<repo> ...] Display where Homebrew's `.git` directory is located.
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/cleanup.rb
@@ -14,7 +14,7 @@ def cleanup_args Homebrew::CLI::Parser.new do days = Homebrew::EnvConfig::ENVS[:HOMEBREW_CLEANUP_MAX_AGE_DAYS][:default] usage_banner <<~EOS - `cleanup` [<options>] [<formula>|<cask>] + `cleanup` [<options>] [<formula>|<cask>] [<formula>|<cask> ...] Remove s...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/deps.rb
@@ -18,7 +18,7 @@ module Homebrew def deps_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `deps` [<options>] [<formula>] + `deps` [<options>] [<formula>] [<formula> ...] Show dependencies for <formula>. Additional options specific to <formula> may be appended to...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/desc.rb
@@ -17,7 +17,7 @@ module Homebrew def desc_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `desc` [<options>] (<text>|`/`<text>`/`|<formula>) + `desc` [<options>] <text>|`/`<text>`/`|<formula> [<text>|`/`<text>`/`|<formula> ...] Display <formula>'s name and one-line descr...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/fetch.rb
@@ -17,7 +17,7 @@ module Homebrew def fetch_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `fetch` [<options>] <formula> + `fetch` [<options>] <formula>|<cask> [<formula>|<cask> ...] Download a bottle (if available) or source packages for <formula>e and binaries...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/home.rb
@@ -13,7 +13,7 @@ module Homebrew def home_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `home` [<formula>|<cask>] + `home` [<formula>|<cask>] [<formula>|<cask> ...] Open a <formula> or <cask>'s homepage in a browser, or open Homebrew's own homepage if no argum...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/info.rb
@@ -25,7 +25,7 @@ module Homebrew def info_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `info` [<options>] [<formula>|<cask>] + `info` [<options>] [<formula>|<cask>] [<formula>|<cask> ...] Display brief statistics for your Homebrew installation.
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/install.rb
@@ -24,7 +24,7 @@ module Homebrew def install_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `install` [<options>] <formula>|<cask> + `install` [<options>] <formula>|<cask> [<formula>|<cask> ...] Install a <formula> or <cask>. Additional options specific to a <formula> m...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/link.rb
@@ -15,7 +15,7 @@ module Homebrew def link_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `link`, `ln` [<options>] <formula> + `link`, `ln` [<options>] <formula> [<formula> ...] Symlink all of <formula>'s installed files into Homebrew's prefix. This is done auto...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/list.rb
@@ -15,7 +15,7 @@ module Homebrew def list_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `list`, `ls` [<options>] [<formula>|<cask>] + `list`, `ls` [<options>] [<formula>|<cask>] [<formula>|<cask> ...] List all installed formulae and casks.
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/migrate.rb
@@ -13,7 +13,7 @@ module Homebrew def migrate_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `migrate` [<options>] <formula> + `migrate` [<options>] <formula> [<formula> ...] Migrate renamed packages to new names, where <formula> are old names of packages.
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/missing.rb
@@ -15,7 +15,7 @@ module Homebrew def missing_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `missing` [<options>] [<formula>] + `missing` [<options>] [<formula>] [<formula> ...] Check the given <formula> kegs for missing dependencies. If no <formula> are provid...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/options.rb
@@ -15,7 +15,7 @@ module Homebrew def options_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `options` [<options>] [<formula>] + `options` [<options>] [<formula>] [<formula> ...] Show install options specific to <formula>. EOS
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/outdated.rb
@@ -16,7 +16,7 @@ module Homebrew def outdated_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `outdated` [<options>] [<formula>|<cask>] + `outdated` [<options>] [<formula>|<cask>] [<formula>|<cask> ...] List installed casks and formulae that have an updated version avail...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/pin.rb
@@ -13,7 +13,7 @@ module Homebrew def pin_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `pin` <formula> + `pin` <formula> [<formula> ...] Pin the specified <formula>, preventing them from being upgraded when issuing the `brew upgrade` <formula> command. See als...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/postinstall.rb
@@ -14,7 +14,7 @@ module Homebrew def postinstall_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `postinstall` <formula> + `postinstall` <formula> [<formula> ...] Rerun the post-install steps for <formula>. EOS
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/readall.rb
@@ -13,7 +13,7 @@ module Homebrew def readall_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `readall` [<options>] [<tap>] + `readall` [<options>] [<tap>] [<tap> ...] Import all items from the specified <tap>, or from all installed taps if none is provided. This...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/reinstall.rb
@@ -22,7 +22,7 @@ module Homebrew def reinstall_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `reinstall` [<options>] <formula>|<cask> + `reinstall` [<options>] <formula>|<cask> [<formula>|<cask> ...] Uninstall and then reinstall a <formula> or <cask> using the same opt...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/search.rb
@@ -31,7 +31,7 @@ module Homebrew def search_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `search` [<options>] [<text>|`/`<text>`/`] + `search` [<options>] [<text>|`/`<text>`/`] [<text>|`/`<text>`/` ...] Perform a substring search of cask tokens and formula names for <...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/switch.rb
@@ -19,7 +19,7 @@ def switch_args Symlink all of the specified <version> of <formula>'s installation into Homebrew's prefix. EOS - named 2 + named_args number: 2 hide_from_man_page! end end
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/tap-info.rb
@@ -12,7 +12,7 @@ module Homebrew def tap_info_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `tap-info` [<options>] [<tap>] + `tap-info` [<options>] [<tap>] [<tap> ...] Show detailed information about one or more <tap>s.
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/uninstall.rb
@@ -19,7 +19,7 @@ module Homebrew def uninstall_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `uninstall`, `rm`, `remove` [<options>] <formula>|<cask> + `uninstall`, `rm`, `remove` [<options>] <formula>|<cask> [<formula>|<cask> ...] Uninstall a <formula> or <cask>. ...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/unlink.rb
@@ -14,7 +14,7 @@ module Homebrew def unlink_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `unlink` [<options>] <formula> + `unlink` [<options>] <formula> [<formula> ...] Remove symlinks for <formula> from Homebrew's prefix. This can be useful for temporarily d...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/unpin.rb
@@ -13,7 +13,7 @@ module Homebrew def unpin_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `unpin` <formula> + `unpin` <formula> [<formula> ...] Unpin <formula>, allowing them to be upgraded by `brew upgrade` <formula>. See also `pin`.
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/untap.rb
@@ -12,7 +12,7 @@ module Homebrew def untap_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `untap` <tap> + `untap` <tap> [<tap> ...] Remove a tapped formula repository. EOS
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/update-reset.sh
@@ -1,4 +1,4 @@ -#: * `update-reset` [<repository>] +#: * `update-reset` [<repository>] [<repository> ...] #: #: Fetch and reset Homebrew and all tap repositories (or any specified <repository>) using `git`(1) to their latest `origin/master`. #:
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/upgrade.rb
@@ -18,7 +18,7 @@ module Homebrew def upgrade_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `upgrade` [<options>] [<formula>|<cask>] + `upgrade` [<options>] [<formula>|<cask>] [<formula>|<cask> ...] Upgrade outdated casks and outdated, unpinned formulae using the same o...
true
Other
Homebrew
brew
332372469fd38cec8bedebaf49c1cd7fce0de4a3.json
cmd: indicate multiple named args in usage banner
Library/Homebrew/cmd/uses.rb
@@ -21,7 +21,7 @@ module Homebrew def uses_args Homebrew::CLI::Parser.new do usage_banner <<~EOS - `uses` [<options>] <formula> + `uses` [<options>] <formula> [<formula> ...] Show formulae and casks that specify <formula> as a dependency (i.e. show dependents of <formula...
true
Other
Homebrew
brew
eebc161ea51aa74a93ce3394aeab72a35a57ed04.json
Incorporate suggestions from code review Co-Authored-By: Seeker <meaningseeking@protonmail.com>
Library/Homebrew/cli/parser.rb
@@ -539,7 +539,7 @@ def check_named_args(args) def process_option(*args) option, = @parser.make_switch(args) - @processed_options.reject! { |existing| option.long.first.present? && existing.second == option.long.first } + @processed_options.reject! { |existing| existing.second == option....
true
Other
Homebrew
brew
eebc161ea51aa74a93ce3394aeab72a35a57ed04.json
Incorporate suggestions from code review Co-Authored-By: Seeker <meaningseeking@protonmail.com>
Library/Homebrew/cmd/options.rb
@@ -39,8 +39,10 @@ def options puts_options Formula.to_a.sort, args: args elsif args.installed? puts_options Formula.installed.sort, args: args - elsif !args.command.nil? + elsif args.command.present? cmd_options = Commands.command_options(args.command) + odie "Unknown command: #{ar...
true
Other
Homebrew
brew
eebc161ea51aa74a93ce3394aeab72a35a57ed04.json
Incorporate suggestions from code review Co-Authored-By: Seeker <meaningseeking@protonmail.com>
Library/Homebrew/commands.rb
@@ -197,7 +197,7 @@ def rebuild_commands_completion_list HOMEBREW_CACHE.mkpath cmds = commands(aliases: true).reject do |cmd| - # TODO: remove the cask check when `brew cask` is removed + # TODO: (2.8) remove the cask check when `brew cask` is removed cmd.start_with?("cask ") || Homebrew::C...
true
Other
Homebrew
brew
3af16832d9baa6ebe3d85701734720d0fe75bea4.json
Generate bash completions automatically
Library/Homebrew/cli/parser.rb
@@ -16,7 +16,7 @@ module CLI class Parser extend T::Sig - attr_reader :processed_options, :hide_from_man_page + attr_reader :processed_options, :hide_from_man_page, :named_args_type def self.from_cmd_path(cmd_path) cmd_args_method_name = Commands.args_method_name(cmd_path) @@ -...
true
Other
Homebrew
brew
3af16832d9baa6ebe3d85701734720d0fe75bea4.json
Generate bash completions automatically
Library/Homebrew/cmd/options.rb
@@ -3,8 +3,6 @@ require "formula" require "options" -require "cli/parser" -require "commands" module Homebrew extend T::Sig @@ -42,15 +40,7 @@ def options elsif args.installed? puts_options Formula.installed.sort, args: args elsif !args.command.nil? - path = Commands.path(args.command) -...
true
Other
Homebrew
brew
3af16832d9baa6ebe3d85701734720d0fe75bea4.json
Generate bash completions automatically
Library/Homebrew/cmd/upgrade.rb
@@ -90,7 +90,7 @@ def upgrade_args conflicts "--build-from-source", "--force-bottle" - named_args [:installed_formula, :installed_cask] + named_args [:outdated_formula, :outdated_cask] end end
true
Other
Homebrew
brew
3af16832d9baa6ebe3d85701734720d0fe75bea4.json
Generate bash completions automatically
Library/Homebrew/commands.rb
@@ -2,6 +2,7 @@ # frozen_string_literal: true require "cask/cmd" +require "completions" # Helper functions for commands. # @@ -91,10 +92,10 @@ def path(cmd) path end - def commands(aliases: false) + def commands(external: true, aliases: false) cmds = internal_commands cmds += internal_deve...
true
Other
Homebrew
brew
3af16832d9baa6ebe3d85701734720d0fe75bea4.json
Generate bash completions automatically
Library/Homebrew/completions.rb
@@ -3,6 +3,7 @@ require "utils/link" require "settings" +require "erb" module Homebrew # Helper functions for generating shell completions. @@ -13,7 +14,28 @@ module Completions module_function + COMPLETIONS_DIR = (HOMEBREW_REPOSITORY/"completions").freeze + TEMPLATE_DIR = (HOMEBREW_LIBRARY_PAT...
true
Other
Homebrew
brew
3af16832d9baa6ebe3d85701734720d0fe75bea4.json
Generate bash completions automatically
Library/Homebrew/completions/bash.erb
@@ -0,0 +1,167 @@ +<% +# To make changes to the completions: +# +# - For changes to a command under `COMMANDS` or `DEVELOPER COMMANDS` sections): +# - Find the source file in `Library/Homebrew/[dev-]cmd/<command>.{rb,sh}`. +# - For `.rb` files, edit the `<command>_args` method. +# - For `.sh` files, edit the top ...
true
Other
Homebrew
brew
3af16832d9baa6ebe3d85701734720d0fe75bea4.json
Generate bash completions automatically
Library/Homebrew/dev-cmd/man.rb
@@ -5,6 +5,7 @@ require "erb" require "ostruct" require "cli/parser" +require "completions" module Homebrew extend T::Sig @@ -42,6 +43,7 @@ def man Commands.rebuild_internal_commands_completion_list regenerate_man_pages(preserve_date: args.fail_if_changed?, quiet: args.quiet?) + Completions.upda...
true
Other
Homebrew
brew
3af16832d9baa6ebe3d85701734720d0fe75bea4.json
Generate bash completions automatically
completions/bash/brew
@@ -54,29 +54,34 @@ __brew_complete_formulae() { COMPREPLY=($(compgen -W "$formulae" -- "$cur")) } -__brew_complete_installed() { +__brew_complete_casks() { local cur="${COMP_WORDS[COMP_CWORD]}" - local inst="$(command ls "$(brew --cellar)" 2>/dev/null)" - COMPREPLY=($(compgen -W "$inst" -- "$cur")) + local...
true
Other
Homebrew
brew
3af16832d9baa6ebe3d85701734720d0fe75bea4.json
Generate bash completions automatically
completions/internal_commands_list.txt
@@ -46,7 +46,6 @@ help home homepage info -instal install install-bundler-gems irb @@ -92,7 +91,6 @@ test tests typecheck unbottled -uninstal uninstall unlink unpack @@ -102,7 +100,6 @@ up update update-license-data update-python-resources -update-report update-reset update-test upgrade
true
Other
Homebrew
brew
1d8372cbc86cb5391140e8b78b61de59496045f8.json
rubocops/*: improve test descriptions
Library/Homebrew/test/rubocops/components_order_spec.rb
@@ -6,7 +6,7 @@ describe RuboCop::Cop::FormulaAudit::ComponentsOrder do subject(:cop) { described_class.new } - context "When auditing formula components order" do + context "when auditing formula components order" do it "reports and corrects an offense when `uses_from_macos` precedes `depends_on`" do ...
true
Other
Homebrew
brew
1d8372cbc86cb5391140e8b78b61de59496045f8.json
rubocops/*: improve test descriptions
Library/Homebrew/test/rubocops/files_spec.rb
@@ -6,8 +6,8 @@ describe RuboCop::Cop::FormulaAudit::Files do subject(:cop) { described_class.new } - context "When auditing files" do - it "when the permissions are invalid" do + context "when auditing files" do + it "reports an offense when the permissions are invalid" do filename = Formulary.cor...
true
Other
Homebrew
brew
1d8372cbc86cb5391140e8b78b61de59496045f8.json
rubocops/*: improve test descriptions
Library/Homebrew/test/rubocops/homepage_spec.rb
@@ -6,7 +6,7 @@ describe RuboCop::Cop::FormulaAudit::Homepage do subject(:cop) { described_class.new } - context "When auditing homepage" do + context "when auditing homepage" do it "reports an offense when there is no homepage" do expect_offense(<<~RUBY) class Foo < Formula
true
Other
Homebrew
brew
1d8372cbc86cb5391140e8b78b61de59496045f8.json
rubocops/*: improve test descriptions
Library/Homebrew/test/rubocops/lines_spec.rb
@@ -62,7 +62,7 @@ class Foo < Formula describe RuboCop::Cop::FormulaAudit::ClassInheritance do subject(:cop) { described_class.new } - context "auditing formula class inheritance" do + context "when auditing formula class inheritance" do it "reports an offense when not using spaces for class inheritance" d...
true
Other
Homebrew
brew
1d8372cbc86cb5391140e8b78b61de59496045f8.json
rubocops/*: improve test descriptions
Library/Homebrew/test/rubocops/options_spec.rb
@@ -6,7 +6,7 @@ describe RuboCop::Cop::FormulaAudit::Options do subject(:cop) { described_class.new } - context "When auditing options" do + context "when auditing options" do it "reports an offense when using the 32-bit option" do expect_offense(<<~RUBY) class Foo < Formula
true
Other
Homebrew
brew
1d8372cbc86cb5391140e8b78b61de59496045f8.json
rubocops/*: improve test descriptions
Library/Homebrew/test/rubocops/patches_spec.rb
@@ -6,8 +6,8 @@ describe RuboCop::Cop::FormulaAudit::Patches do subject(:cop) { described_class.new } - context "When auditing legacy patches" do - it "reports no offenses when there is no legacy patch" do + context "when auditing legacy patches" do + it "reports no offenses if there is no legacy patch" d...
true
Other
Homebrew
brew
1d8372cbc86cb5391140e8b78b61de59496045f8.json
rubocops/*: improve test descriptions
Library/Homebrew/test/rubocops/urls_spec.rb
@@ -183,8 +183,8 @@ }] } - context "When auditing urls" do - it "with offenses" do + context "when auditing URLs" do + it "reports any offenses" do formulae.each do |formula| allow_any_instance_of(RuboCop::Cop::FormulaCop).to receive(:formula_tap) ...
true
Other
Homebrew
brew
1d8372cbc86cb5391140e8b78b61de59496045f8.json
rubocops/*: improve test descriptions
Library/Homebrew/test/rubocops/version_spec.rb
@@ -6,8 +6,8 @@ describe RuboCop::Cop::FormulaAudit::Version do subject(:cop) { described_class.new } - context "When auditing version" do - it "version should not be an empty string" do + context "when auditing version" do + it "reports an offense if `version` is an empty string" do expect_offense...
true
Other
Homebrew
brew
3893cb312ed89223b866217b0418554d72964510.json
rubocops/text: improve test descriptions
Library/Homebrew/test/rubocops/text_spec.rb
@@ -6,8 +6,8 @@ describe RuboCop::Cop::FormulaAudit::Text do subject(:cop) { described_class.new } - context "When auditing formula text" do - it "with `require \"formula\"` is present" do + context "when auditing formula text" do + it 'reports an offense if `require "formula"` is present' do expec...
false
Other
Homebrew
brew
4710be2fb3a6f76c06a118f6d41e3c289c3f8324.json
parser: add some more tests
Library/Homebrew/test/cli/parser_spec.rb
@@ -397,6 +397,13 @@ expect { parser.parse([]) }.to raise_error(Homebrew::CLI::MinNamedArgumentsError) end + it "treats a symbol as a single argument of the specified type" do + formula_parser = described_class.new do + named :formula + end + expect { formula_parser.parse([]) }.to...
false
Other
Homebrew
brew
74c101025616c98bc5774a9a84a7c34311c886d1.json
parser: add tests for named methods
Library/Homebrew/cli/parser.rb
@@ -519,7 +519,7 @@ def check_constraint_violations def check_named_args(args) exception = if @min_named_args && args.size < @min_named_args if @named_args_type.present? - types = @named_args_type.is_a?(Array) ? @named_args_type : [@named_args_type] + types = Array(@name...
true
Other
Homebrew
brew
74c101025616c98bc5774a9a84a7c34311c886d1.json
parser: add tests for named methods
Library/Homebrew/test/cli/parser_spec.rb
@@ -317,4 +317,128 @@ expect(args.named).to be_empty end end + + describe "named_args" do + let(:parser_none) { + described_class.new do + named_args :none + end + } + let(:parser_number) { + described_class.new do + named_args number: 1 + end + } + + it ...
true
Other
Homebrew
brew
fb29dec0de185c8154c602612e4638d3b878a33f.json
Improve livecheck docs.
docs/Brew-Livecheck.md
@@ -11,7 +11,7 @@ When livecheck isn't given instructions for how to check for upstream versions, 1. If a strategy can be applied, use it to check for new versions. 1. Return the newest version (or an error if versions could not be found at any available URLs). -It's sometimes necessary to override this default beh...
false
Other
Homebrew
brew
128aeba3a4d255c31066541f9828fe211b8e1f9d.json
Keg: fix alias and versioned symlink handling. Previously, `brew upgrade gcc@10` could get overzealous and remove the `LinkedKeg` record for `gcc@9`. This is bad because we then think `gcc@9` is unlinked when it is not and it causes a tonne of conflicts when trying to link `gcc@9` again. Instead, fix up the alias and...
Library/Homebrew/keg.rb
@@ -301,28 +301,16 @@ def remove_old_aliases # versioned aliases are handled below next if a.match?(/.+@./) - alias_opt_symlink = opt/a - if alias_opt_symlink.symlink? && alias_opt_symlink.exist? - alias_opt_symlink.delete if alias_opt_symlink.realpath == opt_record.realpath - elsi...
false
Other
Homebrew
brew
591e9d6a52559c8d0e95140bd08c0666f9535705.json
dev-cmd/tap-new: fix output on newer versions of Git. Otherwise this prints to `stderr` to ask for configuration of the branch name: https://github.com/Homebrew/brew/pull/10323/checks?check_run_id=1701105141#step:5:51
Library/Homebrew/dev-cmd/tap-new.rb
@@ -148,7 +148,9 @@ def tap_new unless args.no_git? cd tap.path do - safe_system "git", "init" + # Would be nice to use --initial-branch here but it's not available in + # older versions of Git that we support. + safe_system "git", "-c", "init.defaultBranch=#{branch}", "init" ...
false
Other
Homebrew
brew
9b4fea602b474100a5fd8ac8a9f059db8bcddd59.json
install: add workaround for rosetta2 path error msg It's possible the user's terminal emulator is running under rosetta2. Consequently, the i86_64 version of the ruby interpreter will be used. Likely, the right thing to do is simply install the arm64 version of the requested package. This can be accomplished using: ar...
Library/Homebrew/install.rb
@@ -32,12 +32,16 @@ def perform_build_from_source_checks(all_fatal: false) def check_prefix if (Hardware::CPU.intel? || Hardware::CPU.in_rosetta2?) && HOMEBREW_PREFIX.to_s == HOMEBREW_MACOS_ARM_DEFAULT_PREFIX - configuration = if Hardware::CPU.in_rosetta2? - "under Rosetta 2" + ...
false
Other
Homebrew
brew
7592f568f13bfa9e5d5868a4880ba64146aac884.json
sorbet: Update RBI files. Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
@@ -5346,6 +5346,11 @@ class Cask::Config def vst_plugindir=(path); end end +class Cask::Config + extend ::T::Private::Methods::MethodHooks + extend ::T::Private::Methods::SingletonMethodHooks +end + class Cask::DSL::Caveats def depends_on_java(*args); end @@ -7698,6 +7703,11 @@ class Homebrew::CLI::Parse...
false
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cli/named_args.rb
@@ -188,6 +188,18 @@ def to_kegs_to_casks(only: parent&.only_formula_or_cask, ignore_unavailable: nil .map(&:freeze).freeze end + sig { returns(T::Array[Tap]) } + def to_taps + @to_taps ||= downcased_unique_named.map { |name| Tap.fetch name }.uniq.freeze + end + + sig { re...
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cli/parser.rb
@@ -126,9 +126,9 @@ def initialize(&block) @conflicts = [] @switch_sources = {} @processed_options = [] + @named_args_type = nil @max_named_args = nil @min_named_args = nil - @min_named_type = nil @hide_from_man_page = false @formula_options =...
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/--cache.rb
@@ -32,6 +32,8 @@ def __cache_args description: "Only show cache files for casks." conflicts "--build-from-source", "--force-bottle" conflicts "--formula", "--cask" + + named_args [:formula, :cask] end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/--caskroom.rb
@@ -17,6 +17,8 @@ def __caskroom_args If <cask> is provided, display the location in the Caskroom where <cask> would be installed, without any sort of versioned directory as the last path. EOS + + named_args :cask end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/--cellar.rb
@@ -17,6 +17,8 @@ def __cellar_args If <formula> is provided, display the location in the Cellar where <formula> would be installed, without any sort of versioned directory as the last path. EOS + + named_args :formula end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/--env.rb
@@ -27,6 +27,8 @@ def __env_args "or `--shell=auto` to detect the current shell." switch "--plain", description: "Generate plain output even when piped." + + named_args :formula end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/--prefix.rb
@@ -25,6 +25,8 @@ def __prefix_args EOS switch "--unbrewed", description: "List files in Homebrew's prefix not installed by Homebrew." + + named_args :formula end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/--repository.rb
@@ -18,6 +18,8 @@ def __repository_args If <user>`/`<repo> are provided, display where tap <user>`/`<repo>'s directory is located. EOS + + named_args :tap end end @@ -27,7 +29,7 @@ def __repository if args.no_named? puts HOMEBREW_REPOSITORY else - puts args.named.m...
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/--version.rb
@@ -18,7 +18,7 @@ def __version_args (if tapped) to standard output. EOS - max_named 0 + named_args :none end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/analytics.rb
@@ -27,7 +27,7 @@ def analytics_args Regenerate the UUID used for Homebrew's analytics. EOS - max_named 1 + named_args %w[state on off regenerate-uuid], max: 1 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/autoremove.rb
@@ -18,7 +18,7 @@ def autoremove_args switch "-n", "--dry-run", description: "List what would be uninstalled, but do not actually uninstall anything." - max_named 0 + named_args :none end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/cleanup.rb
@@ -31,6 +31,8 @@ def cleanup_args "If you want to delete those too: `rm -rf \"$(brew --cache)\"`" switch "--prune-prefix", description: "Only prune the symlinks and directories from the prefix and remove no other files." + + named_args [:formula, :cask] end ...
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/commands.rb
@@ -22,7 +22,7 @@ def commands_args depends_on: "--quiet", description: "Include aliases of internal commands." - max_named 0 + named_args :none end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/completions.rb
@@ -25,7 +25,7 @@ def completions_args Link or unlink Homebrew's completions. EOS - max_named 1 + named_args %w[state link unlink], max: 1 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/config.rb
@@ -19,7 +19,7 @@ def config_args a bug report, you will be required to provide this information. EOS - max_named 0 + named_args :none end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/deps.rb
@@ -66,6 +66,8 @@ def deps_args conflicts "--installed", "--all" conflicts "--formula", "--cask" formula_options + + named_args [:formula, :cask] end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/desc.rb
@@ -34,7 +34,8 @@ def desc_args "it is interpreted as a regular expression." conflicts "--search", "--name", "--description" - min_named 1 + + named_args :formula end end @@ -50,10 +51,14 @@ def desc end results = if search_type.nil? + raise Formu...
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/doctor.rb
@@ -27,6 +27,8 @@ def doctor_args "if provided as arguments." switch "-D", "--audit-debug", description: "Enable debugging and profiling of audit methods." + + named_args :diagnostic_check end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/fetch.rb
@@ -58,7 +58,7 @@ def fetch_args conflicts "--cask", "--build-bottle" conflicts "--cask", "--force-bottle" - min_named :formula_or_cask + named_args [:formula, :cask], min: 1 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/gist-logs.rb
@@ -33,7 +33,7 @@ def gist_logs_args description: "The Gist will be marked private and will not appear in listings but will "\ "be accessible with its link." - named :formula + named_args :formula, number: 1 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/home.rb
@@ -23,6 +23,8 @@ def home_args switch "--cask", "--casks", description: "Treat all named arguments as casks." conflicts "--formula", "--cask" + + named_args [:formula, :cask] end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/info.rb
@@ -68,6 +68,8 @@ def info_args conflicts "--formula", "--cask" conflicts "--installed", "--all" + + named_args [:formula, :cask] end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/install.rb
@@ -125,7 +125,8 @@ def install_args conflicts "--ignore-dependencies", "--only-dependencies" conflicts "--build-from-source", "--build-bottle", "--force-bottle" - min_named :formula_or_cask + + named_args [:formula, :cask], min: 1 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/leaves.rb
@@ -18,7 +18,7 @@ def leaves_args List installed formulae that are not dependencies of another installed formula. EOS - max_named 0 + named_args :none end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/link.rb
@@ -29,7 +29,7 @@ def link_args switch "-f", "--force", description: "Allow keg-only formulae to be linked." - min_named :keg + named_args :installed_formula, min: 1 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/list.rb
@@ -72,6 +72,8 @@ def list_args conflicts "--full-name", flag conflicts "--cask", flag end + + named_args [:installed_formula, :installed_cask] end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/log.rb
@@ -30,7 +30,8 @@ def log_args description: "Print only a specified number of commits." conflicts "-1", "--max-count" - max_named 1 + + named_args :formula, max: 1 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/migrate.rb
@@ -22,7 +22,7 @@ def migrate_args description: "Treat installed <formula> and provided <formula> as if they are from "\ "the same taps and migrate them anyway." - min_named :formula + named_args :installed_formula, min: 1 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/missing.rb
@@ -24,6 +24,8 @@ def missing_args comma_array "--hide", description: "Act as if none of the specified <hidden> are installed. <hidden> should be "\ "a comma-separated list of formulae." + + named_args :formula end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/options.rb
@@ -29,6 +29,8 @@ def options_args description: "Show options for the specified <command>." conflicts "--installed", "--all", "--command" + + named_args :formula end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/outdated.rb
@@ -42,6 +42,8 @@ def outdated_args conflicts "--quiet", "--verbose", "--json" conflicts "--formula", "--cask" + + named_args [:formula, :cask] end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/pin.rb
@@ -19,7 +19,7 @@ def pin_args issuing the `brew upgrade` <formula> command. See also `unpin`. EOS - min_named :formula + named_args :installed_formula, min: 1 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/postinstall.rb
@@ -19,7 +19,7 @@ def postinstall_args Rerun the post-install steps for <formula>. EOS - min_named :keg + named_args :installed_formula, min: 1 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/readall.rb
@@ -24,6 +24,8 @@ def readall_args description: "Verify any alias symlinks in each tap." switch "--syntax", description: "Syntax-check all of Homebrew's Ruby files (if no `<tap>` is passed)." + + named_args :tap end end @@ -41,7 +43,7 @@ def readall taps = if args....
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/reinstall.rb
@@ -75,7 +75,8 @@ def reinstall_args cask_options conflicts "--build-from-source", "--force-bottle" - min_named :formula_or_cask + + named_args [:formula, :cask], min: 1 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/search.rb
@@ -66,6 +66,9 @@ def search_args conflicts("--desc", "--pull-request") conflicts(*package_manager_switches) + + # TODO: (2.9) uncomment when the `odeprecated`/`odisabled` for `brew search` with no arguments is removed + # named_args min: 1 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/tap-info.rb
@@ -24,6 +24,8 @@ def tap_info_args description: "Print a JSON representation of <tap>. Currently the default and only accepted "\ "value for <version> is `v1`. See the docs for examples of using the JSON "\ "output: <https://docs.brew.sh/Querying-Brew...
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/tap.rb
@@ -41,7 +41,7 @@ def tap_args switch "--list-pinned", description: "List all pinned taps." - max_named 2 + named_args :tap, max: 2 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/uninstall.rb
@@ -40,7 +40,7 @@ def uninstall_args description: "Treat all named arguments as casks." conflicts "--formula", "--cask" - min_named :formula_or_cask + named_args [:installed_formula, :installed_cask], min: 1 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/unlink.rb
@@ -24,7 +24,7 @@ def unlink_args description: "List files which would be unlinked without actually unlinking or "\ "deleting any files." - min_named :keg + named_args :installed_formula, min: 1 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/unpin.rb
@@ -19,7 +19,7 @@ def unpin_args See also `pin`. EOS - min_named :formula + named_args :installed_formula, min: 1 end end
true
Other
Homebrew
brew
da811373d3f876da72d53c2828fd4cacefdba210.json
Add named_args DSL for commands
Library/Homebrew/cmd/untap.rb
@@ -17,15 +17,14 @@ def untap_args Remove a tapped formula repository. EOS - min_named 1 + named_args :tap, min: 1 end end def untap args = untap_args.parse - args.named.each do |tapname| - tap = Tap.fetch(tapname) + args.named.to_installed_taps.each do |tap| ...
true