From c4f72312cee25421a519425b159972198f1a39ad Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 30 Apr 2019 08:44:35 +0100 Subject: [PATCH] Fixup `brew style` failures. --- Library/Homebrew/brew.rb | 2 +- Library/Homebrew/cask/artifact/relocated.rb | 8 +- Library/Homebrew/cask/artifact/symlinked.rb | 8 +- Library/Homebrew/cask/cmd/internal_stanza.rb | 8 +- Library/Homebrew/cask/installer.rb | 22 ++--- Library/Homebrew/cleanup.rb | 4 +- Library/Homebrew/cmd/--cache.rb | 4 +- Library/Homebrew/cmd/--env.rb | 6 +- Library/Homebrew/cmd/analytics.rb | 6 +- Library/Homebrew/cmd/cleanup.rb | 12 +-- Library/Homebrew/cmd/commands.rb | 6 +- Library/Homebrew/cmd/deps.rb | 38 ++++----- Library/Homebrew/cmd/desc.rb | 12 +-- Library/Homebrew/cmd/diy.rb | 4 +- Library/Homebrew/cmd/doctor.rb | 4 +- Library/Homebrew/cmd/fetch.rb | 24 +++--- Library/Homebrew/cmd/gist-logs.rb | 10 +-- Library/Homebrew/cmd/info.rb | 42 +++++----- Library/Homebrew/cmd/install.rb | 80 +++++++++---------- Library/Homebrew/cmd/link.rb | 8 +- Library/Homebrew/cmd/list.rb | 32 ++++---- Library/Homebrew/cmd/log.rb | 8 +- Library/Homebrew/cmd/migrate.rb | 4 +- Library/Homebrew/cmd/missing.rb | 4 +- Library/Homebrew/cmd/options.rb | 6 +- Library/Homebrew/cmd/outdated.rb | 16 ++-- Library/Homebrew/cmd/reinstall.rb | 20 ++--- Library/Homebrew/cmd/search.rb | 10 +-- Library/Homebrew/cmd/sh.rb | 2 +- Library/Homebrew/cmd/style.rb | 12 +-- Library/Homebrew/cmd/tap-info.rb | 8 +- Library/Homebrew/cmd/tap-pin.rb | 2 +- Library/Homebrew/cmd/tap-unpin.rb | 2 +- Library/Homebrew/cmd/tap.rb | 16 ++-- Library/Homebrew/cmd/uninstall.rb | 6 +- Library/Homebrew/cmd/unlink.rb | 4 +- Library/Homebrew/cmd/unpack.rb | 8 +- Library/Homebrew/cmd/update-report.rb | 2 +- Library/Homebrew/cmd/upgrade.rb | 28 +++---- Library/Homebrew/cmd/uses.rb | 16 ++-- Library/Homebrew/dependency_collector.rb | 2 +- Library/Homebrew/dev-cmd/audit.rb | 42 +++++----- Library/Homebrew/dev-cmd/bottle.rb | 40 +++++----- Library/Homebrew/dev-cmd/bump-formula-pr.rb | 44 +++++----- Library/Homebrew/dev-cmd/create.rb | 20 ++--- Library/Homebrew/dev-cmd/extract.rb | 2 +- Library/Homebrew/dev-cmd/irb.rb | 6 +- Library/Homebrew/dev-cmd/linkage.rb | 12 +-- Library/Homebrew/dev-cmd/man.rb | 10 +-- Library/Homebrew/dev-cmd/pull.rb | 24 +++--- Library/Homebrew/dev-cmd/release-notes.rb | 2 +- Library/Homebrew/dev-cmd/ruby.rb | 2 +- Library/Homebrew/dev-cmd/test.rb | 6 +- Library/Homebrew/dev-cmd/tests.rb | 16 ++-- Library/Homebrew/dev-cmd/update-test.rb | 8 +- Library/Homebrew/download_strategy.rb | 2 +- .../extend/os/mac/unpack_strategy/zip.rb | 6 +- Library/Homebrew/formula_installer.rb | 4 +- Library/Homebrew/formulary.rb | 8 +- Library/Homebrew/keg.rb | 4 +- Library/Homebrew/patch.rb | 4 +- .../requirements/codesign_requirement.rb | 2 +- .../Homebrew/requirements/java_requirement.rb | 2 +- Library/Homebrew/rubocops.rb | 1 + .../artifact/shared_examples/uninstall_zap.rb | 2 +- Library/Homebrew/test/cask/cmd/style_spec.rb | 2 +- .../spec/shared_context/integration_test.rb | 4 +- Library/Homebrew/test/tap_spec.rb | 2 +- Library/Homebrew/test/utils/git_spec.rb | 4 +- Library/Homebrew/test/utils/svn_spec.rb | 4 +- Library/Homebrew/utils/analytics.rb | 14 ++-- Library/Homebrew/utils/bottles.rb | 2 +- 72 files changed, 409 insertions(+), 408 deletions(-) diff --git a/Library/Homebrew/brew.rb b/Library/Homebrew/brew.rb index 9c2b77c733..e29bc89cfa 100644 --- a/Library/Homebrew/brew.rb +++ b/Library/Homebrew/brew.rb @@ -72,7 +72,7 @@ begin if internal_dev_cmd && !ARGV.homebrew_developer? if (HOMEBREW_REPOSITORY/".git/config").exist? system "git", "config", "--file=#{HOMEBREW_REPOSITORY}/.git/config", - "--replace-all", "homebrew.devcmdrun", "true" + "--replace-all", "homebrew.devcmdrun", "true" end ENV["HOMEBREW_DEV_CMD_RUN"] = "1" end diff --git a/Library/Homebrew/cask/artifact/relocated.rb b/Library/Homebrew/cask/artifact/relocated.rb index 55d7efdc83..81e47f73c9 100644 --- a/Library/Homebrew/cask/artifact/relocated.rb +++ b/Library/Homebrew/cask/artifact/relocated.rb @@ -62,8 +62,8 @@ module Cask odebug "Adding #{ALT_NAME_ATTRIBUTE} metadata" altnames = command.run("/usr/bin/xattr", - args: ["-p", ALT_NAME_ATTRIBUTE, file], - print_stderr: false).stdout.sub(/\A\((.*)\)\Z/, '\1') + args: ["-p", ALT_NAME_ATTRIBUTE, file], + print_stderr: false).stdout.sub(/\A\((.*)\)\Z/, '\1') odebug "Existing metadata is: '#{altnames}'" altnames.concat(", ") unless altnames.empty? altnames.concat(%Q("#{altname}")) @@ -73,8 +73,8 @@ module Cask command.run!("/bin/chmod", args: ["--", "u+rw", file, file.realpath]) command.run!("/usr/bin/xattr", - args: ["-w", ALT_NAME_ATTRIBUTE, altnames, file], - print_stderr: false) + args: ["-w", ALT_NAME_ATTRIBUTE, altnames, file], + print_stderr: false) end def printable_target diff --git a/Library/Homebrew/cask/artifact/symlinked.rb b/Library/Homebrew/cask/artifact/symlinked.rb index 8043f0a843..7acb7e9694 100644 --- a/Library/Homebrew/cask/artifact/symlinked.rb +++ b/Library/Homebrew/cask/artifact/symlinked.rb @@ -40,14 +40,14 @@ module Cask def link(**options) unless source.exist? raise CaskError, - "It seems the #{self.class.link_type_english_name.downcase} " \ - "source '#{source}' is not there." + "It seems the #{self.class.link_type_english_name.downcase} " \ + "source '#{source}' is not there." end if target.exist? && !target.symlink? raise CaskError, - "It seems there is already #{self.class.english_article} " \ - "#{self.class.english_name} at '#{target}'; not linking." + "It seems there is already #{self.class.english_article} " \ + "#{self.class.english_name} at '#{target}'; not linking." end ohai "Linking #{self.class.english_name} '#{source.basename}' to '#{target}'." diff --git a/Library/Homebrew/cask/cmd/internal_stanza.rb b/Library/Homebrew/cask/cmd/internal_stanza.rb index 9095614e10..578e5f06f4 100644 --- a/Library/Homebrew/cask/cmd/internal_stanza.rb +++ b/Library/Homebrew/cask/cmd/internal_stanza.rb @@ -49,10 +49,10 @@ module Cask return if DSL::DSL_METHODS.include?(stanza) raise ArgumentError, - <<~EOS - Unknown/unsupported stanza: '#{stanza}' - Check Cask reference for supported stanzas. - EOS + <<~EOS + Unknown/unsupported stanza: '#{stanza}' + Check Cask reference for supported stanzas. + EOS end def run diff --git a/Library/Homebrew/cask/installer.rb b/Library/Homebrew/cask/installer.rb index d59d7d3b4f..6cacf6da92 100644 --- a/Library/Homebrew/cask/installer.rb +++ b/Library/Homebrew/cask/installer.rb @@ -258,22 +258,22 @@ module Cask operator, release = @cask.depends_on.macos.first unless MacOS.version.send(operator, release) raise CaskError, - "Cask #{@cask} depends on macOS release #{operator} #{release}, " \ - "but you are running release #{MacOS.version}." + "Cask #{@cask} depends on macOS release #{operator} #{release}, " \ + "but you are running release #{MacOS.version}." end elsif @cask.depends_on.macos.length > 1 unless @cask.depends_on.macos.include?(Gem::Version.new(MacOS.version.to_s)) raise CaskError, - "Cask #{@cask} depends on macOS release being one of " \ - "[#{@cask.depends_on.macos.map(&:to_s).join(", ")}], " \ - "but you are running release #{MacOS.version}." + "Cask #{@cask} depends on macOS release being one of " \ + "[#{@cask.depends_on.macos.map(&:to_s).join(", ")}], " \ + "but you are running release #{MacOS.version}." end else unless MacOS.version == @cask.depends_on.macos.first raise CaskError, - "Cask #{@cask} depends on macOS release " \ - "#{@cask.depends_on.macos.first}, " \ - "but you are running release #{MacOS.version}." + "Cask #{@cask} depends on macOS release " \ + "#{@cask.depends_on.macos.first}, " \ + "but you are running release #{MacOS.version}." end end end @@ -288,9 +288,9 @@ module Cask end raise CaskError, - "Cask #{@cask} depends on hardware architecture being one of " \ - "[#{@cask.depends_on.arch.map(&:to_s).join(", ")}], " \ - "but you are running #{@current_arch}" + "Cask #{@cask} depends on hardware architecture being one of " \ + "[#{@cask.depends_on.arch.map(&:to_s).join(", ")}], " \ + "but you are running #{@current_arch}" end def x11_dependencies diff --git a/Library/Homebrew/cleanup.rb b/Library/Homebrew/cleanup.rb index 7b569ca72b..2679b4b76a 100644 --- a/Library/Homebrew/cleanup.rb +++ b/Library/Homebrew/cleanup.rb @@ -385,8 +385,8 @@ module Homebrew end dirs.select(&:directory?).each do |dir| system_command "find", - args: [dir, "-name", ".DS_Store", "-delete"], - print_stderr: false + args: [dir, "-name", ".DS_Store", "-delete"], + print_stderr: false end end diff --git a/Library/Homebrew/cmd/--cache.rb b/Library/Homebrew/cmd/--cache.rb index c814e1a53f..dc253a37ed 100644 --- a/Library/Homebrew/cmd/--cache.rb +++ b/Library/Homebrew/cmd/--cache.rb @@ -16,9 +16,9 @@ module Homebrew If is provided, display the file or directory used to cache . EOS switch "-s", "--build-from-source", - description: "Show the cache file used when building from source." + description: "Show the cache file used when building from source." switch "--force-bottle", - description: "Show the cache file used when pouring a bottle." + description: "Show the cache file used when pouring a bottle." conflicts "--build-from-source", "--force-bottle" end end diff --git a/Library/Homebrew/cmd/--env.rb b/Library/Homebrew/cmd/--env.rb index e696ca665d..c47f748ed3 100644 --- a/Library/Homebrew/cmd/--env.rb +++ b/Library/Homebrew/cmd/--env.rb @@ -19,10 +19,10 @@ module Homebrew the list is formatted for export to `bash`(1) unless `--plain` is passed. EOS flag "--shell=", - description: "Generate a list of environment variables for the specified shell, " \ - "or `--shell=auto` to detect the current shell." + description: "Generate a list of environment variables for the specified shell, " \ + "or `--shell=auto` to detect the current shell." switch "--plain", - description: "Plain output even when piped." + description: "Plain output even when piped." end end diff --git a/Library/Homebrew/cmd/analytics.rb b/Library/Homebrew/cmd/analytics.rb index ac49c188df..7302ceeb2a 100644 --- a/Library/Homebrew/cmd/analytics.rb +++ b/Library/Homebrew/cmd/analytics.rb @@ -44,12 +44,12 @@ module Homebrew end when "on" safe_system "git", "config", "--file=#{config_file}", - "--replace-all", "homebrew.analyticsdisabled", "false" + "--replace-all", "homebrew.analyticsdisabled", "false" safe_system "git", "config", "--file=#{config_file}", - "--replace-all", "homebrew.analyticsmessage", "true" + "--replace-all", "homebrew.analyticsmessage", "true" when "off" safe_system "git", "config", "--file=#{config_file}", - "--replace-all", "homebrew.analyticsdisabled", "true" + "--replace-all", "homebrew.analyticsdisabled", "true" system "git", "config", "--file=#{config_file}", "--unset-all", "homebrew.analyticsuuid" when "regenerate-uuid" # it will be regenerated in next run. diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb index e1840843b5..bb83b9a61d 100644 --- a/Library/Homebrew/cmd/cleanup.rb +++ b/Library/Homebrew/cmd/cleanup.rb @@ -17,15 +17,15 @@ module Homebrew EOS flag "--prune=", - description: "Remove all cache files older than specified ." + description: "Remove all cache files older than specified ." switch "-n", "--dry-run", - description: "Show what would be removed, but do not actually remove anything." + description: "Show what would be removed, but do not actually remove anything." switch "-s", - description: "Scrub the cache, including downloads for even the latest versions. "\ - "Note downloads for any installed formula or cask will still not be deleted. "\ - "If you want to delete those too: `rm -rf \"$(brew --cache)\"`" + description: "Scrub the cache, including downloads for even the latest versions. "\ + "Note downloads for any installed formula or cask will still not be deleted. "\ + "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." + description: "Only prune the symlinks and directories from the prefix and remove no other files." switch :verbose switch :debug end diff --git a/Library/Homebrew/cmd/commands.rb b/Library/Homebrew/cmd/commands.rb index 3bf14e1fc2..49dc2b00ee 100644 --- a/Library/Homebrew/cmd/commands.rb +++ b/Library/Homebrew/cmd/commands.rb @@ -13,10 +13,10 @@ module Homebrew Show a list of built-in and external commands. EOS switch "--quiet", - description: "List only the names of commands without the header." + description: "List only the names of commands without the header." switch "--include-aliases", - depends_on: "--quiet", - description: "Include the aliases of internal commands." + depends_on: "--quiet", + description: "Include the aliases of internal commands." switch :verbose switch :debug end diff --git a/Library/Homebrew/cmd/deps.rb b/Library/Homebrew/cmd/deps.rb index 8835c59957..31190a76ad 100644 --- a/Library/Homebrew/cmd/deps.rb +++ b/Library/Homebrew/cmd/deps.rb @@ -17,38 +17,38 @@ module Homebrew show the intersection of dependencies for each formula. EOS switch "-n", - description: "Show dependencies in topological order." + description: "Show dependencies in topological order." switch "--1", - description: "Only show dependencies one level down, instead of recursing." + description: "Only show dependencies one level down, instead of recursing." switch "--union", - description: "Show the union of dependencies for multiple , instead of the intersection." + description: "Show the union of dependencies for multiple , instead of the intersection." switch "--full-name", - description: "List dependencies by their full name." + description: "List dependencies by their full name." switch "--include-build", - description: "Include `:build` dependencies for ." + description: "Include `:build` dependencies for ." switch "--include-optional", - description: "Include `:optional` dependencies for ." + description: "Include `:optional` dependencies for ." switch "--include-test", - description: "Include `:test` dependencies for (non-recursive)." + description: "Include `:test` dependencies for (non-recursive)." switch "--skip-recommended", - description: "Skip `:recommended` dependencies for ." + description: "Skip `:recommended` dependencies for ." switch "--include-requirements", - description: "Include requirements in addition to dependencies for ." + description: "Include requirements in addition to dependencies for ." switch "--tree", - description: "Show dependencies as a tree. When given multiple formula arguments, "\ - "show individual trees for each formula." + description: "Show dependencies as a tree. When given multiple formula arguments, "\ + "show individual trees for each formula." switch "--annotate", - description: "Mark any build, test, optional, or recommended dependencies as "\ - "such in the output." + description: "Mark any build, test, optional, or recommended dependencies as "\ + "such in the output." switch "--installed", - description: "List dependencies for formulae that are currently installed. If is "\ - "specified, list only its dependencies that are currently installed." + description: "List dependencies for formulae that are currently installed. If is "\ + "specified, list only its dependencies that are currently installed." switch "--all", - description: "List dependencies for all available formulae." + description: "List dependencies for all available formulae." switch "--for-each", - description: "Switch into the mode used by the `--all` option, but only list dependencies "\ - "for the specified , one formula per line. This is used for "\ - "debugging the `--installed`/`--all` display mode." + description: "Switch into the mode used by the `--all` option, but only list dependencies "\ + "for the specified , one formula per line. This is used for "\ + "debugging the `--installed`/`--all` display mode." switch :verbose switch :debug conflicts "--installed", "--all" diff --git a/Library/Homebrew/cmd/desc.rb b/Library/Homebrew/cmd/desc.rb index b30a8cb276..8797309cba 100644 --- a/Library/Homebrew/cmd/desc.rb +++ b/Library/Homebrew/cmd/desc.rb @@ -20,14 +20,14 @@ module Homebrew first search, making that search slower than subsequent ones. EOS flag "-s", "--search=", - description: "Search both name and description for provided . If is flanked by "\ - "slashes, it is interpreted as a regular expression." + description: "Search both name and description for provided . If is flanked by "\ + "slashes, it is interpreted as a regular expression." flag "-n", "--name=", - description: "Search just the names for provided . If is flanked by slashes, it is "\ - "interpreted as a regular expression." + description: "Search just the names for provided . If is flanked by slashes, it is "\ + "interpreted as a regular expression." flag "-d", "--description=", - description: "Search just the descriptions for provided . If is flanked by slashes, "\ - "it is interpreted as a regular expression." + description: "Search just the descriptions for provided . If is flanked by slashes, "\ + "it is interpreted as a regular expression." switch :verbose conflicts "--search=", "--name=", "--description=" end diff --git a/Library/Homebrew/cmd/diy.rb b/Library/Homebrew/cmd/diy.rb index 48bcc9ccc2..c50633bd8a 100644 --- a/Library/Homebrew/cmd/diy.rb +++ b/Library/Homebrew/cmd/diy.rb @@ -16,9 +16,9 @@ module Homebrew the Cellar and then link it into Homebrew's prefix with `brew link`. EOS flag "--name=", - description: "Explicitly set the provided of the package being installed." + description: "Explicitly set the provided of the package being installed." flag "--version=", - description: "Explicitly set the provided of the package being installed." + description: "Explicitly set the provided of the package being installed." switch :verbose switch :debug end diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 709bbaf383..8b3a30e65e 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -18,9 +18,9 @@ module Homebrew an issue; just ignore this. EOS switch "--list-checks", - description: "List all audit methods." + description: "List all audit methods." switch "-D", "--audit-debug", - description: "Enable debugging and profiling of audit methods." + description: "Enable debugging and profiling of audit methods." switch :verbose switch :debug end diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index 66fb5c5ebc..e505713c2b 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -16,26 +16,26 @@ module Homebrew For tarballs, also print SHA-256 checksums. EOS switch "--HEAD", - description: "Fetch HEAD version instead of stable version." + description: "Fetch HEAD version instead of stable version." switch "--devel", - description: "Fetch development version instead of stable version." + description: "Fetch development version instead of stable version." switch :verbose, - description: "Do a verbose VCS checkout, if the URL represents a VCS. This is useful for "\ - "seeing if an existing VCS cache has been updated." + description: "Do a verbose VCS checkout, if the URL represents a VCS. This is useful for "\ + "seeing if an existing VCS cache has been updated." switch :force, - description: "Remove a previously cached version and re-fetch." + description: "Remove a previously cached version and re-fetch." switch "--retry", - description: "Retry if a download fails or re-download if the checksum of a previously cached "\ - "version no longer matches." + description: "Retry if a download fails or re-download if the checksum of a previously cached "\ + "version no longer matches." switch "--deps", - description: "Download dependencies for any listed ." + description: "Download dependencies for any listed ." switch "-s", "--build-from-source", - description: "Download the source for rather than a bottle." + description: "Download the source for rather than a bottle." switch "--build-bottle", - description: "Download the source (for eventual bottling) rather than a bottle." + description: "Download the source (for eventual bottling) rather than a bottle." switch "--force-bottle", - description: "Download a bottle if it exists for the current or newest version of macOS, "\ - "even if it would not be used during installation." + description: "Download a bottle if it exists for the current or newest version of macOS, "\ + "even if it would not be used during installation." switch :verbose switch :debug conflicts "--devel", "--HEAD" diff --git a/Library/Homebrew/cmd/gist-logs.rb b/Library/Homebrew/cmd/gist-logs.rb index 0cfaed1221..ef9f859d31 100644 --- a/Library/Homebrew/cmd/gist-logs.rb +++ b/Library/Homebrew/cmd/gist-logs.rb @@ -23,13 +23,13 @@ module Homebrew If no logs are found, an error message is presented. EOS switch "--with-hostname", - description: "Include the hostname in the Gist." + description: "Include the hostname in the Gist." switch "-n", "--new-issue", - description: "Automatically create a new issue in the appropriate GitHub repository as "\ - "well as creating the Gist." + description: "Automatically create a new issue in the appropriate GitHub repository as "\ + "well as creating the Gist." switch "-p", "--private", - description: "The Gist will be marked private and will not appear in listings but will "\ - "be accessible with the link." + description: "The Gist will be marked private and will not appear in listings but will "\ + "be accessible with the link." switch :verbose switch :debug end diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index 509f2ec97f..b27b5c4fdd 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -22,33 +22,33 @@ module Homebrew If is specified, show summary of information about . EOS switch "--analytics", - description: "Display global Homebrew analytics data or, if specified, installation and "\ - "build error data for (provided neither `HOMEBREW_NO_ANALYTICS` "\ - "nor `HOMEBREW_NO_GITHUB_API` are set)." + description: "Display global Homebrew analytics data or, if specified, installation and "\ + "build error data for (provided neither `HOMEBREW_NO_ANALYTICS` "\ + "nor `HOMEBREW_NO_GITHUB_API` are set)." flag "--days", - depends_on: "--analytics", - description: "How many days of global analytics data to retrieve. "\ - "The value for must be `30`, `90` or `365`. The default is `30`." + depends_on: "--analytics", + description: "How many days of global analytics data to retrieve. "\ + "The value for must be `30`, `90` or `365`. The default is `30`." flag "--category", - depends_on: "--analytics", - description: "Which type of global analytics data to retrieve. "\ - "The value for must be `install`, `install-on-request`, "\ - "`cask-install`, `build-error` or `os-version`. The default is `install`." + depends_on: "--analytics", + description: "Which type of global analytics data to retrieve. "\ + "The value for must be `install`, `install-on-request`, "\ + "`cask-install`, `build-error` or `os-version`. The default is `install`." switch "--github", - description: "Open a browser to the GitHub source page for . "\ - "To view formula history locally: `brew log -p` " + description: "Open a browser to the GitHub source page for . "\ + "To view formula history locally: `brew log -p` " flag "--json", - description: "Print a JSON representation of . Currently the default and only accepted "\ - "value for is `v1`. See the docs for examples of using the JSON "\ - "output: " + description: "Print a JSON representation of . Currently the default and only accepted "\ + "value for is `v1`. See the docs for examples of using the JSON "\ + "output: " switch "--installed", - depends_on: "--json", - description: "Print JSON of formulae that are currently installed." + depends_on: "--json", + description: "Print JSON of formulae that are currently installed." switch "--all", - depends_on: "--json", - description: "Print JSON of all available formulae." + depends_on: "--json", + description: "Print JSON of all available formulae." switch :verbose, - description: "Show more verbose analytics data for ." + description: "Show more verbose analytics data for ." switch :debug conflicts "--installed", "--all" end @@ -222,7 +222,7 @@ module Homebrew return if ENV["HOMEBREW_NO_ANALYTICS"] || ENV["HOMEBREW_NO_GITHUB_API"] output, = curl_output("--max-time", "5", - "https://formulae.brew.sh/api/#{endpoint}") + "https://formulae.brew.sh/api/#{endpoint}") return if output.blank? JSON.parse(output) diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index f64c03ea2d..c13e8be978 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -27,64 +27,64 @@ module Homebrew EOS switch :debug, - description: "If brewing fails, open an interactive debugging session with access to IRB "\ - "or a shell inside the temporary build directory" + description: "If brewing fails, open an interactive debugging session with access to IRB "\ + "or a shell inside the temporary build directory" flag "--env=", - description: "If `std` is passed, use the standard build environment instead of superenv."\ - "If `super` is passed, use superenv even if the formula specifies the "\ - "standard build environment." + description: "If `std` is passed, use the standard build environment instead of superenv."\ + "If `super` is passed, use superenv even if the formula specifies the "\ + "standard build environment." switch "--ignore-dependencies", - description: "An unsupported Homebrew development flag to skip installing any dependencies of "\ - "any kind. If the dependencies are not already present, the formula will have issues. "\ - "If you're not developing Homebrew, consider adjusting your PATH rather than "\ - "using this flag." + description: "An unsupported Homebrew development flag to skip installing any dependencies of "\ + "any kind. If the dependencies are not already present, the formula will have issues. "\ + "If you're not developing Homebrew, consider adjusting your PATH rather than "\ + "using this flag." switch "--only-dependencies", - description: "Install the dependencies with specified options but do not install the "\ - "specified formula." + description: "Install the dependencies with specified options but do not install the "\ + "specified formula." flag "--cc=", - description: "Attempt to compile using provided . should be the "\ - "name of the compiler's executable, for instance `gcc-7` for GCC 7. "\ - "In order to use LLVM's clang, use `llvm_clang`. To specify the "\ - "Apple-provided clang, use `clang`. This parameter will only accept "\ - "compilers that are provided by Homebrew or bundled with macOS. "\ - "Please do not file issues if you encounter errors while using this flag." + description: "Attempt to compile using provided . should be the "\ + "name of the compiler's executable, for instance `gcc-7` for GCC 7. "\ + "In order to use LLVM's clang, use `llvm_clang`. To specify the "\ + "Apple-provided clang, use `clang`. This parameter will only accept "\ + "compilers that are provided by Homebrew or bundled with macOS. "\ + "Please do not file issues if you encounter errors while using this flag." switch "-s", "--build-from-source", - description: "Compile the specified from source even if a bottle is provided. "\ - "Dependencies will still be installed from bottles if they are available." + description: "Compile the specified from source even if a bottle is provided. "\ + "Dependencies will still be installed from bottles if they are available." switch "--force-bottle", - description: "Install from a bottle if it exists for the current or newest version of "\ - "macOS, even if it would not normally be used for installation." + description: "Install from a bottle if it exists for the current or newest version of "\ + "macOS, even if it would not normally be used for installation." switch "--include-test", - description: "Install testing dependencies required to run `brew test`." + description: "Install testing dependencies required to run `brew test`." switch "--devel", - description: "If defines it, install the development version." + description: "If defines it, install the development version." switch "--HEAD", - description: "If defines it, install the HEAD version, aka. master, trunk, unstable." + description: "If defines it, install the HEAD version, aka. master, trunk, unstable." switch "--fetch-HEAD", - description: "Fetch the upstream repository to detect if the HEAD installation of the "\ - "formula is outdated. Otherwise, the repository's HEAD will be checked for "\ - "updates when a new stable or development version has been released." + description: "Fetch the upstream repository to detect if the HEAD installation of the "\ + "formula is outdated. Otherwise, the repository's HEAD will be checked for "\ + "updates when a new stable or development version has been released." switch "--keep-tmp", - description: "Don't delete the temporary files created during installation." + description: "Don't delete the temporary files created during installation." switch "--build-bottle", - description: "Prepare the formula for eventual bottling during installation." + description: "Prepare the formula for eventual bottling during installation." flag "--bottle-arch=", - depends_on: "--build-bottle", - description: "Optimise bottles for the given architecture rather than the oldest "\ - "architecture supported by the version of macOS the bottles are built on." + depends_on: "--build-bottle", + description: "Optimise bottles for the given architecture rather than the oldest "\ + "architecture supported by the version of macOS the bottles are built on." switch :force, - description: "Install without checking for previously installed keg-only or "\ - "non-migrated versions." + description: "Install without checking for previously installed keg-only or "\ + "non-migrated versions." switch :verbose, - description: "Print the verification and postinstall steps." + description: "Print the verification and postinstall steps." switch "--display-times", - description: "Print install times for each formula at the end of the run." + description: "Print install times for each formula at the end of the run." switch "-i", "--interactive", - description: "Download and patch , then open a shell. This allows the user to "\ - "run `./configure --help` and otherwise determine how to turn the software "\ - "package into a Homebrew package." + description: "Download and patch , then open a shell. This allows the user to "\ + "run `./configure --help` and otherwise determine how to turn the software "\ + "package into a Homebrew package." switch "-g", "--git", - description: "Create a Git repository, useful for creating patches to the software." + description: "Create a Git repository, useful for creating patches to the software." conflicts "--ignore-dependencies", "--only-dependencies" conflicts "--devel", "--HEAD" conflicts "--build-from-source", "--build-bottle", "--force-bottle" diff --git a/Library/Homebrew/cmd/link.rb b/Library/Homebrew/cmd/link.rb index fe280a3812..ff9714ab78 100644 --- a/Library/Homebrew/cmd/link.rb +++ b/Library/Homebrew/cmd/link.rb @@ -17,12 +17,12 @@ module Homebrew installations. EOS switch "--overwrite", - description: "Delete files already existing in the prefix while linking." + description: "Delete files already existing in the prefix while linking." switch "-n", "--dry-run", - description: "List all files which would be linked or deleted by "\ - "`brew link --overwrite`, but will not actually link or delete any files." + description: "List all files which would be linked or deleted by "\ + "`brew link --overwrite`, but will not actually link or delete any files." switch :force, - description: "Allow only key-only formulae to be linked." + description: "Allow only key-only formulae to be linked." switch :verbose switch :debug end diff --git a/Library/Homebrew/cmd/list.rb b/Library/Homebrew/cmd/list.rb index 3b3b1ef3f2..a1bde5c4d7 100644 --- a/Library/Homebrew/cmd/list.rb +++ b/Library/Homebrew/cmd/list.rb @@ -15,31 +15,31 @@ module Homebrew List all installed formulae. EOS switch "--full-name", - description: "Print formulae with fully-qualified names. If `--full-name` is not "\ - "passed, other options (i.e. `-1`, `-l`, `-t` and `-r`) are passed to `ls` "\ - "which produces the actual output." + description: "Print formulae with fully-qualified names. If `--full-name` is not "\ + "passed, other options (i.e. `-1`, `-l`, `-t` and `-r`) are passed to `ls` "\ + "which produces the actual output." switch "--unbrewed", - description: "List all files in the Homebrew prefix not installed by Homebrew." + description: "List all files in the Homebrew prefix not installed by Homebrew." switch "--versions", - description: "Show the version number for installed formulae, or only the specified "\ - "formulae if are given." + description: "Show the version number for installed formulae, or only the specified "\ + "formulae if are given." switch "--multiple", - depends_on: "--versions", - description: "Only show formulae with multiple versions installed." + depends_on: "--versions", + description: "Only show formulae with multiple versions installed." switch "--pinned", - description: "Show the versions of pinned formulae, or only the specified (pinned) "\ - "formulae if are given. See also `pin`, `unpin`." + description: "Show the versions of pinned formulae, or only the specified (pinned) "\ + "formulae if are given. See also `pin`, `unpin`." # passed through to ls switch "-1", - description: "Force output to be one entry per line. " \ - "This is the default when output is not to a terminal." + description: "Force output to be one entry per line. " \ + "This is the default when output is not to a terminal." switch "-l", - description: "List in long format. If the output is to a terminal, "\ - "a total sum for all the file sizes is output on a line before the long listing." + description: "List in long format. If the output is to a terminal, "\ + "a total sum for all the file sizes is output on a line before the long listing." switch "-r", - description: "Reverse the order of the sort to get the oldest entries first." + description: "Reverse the order of the sort to get the oldest entries first." switch "-t", - description: "Sort by time modified (most recently modified first)." + description: "Sort by time modified (most recently modified first)." switch :verbose switch :debug end diff --git a/Library/Homebrew/cmd/log.rb b/Library/Homebrew/cmd/log.rb index 000543faa3..7ca70f6b4c 100644 --- a/Library/Homebrew/cmd/log.rb +++ b/Library/Homebrew/cmd/log.rb @@ -14,13 +14,13 @@ module Homebrew Show the `git log` for the given . EOS switch "-p", "-u", "--patch", - description: "Also output patch from commit." + description: "Also output patch from commit." switch "--stat", - description: "Also output diffstat from commit." + description: "Also output diffstat from commit." switch "--oneline", - description: "Output only one line per commit." + description: "Output only one line per commit." switch "-1", "--max-count=1", - description: "Output only one commit." + description: "Output only one commit." end end diff --git a/Library/Homebrew/cmd/migrate.rb b/Library/Homebrew/cmd/migrate.rb index 25a94da2ab..d4de084c4c 100644 --- a/Library/Homebrew/cmd/migrate.rb +++ b/Library/Homebrew/cmd/migrate.rb @@ -15,8 +15,8 @@ module Homebrew packages. EOS switch :force, - description: "Treat installed and passed like if they are from "\ - "same taps and migrate them anyway." + description: "Treat installed and passed like if they are from "\ + "same taps and migrate them anyway." switch :verbose switch :debug end diff --git a/Library/Homebrew/cmd/missing.rb b/Library/Homebrew/cmd/missing.rb index b0d4fb7ac8..a8889e5ed2 100644 --- a/Library/Homebrew/cmd/missing.rb +++ b/Library/Homebrew/cmd/missing.rb @@ -19,8 +19,8 @@ module Homebrew `missing` exits with a non-zero status if any formulae are missing dependencies. EOS comma_array "--hide", - description: "Act as if none of the provided are installed. should be "\ - "comma-separated list of formulae." + description: "Act as if none of the provided are installed. should be "\ + "comma-separated list of formulae." switch :verbose switch :debug end diff --git a/Library/Homebrew/cmd/options.rb b/Library/Homebrew/cmd/options.rb index e30baddfb7..3f35f15024 100644 --- a/Library/Homebrew/cmd/options.rb +++ b/Library/Homebrew/cmd/options.rb @@ -15,11 +15,11 @@ module Homebrew Display install options specific to EOS switch "--compact", - description: "Show all options on a single line separated by spaces." + description: "Show all options on a single line separated by spaces." switch "--all", - description: "Show options for all formulae." + description: "Show options for all formulae." switch "--installed", - description: "Show options for all installed formulae." + description: "Show options for all installed formulae." switch :debug conflicts "--all", "--installed" end diff --git a/Library/Homebrew/cmd/outdated.rb b/Library/Homebrew/cmd/outdated.rb index 6e66764faa..4354d47f76 100644 --- a/Library/Homebrew/cmd/outdated.rb +++ b/Library/Homebrew/cmd/outdated.rb @@ -18,17 +18,17 @@ module Homebrew suppressed otherwise. EOS switch :quiet, - description: "List only the names of outdated brews (takes precedence over `--verbose`)." + description: "List only the names of outdated brews (takes precedence over `--verbose`)." switch :verbose, - description: "Display detailed version information." + description: "Display detailed version information." flag "--json", - description: "Print output in JSON format. Currently the default and only accepted "\ - "value for is `v1`. See the docs for examples of using the JSON "\ - "output: " + description: "Print output in JSON format. Currently the default and only accepted "\ + "value for is `v1`. See the docs for examples of using the JSON "\ + "output: " switch "--fetch-HEAD", - description: "Fetch the upstream repository to detect if the HEAD installation of the "\ - "formula is outdated. Otherwise, the repository's HEAD will be checked for "\ - "updates when a new stable or development version has been released." + description: "Fetch the upstream repository to detect if the HEAD installation of the "\ + "formula is outdated. Otherwise, the repository's HEAD will be checked for "\ + "updates when a new stable or development version has been released." switch :debug conflicts "--quiet", "--verbose", "--json" end diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb index 8185971502..972451107e 100644 --- a/Library/Homebrew/cmd/reinstall.rb +++ b/Library/Homebrew/cmd/reinstall.rb @@ -20,22 +20,22 @@ module Homebrew Unless `HOMEBREW_NO_INSTALL_CLEANUP` is set, `brew cleanup` will be run for the reinstalled formulae or, every 30 days, for all formulae. EOS switch :debug, - description: "If brewing fails, open an interactive debugging session with access to IRB "\ - "or a shell inside the temporary build directory" + description: "If brewing fails, open an interactive debugging session with access to IRB "\ + "or a shell inside the temporary build directory" switch "-s", "--build-from-source", - description: "Compile from source even if a bottle is available." + description: "Compile from source even if a bottle is available." switch "--force-bottle", - description: "Install from a bottle if it exists for the current or newest version of "\ - "macOS, even if it would not normally be used for installation." + description: "Install from a bottle if it exists for the current or newest version of "\ + "macOS, even if it would not normally be used for installation." switch "--keep-tmp", - description: "Don't delete the temporary files created during installation." + description: "Don't delete the temporary files created during installation." switch :force, - description: "Install without checking for previously installed keg-only or "\ - "non-migrated versions." + description: "Install without checking for previously installed keg-only or "\ + "non-migrated versions." switch :verbose, - description: "Print the verification and postinstall steps." + description: "Print the verification and postinstall steps." switch "--display-times", - description: "Print install times for each formula at the end of the run." + description: "Print install times for each formula at the end of the run." conflicts "--build-from-source", "--force-bottle" formula_options end diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb index 3efacc74ac..7a5c0fda44 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -37,16 +37,16 @@ module Homebrew No online search is performed. EOS switch "--casks", - description: "Display all locally available casks (including tapped ones). "\ - "No online search is performed." + description: "Display all locally available casks (including tapped ones). "\ + "No online search is performed." switch "--desc", - description: "search formulae with a description matching and casks with "\ - "a name matching ." + description: "search formulae with a description matching and casks with "\ + "a name matching ." package_manager_switches = PACKAGE_MANAGERS.keys.map { |name| "--#{name}" } package_manager_switches.each do |s| switch s, - description: "Search for in the given package manager's list." + description: "Search for in the given package manager's list." end switch :verbose switch :debug diff --git a/Library/Homebrew/cmd/sh.rb b/Library/Homebrew/cmd/sh.rb index 6d3fec814f..244f9ad4ea 100644 --- a/Library/Homebrew/cmd/sh.rb +++ b/Library/Homebrew/cmd/sh.rb @@ -19,7 +19,7 @@ module Homebrew which otherwise build systems would not find. EOS flag "--env=", - description: "Use the standard `PATH` instead of superenv's, when is passed" + description: "Use the standard `PATH` instead of superenv's, when is passed" switch :verbose switch :debug end diff --git a/Library/Homebrew/cmd/style.rb b/Library/Homebrew/cmd/style.rb index b62ac97c78..632ca9c181 100644 --- a/Library/Homebrew/cmd/style.rb +++ b/Library/Homebrew/cmd/style.rb @@ -20,15 +20,15 @@ module Homebrew including core code and all formulae. EOS switch "--fix", - description: "Fix style violations automatically using RuboCop's auto-correct feature." + description: "Fix style violations automatically using RuboCop's auto-correct feature." switch "--display-cop-names", - description: "Include the RuboCop cop name for each violation in the output." + description: "Include the RuboCop cop name for each violation in the output." comma_array "--only-cops", - description: "Specify a comma-separated list to check for violations of only the "\ - "listed RuboCop cops." + description: "Specify a comma-separated list to check for violations of only the "\ + "listed RuboCop cops." comma_array "--except-cops", - description: "Specify a comma-separated list to skip checking for violations of the "\ - "listed RuboCop cops." + description: "Specify a comma-separated list to skip checking for violations of the "\ + "listed RuboCop cops." switch :verbose switch :debug conflicts "--only-cops", "--except-cops" diff --git a/Library/Homebrew/cmd/tap-info.rb b/Library/Homebrew/cmd/tap-info.rb index a5f0093b2c..f01a84d010 100644 --- a/Library/Homebrew/cmd/tap-info.rb +++ b/Library/Homebrew/cmd/tap-info.rb @@ -14,11 +14,11 @@ module Homebrew Display a brief summary of all installed taps if no are passed. EOS switch "--installed", - description: "Display information on all installed taps." + description: "Display information on all installed taps." flag "--json", - description: "Print a JSON representation of . Currently the default and only accepted "\ - "value for is `v1`. See the docs for examples of using the JSON "\ - "output: " + description: "Print a JSON representation of . Currently the default and only accepted "\ + "value for is `v1`. See the docs for examples of using the JSON "\ + "output: " switch :debug end end diff --git a/Library/Homebrew/cmd/tap-pin.rb b/Library/Homebrew/cmd/tap-pin.rb index 114dd9e65e..8ee206d84a 100644 --- a/Library/Homebrew/cmd/tap-pin.rb +++ b/Library/Homebrew/cmd/tap-pin.rb @@ -20,7 +20,7 @@ module Homebrew def tap_pin odeprecated "brew tap-pin user/tap", - "fully-scoped user/tap/formula naming" + "fully-scoped user/tap/formula naming" tap_pin_args.parse diff --git a/Library/Homebrew/cmd/tap-unpin.rb b/Library/Homebrew/cmd/tap-unpin.rb index 1cab3cbf6d..c704dc4c56 100644 --- a/Library/Homebrew/cmd/tap-unpin.rb +++ b/Library/Homebrew/cmd/tap-unpin.rb @@ -19,7 +19,7 @@ module Homebrew def tap_unpin odeprecated "brew tap-pin user/tap", - "fully-scoped user/tap/formula naming" + "fully-scoped user/tap/formula naming" tap_unpin_args.parse diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb index 6bb3d164c5..fc93506a49 100644 --- a/Library/Homebrew/cmd/tap.rb +++ b/Library/Homebrew/cmd/tap.rb @@ -25,18 +25,18 @@ module Homebrew using protocols other than HTTPS, e.g., SSH, GIT, HTTP, FTP(S), RSYNC. EOS switch "--full", - description: "Use a full clone when tapping a repository. By default, the repository is "\ - "cloned as a shallow copy (`--depth=1`). To convert a shallow copy to a "\ - "full copy, you can retap passing `--full` without first untapping." + description: "Use a full clone when tapping a repository. By default, the repository is "\ + "cloned as a shallow copy (`--depth=1`). To convert a shallow copy to a "\ + "full copy, you can retap passing `--full` without first untapping." switch "--force-auto-update", - description: "Auto-update tap even if it is not hosted on GitHub. By default, only taps "\ - "hosted on GitHub are auto-updated (for performance reasons)." + description: "Auto-update tap even if it is not hosted on GitHub. By default, only taps "\ + "hosted on GitHub are auto-updated (for performance reasons)." switch "--repair", - description: "Migrate tapped formulae from symlink-based to directory-based structure." + description: "Migrate tapped formulae from symlink-based to directory-based structure." switch "--list-pinned", - description: "List all pinned taps." + description: "List all pinned taps." switch "-q", "--quieter", - description: "Suppress any warnings." + description: "Suppress any warnings." switch :debug end end diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb index e50c8f8ca4..f6d18e3cff 100644 --- a/Library/Homebrew/cmd/uninstall.rb +++ b/Library/Homebrew/cmd/uninstall.rb @@ -17,10 +17,10 @@ module Homebrew Uninstall . EOS switch :force, - description: "Delete all installed versions of the " + description: "Delete all installed versions of the " switch "--ignore-dependencies", - description: "Don't fail uninstall, even if is a dependency of any installed "\ - "formulae." + description: "Don't fail uninstall, even if is a dependency of any installed "\ + "formulae." switch :debug end end diff --git a/Library/Homebrew/cmd/unlink.rb b/Library/Homebrew/cmd/unlink.rb index f41e95e8ca..e5f60dd060 100644 --- a/Library/Homebrew/cmd/unlink.rb +++ b/Library/Homebrew/cmd/unlink.rb @@ -16,8 +16,8 @@ module Homebrew `brew unlink` `&&` `&& brew link` EOS switch "-n", "--dry-run", - description: "List all files which would be unlinked, but will not actually unlink or "\ - "delete any files." + description: "List all files which would be unlinked, but will not actually unlink or "\ + "delete any files." switch :verbose switch :debug end diff --git a/Library/Homebrew/cmd/unpack.rb b/Library/Homebrew/cmd/unpack.rb index f56ae42a6f..d4333c2c42 100644 --- a/Library/Homebrew/cmd/unpack.rb +++ b/Library/Homebrew/cmd/unpack.rb @@ -16,12 +16,12 @@ module Homebrew working directory. EOS flag "--destdir=", - description: "Create subdirectories in the directory named by instead." + description: "Create subdirectories in the directory named by instead." switch "--patch", - description: "Patches for will be applied to the unpacked source." + description: "Patches for will be applied to the unpacked source." switch "-g", "--git", - description: "Initialise a Git repository in the unpacked source. This is useful for creating "\ - "patches for the software." + description: "Initialise a Git repository in the unpacked source. This is useful for creating "\ + "patches for the software." switch :force switch :verbose switch :debug diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index 0f8e8f213a..a4a0ddab2f 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -26,7 +26,7 @@ module Homebrew The Ruby implementation of `brew update`. Never called manually. EOS switch "--preinstall", - description: "Run in 'auto-update' mode (faster, less output)." + description: "Run in 'auto-update' mode (faster, less output)." switch :force switch :quiet switch :debug diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index 329276d5b9..8099e311d2 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -24,28 +24,28 @@ module Homebrew Unless `HOMEBREW_NO_INSTALL_CLEANUP` is set, `brew cleanup` will be run for the upgraded formulae or, every 30 days, for all formulae. EOS switch :debug, - description: "If brewing fails, open an interactive debugging session with access to IRB "\ - "or a shell inside the temporary build directory" + description: "If brewing fails, open an interactive debugging session with access to IRB "\ + "or a shell inside the temporary build directory" switch "-s", "--build-from-source", - description: "Compile from source even if a bottle is available." + description: "Compile from source even if a bottle is available." switch "--force-bottle", - description: "Install from a bottle if it exists for the current or newest version of "\ - "macOS, even if it would not normally be used for installation." + description: "Install from a bottle if it exists for the current or newest version of "\ + "macOS, even if it would not normally be used for installation." switch "--fetch-HEAD", - description: "Fetch the upstream repository to detect if the HEAD installation of the "\ - "formula is outdated. Otherwise, the repository's HEAD will be checked for "\ - "updates when a new stable or development version has been released." + description: "Fetch the upstream repository to detect if the HEAD installation of the "\ + "formula is outdated. Otherwise, the repository's HEAD will be checked for "\ + "updates when a new stable or development version has been released." switch "--ignore-pinned", - description: "Set a 0 exit code even if pinned formulae are not upgraded." + description: "Set a 0 exit code even if pinned formulae are not upgraded." switch "--keep-tmp", - description: "Don't delete the temporary files created during installation." + description: "Don't delete the temporary files created during installation." switch :force, - description: "Install without checking for previously installed keg-only or "\ - "non-migrated versions." + description: "Install without checking for previously installed keg-only or "\ + "non-migrated versions." switch :verbose, - description: "Print the verification and postinstall steps." + description: "Print the verification and postinstall steps." switch "--display-times", - description: "Print install times for each formula at the end of the run." + description: "Print install times for each formula at the end of the run." conflicts "--build-from-source", "--force-bottle" formula_options end diff --git a/Library/Homebrew/cmd/uses.rb b/Library/Homebrew/cmd/uses.rb index d70f877a33..590d6289f4 100644 --- a/Library/Homebrew/cmd/uses.rb +++ b/Library/Homebrew/cmd/uses.rb @@ -25,21 +25,21 @@ module Homebrew By default, `uses` shows usage of by stable builds. EOS switch "--recursive", - description: "Resolve more than one level of dependencies." + description: "Resolve more than one level of dependencies." switch "--installed", - description: "Only list installed formulae." + description: "Only list installed formulae." switch "--include-build", - description: "Include all formulae that specify as `:build` type dependency." + description: "Include all formulae that specify as `:build` type dependency." switch "--include-test", - description: "Include all formulae that specify as `:test` type dependency." + description: "Include all formulae that specify as `:test` type dependency." switch "--include-optional", - description: "Include all formulae that specify as `:optional` type dependency." + description: "Include all formulae that specify as `:optional` type dependency." switch "--skip-recommended", - description: "Skip all formulae that specify as `:recommended` type dependency." + description: "Skip all formulae that specify as `:recommended` type dependency." switch "--devel", - description: "Show usage of by development build." + description: "Show usage of by development build." switch "--HEAD", - description: "Show usage of by HEAD build." + description: "Show usage of by HEAD build." switch :debug conflicts "--devel", "--HEAD" end diff --git a/Library/Homebrew/dependency_collector.rb b/Library/Homebrew/dependency_collector.rb index e7e9e9006b..3d02c484f3 100644 --- a/Library/Homebrew/dependency_collector.rb +++ b/Library/Homebrew/dependency_collector.rb @@ -163,7 +163,7 @@ class DependencyCollector # allow unknown strategies to pass through else raise TypeError, - "#{strategy.inspect} is not an AbstractDownloadStrategy subclass" + "#{strategy.inspect} is not an AbstractDownloadStrategy subclass" end end diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 690d04acf5..45bd5019b1 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -26,34 +26,34 @@ module Homebrew If no are provided, all of them are checked. EOS switch "--strict", - description: "Run additional style checks, including RuboCop style checks." + description: "Run additional style checks, including RuboCop style checks." switch "--online", - description: "Run additional slower style checks that require a network connection." + description: "Run additional slower style checks that require a network connection." switch "--new-formula", - description: "Run various additional style checks to determine if a new formula is eligible "\ - "for Homebrew. This should be used when creating new formula and implies "\ - "`--strict` and `--online`." + description: "Run various additional style checks to determine if a new formula is eligible "\ + "for Homebrew. This should be used when creating new formula and implies "\ + "`--strict` and `--online`." switch "--fix", - description: "Fix style violations automatically using RuboCop's auto-correct feature." + description: "Fix style violations automatically using RuboCop's auto-correct feature." switch "--display-cop-names", - description: "Include the RuboCop cop name for each violation in the output." + description: "Include the RuboCop cop name for each violation in the output." switch "--display-filename", - description: "Prefix every line of output with name of the file or formula being audited, to "\ - "make output easy to grep." + description: "Prefix every line of output with name of the file or formula being audited, to "\ + "make output easy to grep." switch "-D", "--audit-debug", - description: "Enable debugging and profiling of audit methods." + description: "Enable debugging and profiling of audit methods." comma_array "--only", - description: "Specify a comma-separated list to only run the methods named "\ - "`audit_`." + description: "Specify a comma-separated list to only run the methods named "\ + "`audit_`." comma_array "--except", - description: "Specify a comma-separated list to skip running the methods named "\ - "`audit_`." + description: "Specify a comma-separated list to skip running the methods named "\ + "`audit_`." comma_array "--only-cops", - description: "Specify a comma-separated list to check for violations of only the listed "\ - "RuboCop cops." + description: "Specify a comma-separated list to check for violations of only the listed "\ + "RuboCop cops." comma_array "--except-cops", - description: "Specify a comma-separated list to skip checking for violations of the listed "\ - "RuboCop cops." + description: "Specify a comma-separated list to skip checking for violations of the listed "\ + "RuboCop cops." switch :verbose switch :debug conflicts "--only", "--except" @@ -532,9 +532,9 @@ module Homebrew return unless DevelopmentTools.curl_handles_most_https_certificates? if http_content_problem = curl_check_http_content(homepage, - user_agents: [:browser, :default], - check_content: true, - strict: @strict) + user_agents: [:browser, :default], + check_content: true, + strict: @strict) problem http_content_problem end end diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 7ff09281fe..774b268cbf 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -53,33 +53,33 @@ module Homebrew value, while `--no-rebuild` will remove it. EOS switch "--skip-relocation", - description: "Do not check if the bottle can be marked as relocatable." + description: "Do not check if the bottle can be marked as relocatable." switch "--or-later", - description: "Append `_or_later` to the bottle tag." + description: "Append `_or_later` to the bottle tag." switch "--force-core-tap", - description: "Build a bottle even if is not in `homebrew/core` or any installed taps." + description: "Build a bottle even if is not in `homebrew/core` or any installed taps." switch "--no-rebuild", - description: "If the formula specifies a rebuild version, remove it from the generated DSL." + description: "If the formula specifies a rebuild version, remove it from the generated DSL." switch "--keep-old", - description: "If the formula specifies a rebuild version, attempt to preserve its value in the "\ - "generated DSL." + description: "If the formula specifies a rebuild version, attempt to preserve its value in the "\ + "generated DSL." switch "--json", - description: "Write bottle information to a JSON file, which can be used as the argument for "\ - "`--merge`." + description: "Write bottle information to a JSON file, which can be used as the argument for "\ + "`--merge`." switch "--merge", - description: "Generate an updated bottle block for a formula and optionally merge it into the "\ - "formula file. Instead of a formula name, requires a JSON file generated with "\ - "`brew bottle --json` ." + description: "Generate an updated bottle block for a formula and optionally merge it into the "\ + "formula file. Instead of a formula name, requires a JSON file generated with "\ + "`brew bottle --json` ." switch "--write", - depends_on: "--merge", - description: "Write the changes to the formula file. A new commit will be generated unless "\ - "`--no-commit` is passed." + depends_on: "--merge", + description: "Write the changes to the formula file. A new commit will be generated unless "\ + "`--no-commit` is passed." switch "--no-commit", - depends_on: "--write", - description: "When passed with `--write`, a new commit will not generated after writing changes "\ - "to the formula file." + depends_on: "--write", + description: "When passed with `--write`, a new commit will not generated after writing changes "\ + "to the formula file." flag "--root-url=", - description: "Use the specified as the root of the bottle's URL instead of Homebrew's default." + description: "Use the specified as the root of the bottle's URL instead of Homebrew's default." switch :verbose switch :debug conflicts "--no-rebuild", "--keep-old" @@ -545,8 +545,8 @@ module Homebrew path.parent.cd do safe_system "git", "commit", "--no-edit", "--verbose", - "--message=#{short_name}: #{update_or_add} #{pkg_version} bottle.", - "--", path + "--message=#{short_name}: #{update_or_add} #{pkg_version} bottle.", + "--", path end end else diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index 574a0c9a47..a0cb5a79fc 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -26,38 +26,38 @@ module Homebrew formula already uses. EOS switch "--devel", - description: "Bump the development rather than stable version. The development spec must already exist." + description: "Bump the development rather than stable version. The development spec must already exist." switch "-n", "--dry-run", - description: "Print what would be done rather than doing it." + description: "Print what would be done rather than doing it." switch "--write", - depends_on: "--dry-run", - description: "When passed along with `--dry-run`, perform a not-so-dry run by making the expected "\ - "file modifications but not taking any Git actions." + depends_on: "--dry-run", + description: "When passed along with `--dry-run`, perform a not-so-dry run by making the expected "\ + "file modifications but not taking any Git actions." switch "--no-audit", - description: "Don't run `brew audit` before opening the PR." + description: "Don't run `brew audit` before opening the PR." switch "--strict", - description: "Run `brew audit --strict` before opening the PR." + description: "Run `brew audit --strict` before opening the PR." switch "--no-browse", - description: "Print the pull request URL instead of opening in a browser." + description: "Print the pull request URL instead of opening in a browser." flag "--mirror=", - description: "Use the provided as a mirror URL." + description: "Use the provided as a mirror URL." flag "--version=", - description: "Use the provided to override the value parsed from the URL or tag. Note "\ - "that `--version=0` can be used to delete an existing version override from a "\ - "formula if it has become redundant." + description: "Use the provided to override the value parsed from the URL or tag. Note "\ + "that `--version=0` can be used to delete an existing version override from a "\ + "formula if it has become redundant." flag "--message=", - description: "Append the provided to the default PR message." + description: "Append the provided to the default PR message." flag "--url=", - description: "Specify the for the new download. If a is specified, the "\ - "checksum of the new download should also be specified." + description: "Specify the for the new download. If a is specified, the "\ + "checksum of the new download should also be specified." flag "--sha256=", - depends_on: "--url=", - description: "Specify the checksum of the new download." + depends_on: "--url=", + description: "Specify the checksum of the new download." flag "--tag=", - description: "Specify the new git commit for the formula." + description: "Specify the new git commit for the formula." flag "--revision=", - required_for: "--tag=", - description: "Specify the new git commit corresponding to a specified ." + required_for: "--tag=", + description: "Specify the new git commit corresponding to a specified ." switch :force switch :quiet @@ -340,8 +340,8 @@ module Homebrew safe_system "git", "fetch", "--unshallow", "origin" if shallow safe_system "git", "checkout", "--no-track", "-b", branch, "origin/master" safe_system "git", "commit", "--no-edit", "--verbose", - "--message=#{formula.name} #{new_formula_version}#{devel_message}", - "--", formula.path + "--message=#{formula.name} #{new_formula_version}#{devel_message}", + "--", formula.path safe_system "git", "push", "--set-upstream", remote_url, "#{branch}:#{branch}" safe_system "git", "checkout", "--quiet", "-" pr_message = <<~EOS diff --git a/Library/Homebrew/dev-cmd/create.rb b/Library/Homebrew/dev-cmd/create.rb index 96bdaf524e..e395530aeb 100644 --- a/Library/Homebrew/dev-cmd/create.rb +++ b/Library/Homebrew/dev-cmd/create.rb @@ -20,23 +20,23 @@ module Homebrew EOS switch "--autotools", - description: "Create a basic template for an Autotools-style build." + description: "Create a basic template for an Autotools-style build." switch "--cmake", - description: "Create a basic template for a CMake-style build." + description: "Create a basic template for a CMake-style build." switch "--meson", - description: "Create a basic template for a Meson-style build." + description: "Create a basic template for a Meson-style build." switch "--no-fetch", - description: "Homebrew will not download to the cache and will thus not add the SHA-256 "\ - "to the formula for you, nor will it check the GitHub API for GitHub projects "\ - "(to fill out its description and homepage)." + description: "Homebrew will not download to the cache and will thus not add the SHA-256 "\ + "to the formula for you, nor will it check the GitHub API for GitHub projects "\ + "(to fill out its description and homepage)." switch "--HEAD", - description: "Indicate that points to the package's repository rather than a file." + description: "Indicate that points to the package's repository rather than a file." flag "--set-name=", - description: "Set the name of the new formula to the provided ." + description: "Set the name of the new formula to the provided ." flag "--set-version=", - description: "Set the version of the new formula to the provided ." + description: "Set the version of the new formula to the provided ." flag "--tap=", - description: "Generate the new formula in the provided tap, specified as `/`." + description: "Generate the new formula in the provided tap, specified as `/`." switch :force switch :verbose switch :debug diff --git a/Library/Homebrew/dev-cmd/extract.rb b/Library/Homebrew/dev-cmd/extract.rb index 761d63af6c..34cddd092c 100644 --- a/Library/Homebrew/dev-cmd/extract.rb +++ b/Library/Homebrew/dev-cmd/extract.rb @@ -88,7 +88,7 @@ module Homebrew EOS flag "--version=", - description: "Extract the provided of instead of the most recent." + description: "Extract the provided of instead of the most recent." switch :force switch :debug end diff --git a/Library/Homebrew/dev-cmd/irb.rb b/Library/Homebrew/dev-cmd/irb.rb index 819373f5b5..de6f6d6376 100644 --- a/Library/Homebrew/dev-cmd/irb.rb +++ b/Library/Homebrew/dev-cmd/irb.rb @@ -25,10 +25,10 @@ module Homebrew Enter the interactive Homebrew Ruby shell. EOS switch "--examples", - description: "Show several examples." + description: "Show several examples." switch "--pry", - env: :pry, - description: "Use Pry instead of IRB. Implied if `HOMEBREW_PRY` is set." + env: :pry, + description: "Use Pry instead of IRB. Implied if `HOMEBREW_PRY` is set." end end diff --git a/Library/Homebrew/dev-cmd/linkage.rb b/Library/Homebrew/dev-cmd/linkage.rb index d864ec9c39..379abebb8e 100644 --- a/Library/Homebrew/dev-cmd/linkage.rb +++ b/Library/Homebrew/dev-cmd/linkage.rb @@ -16,14 +16,14 @@ module Homebrew Raises an error if run on uninstalled formulae. EOS switch "--test", - description: "Display only missing libraries and exit with a non-zero status if any missing "\ - "libraries are found." + description: "Display only missing libraries and exit with a non-zero status if any missing "\ + "libraries are found." switch "--reverse", - description: "For every library that a keg references, print its dylib path followed by the "\ - "binaries that link to it." + description: "For every library that a keg references, print its dylib path followed by the "\ + "binaries that link to it." switch "--cached", - description: "Print the cached linkage values stored in `HOMEBREW_CACHE`, set by a previous "\ - "`brew linkage` run." + description: "Print the cached linkage values stored in `HOMEBREW_CACHE`, set by a previous "\ + "`brew linkage` run." switch :verbose switch :debug end diff --git a/Library/Homebrew/dev-cmd/man.rb b/Library/Homebrew/dev-cmd/man.rb index 5e07666f0c..e9cf8a1a4f 100644 --- a/Library/Homebrew/dev-cmd/man.rb +++ b/Library/Homebrew/dev-cmd/man.rb @@ -24,12 +24,12 @@ module Homebrew Generate Homebrew's manpages. EOS switch "--fail-if-changed", - description: "Return a failing status code if changes are detected in the manpage outputs. This "\ - "can be used for CI to be notified when the manpages are out of date. Additionally, "\ - "the date used in new manpages will match those in the existing manpages (to allow "\ - "comparison without factoring in the date)." + description: "Return a failing status code if changes are detected in the manpage outputs. This "\ + "can be used for CI to be notified when the manpages are out of date. Additionally, "\ + "the date used in new manpages will match those in the existing manpages (to allow "\ + "comparison without factoring in the date)." switch "--link", - description: "This is now done automatically by `brew update`." + description: "This is now done automatically by `brew update`." end end diff --git a/Library/Homebrew/dev-cmd/pull.rb b/Library/Homebrew/dev-cmd/pull.rb index 0fbfffeb19..e5f1e043d9 100644 --- a/Library/Homebrew/dev-cmd/pull.rb +++ b/Library/Homebrew/dev-cmd/pull.rb @@ -36,28 +36,28 @@ module Homebrew on GitHub, the URL of a commit on GitHub or a "https://jenkins.brew.sh/job/..." testing job URL. EOS switch "--bottle", - description: "Handle bottles, pulling the bottle-update commit and publishing files on Bintray." + description: "Handle bottles, pulling the bottle-update commit and publishing files on Bintray." switch "--bump", - description: "For one-formula PRs, automatically reword commit message to our preferred format." + description: "For one-formula PRs, automatically reword commit message to our preferred format." switch "--clean", - description: "Do not rewrite or otherwise modify the commits found in the pulled PR." + description: "Do not rewrite or otherwise modify the commits found in the pulled PR." switch "--ignore-whitespace", - description: "Silently ignore whitespace discrepancies when applying diffs." + description: "Silently ignore whitespace discrepancies when applying diffs." switch "--resolve", - description: "When a patch fails to apply, leave in progress and allow user to resolve, instead "\ - "of aborting." + description: "When a patch fails to apply, leave in progress and allow user to resolve, instead "\ + "of aborting." switch "--branch-okay", - description: "Do not warn if pulling to a branch besides master (useful for testing)." + description: "Do not warn if pulling to a branch besides master (useful for testing)." switch "--no-pbcopy", - description: "Do not copy anything to the system clipboard." + description: "Do not copy anything to the system clipboard." switch "--no-publish", - description: "Do not publish bottles to Bintray." + description: "Do not publish bottles to Bintray." switch "--warn-on-publish-failure", - description: "Do not exit if there's a failure publishing bottles on Bintray." + description: "Do not exit if there's a failure publishing bottles on Bintray." flag "--bintray-org=", - description: "Publish bottles at the provided Bintray ." + description: "Publish bottles at the provided Bintray ." flag "--test-bot-user=", - description: "Pull the bottle block commit from the provided on GitHub." + description: "Pull the bottle block commit from the provided on GitHub." switch :verbose switch :debug end diff --git a/Library/Homebrew/dev-cmd/release-notes.rb b/Library/Homebrew/dev-cmd/release-notes.rb index fd65abc499..337147d28b 100644 --- a/Library/Homebrew/dev-cmd/release-notes.rb +++ b/Library/Homebrew/dev-cmd/release-notes.rb @@ -15,7 +15,7 @@ module Homebrew If no is provided it defaults to `origin/master`. EOS switch "--markdown", - description: "Print as a Markdown list." + description: "Print as a Markdown list." end end diff --git a/Library/Homebrew/dev-cmd/ruby.rb b/Library/Homebrew/dev-cmd/ruby.rb index dcc20138eb..93b36a7f36 100644 --- a/Library/Homebrew/dev-cmd/ruby.rb +++ b/Library/Homebrew/dev-cmd/ruby.rb @@ -14,7 +14,7 @@ module Homebrew `brew ruby -e "puts :gcc.f.deps"` or `brew ruby script.rb` EOS switch "-e", - description: "Execute the provided string argument as a script." + description: "Execute the provided string argument as a script." switch :verbose switch :debug end diff --git a/Library/Homebrew/dev-cmd/test.rb b/Library/Homebrew/dev-cmd/test.rb index 4c10ac5588..5e2721d034 100644 --- a/Library/Homebrew/dev-cmd/test.rb +++ b/Library/Homebrew/dev-cmd/test.rb @@ -20,11 +20,11 @@ module Homebrew *Example:* `brew install jruby && brew test jruby` EOS switch "--devel", - description: "Test the development version of a formula." + description: "Test the development version of a formula." switch "--HEAD", - description: "Test the head version of a formula." + description: "Test the head version of a formula." switch "--keep-tmp", - description: "Keep the temporary files created for the test." + description: "Keep the temporary files created for the test." switch :verbose switch :debug conflicts "--devel", "--HEAD" diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index 34795359ab..d918ca2a82 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -14,19 +14,19 @@ module Homebrew Run Homebrew's unit and integration tests. EOS switch "--coverage", - description: "Generate code coverage reports." + description: "Generate code coverage reports." switch "--generic", - description: "Run only OS-agnostic tests." + description: "Run only OS-agnostic tests." switch "--no-compat", - description: "Do not load the compatibility layer when running tests." + description: "Do not load the compatibility layer when running tests." switch "--online", - description: "Include tests that use the GitHub API and tests that use any of the taps for "\ - "official external commands." + description: "Include tests that use the GitHub API and tests that use any of the taps for "\ + "official external commands." flag "--only=", - description: "Run only `_spec.rb`. Appending `:` will start at a "\ - "specific line." + description: "Run only `_spec.rb`. Appending `:` will start at a "\ + "specific line." flag "--seed=", - description: "Randomise tests with the provided instead of a random seed." + description: "Randomise tests with the provided instead of a random seed." switch :verbose switch :debug end diff --git a/Library/Homebrew/dev-cmd/update-test.rb b/Library/Homebrew/dev-cmd/update-test.rb index 25c9e316ac..eed09234b5 100644 --- a/Library/Homebrew/dev-cmd/update-test.rb +++ b/Library/Homebrew/dev-cmd/update-test.rb @@ -14,13 +14,13 @@ module Homebrew If no arguments are passed, use `origin/master` as the start commit. EOS switch "--to-tag", - description: "Set `HOMEBREW_UPDATE_TO_TAG` to test updating between tags." + description: "Set `HOMEBREW_UPDATE_TO_TAG` to test updating between tags." switch "--keep-tmp", - description: "Retain the temporary directory containing the new repository clone." + description: "Retain the temporary directory containing the new repository clone." flag "--commit=", - description: "Use provided as the start commit." + description: "Use provided as the start commit." flag "--before=", - description: "Use the commit at provided as the start commit." + description: "Use the commit at provided as the start commit." switch :verbose switch :debug end diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index f2ef478d73..aee7d9b1fa 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -1068,7 +1068,7 @@ class DownloadStrategyDetector detect_from_symbol(using) else raise TypeError, - "Unknown download strategy specification #{strategy.inspect}" + "Unknown download strategy specification #{strategy.inspect}" end strategy diff --git a/Library/Homebrew/extend/os/mac/unpack_strategy/zip.rb b/Library/Homebrew/extend/os/mac/unpack_strategy/zip.rb index 4aaf225f18..b6bf16fa23 100644 --- a/Library/Homebrew/extend/os/mac/unpack_strategy/zip.rb +++ b/Library/Homebrew/extend/os/mac/unpack_strategy/zip.rb @@ -9,9 +9,9 @@ module UnpackStrategy # folder has incorrect permissions. # (Also, Homebrew's ZIP artifact automatically deletes this folder.) return system_command! "ditto", - args: ["-x", "-k", path, unpack_dir], - verbose: verbose, - print_stderr: false + args: ["-x", "-k", path, unpack_dir], + verbose: verbose, + print_stderr: false end result = begin diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 09fd6822b0..b549b762d6 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -196,8 +196,8 @@ class FormulaInstaller return if pinned_unsatisfied_deps.empty? raise CannotInstallFormulaError, - "You must `brew unpin #{pinned_unsatisfied_deps * " "}` as installing " \ - "#{formula.full_name} requires the latest version of pinned dependencies" + "You must `brew unpin #{pinned_unsatisfied_deps * " "}` as installing " \ + "#{formula.full_name} requires the latest version of pinned dependencies" end def build_bottle_preinstall diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index e884fe7442..0e2de5ea60 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -31,12 +31,12 @@ module Formulary begin mod.const_get(class_name) - rescue NameError => original_exception + rescue NameError => e class_list = mod.constants .map { |const_name| mod.const_get(const_name) } .select { |const| const.is_a?(Class) } - e = FormulaClassUnavailableError.new(name, path, class_name, class_list) - raise e, "", original_exception.backtrace + new_exception = FormulaClassUnavailableError.new(name, path, class_name, class_list) + raise new_exception, "", e.backtrace end end @@ -463,7 +463,7 @@ module Formulary selected_formula = factory(possible_pinned_tap_formulae.first, spec) if core_path(ref).file? odeprecated "brew tap-pin user/tap", - "fully-scoped user/tap/formula naming" + "fully-scoped user/tap/formula naming" opoo <<~EOS #{ref} is provided by core, but is now shadowed by #{selected_formula.full_name}. This behaviour is deprecated and will be removed in Homebrew 2.2.0. diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index a1f480e1fc..5c509d4600 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -189,8 +189,8 @@ class Keg extend Forwardable def_delegators :path, - :to_s, :hash, :abv, :disk_usage, :file_count, :directory?, :exist?, :/, - :join, :rename, :find + :to_s, :hash, :abv, :disk_usage, :file_count, :directory?, :exist?, :/, + :join, :rename, :find def initialize(path) path = path.resolved_path if path.to_s.start_with?("#{HOMEBREW_PREFIX}/opt/") diff --git a/Library/Homebrew/patch.rb b/Library/Homebrew/patch.rb index 8f0d5a5c05..de2783147c 100644 --- a/Library/Homebrew/patch.rb +++ b/Library/Homebrew/patch.rb @@ -117,8 +117,8 @@ class ExternalPatch attr_reader :resource, :strip def_delegators :resource, - :url, :fetch, :patch_files, :verify_download_integrity, :cached_download, - :clear_cache + :url, :fetch, :patch_files, :verify_download_integrity, :cached_download, + :clear_cache def initialize(strip, &block) @strip = strip diff --git a/Library/Homebrew/requirements/codesign_requirement.rb b/Library/Homebrew/requirements/codesign_requirement.rb index 9a48f204bf..b3643e6f23 100644 --- a/Library/Homebrew/requirements/codesign_requirement.rb +++ b/Library/Homebrew/requirements/codesign_requirement.rb @@ -18,7 +18,7 @@ class CodesignRequirement < Requirement mktemp do FileUtils.cp "/usr/bin/false", "codesign_check" quiet_system "/usr/bin/codesign", "-f", "-s", @identity, - "--dryrun", "codesign_check" + "--dryrun", "codesign_check" end end diff --git a/Library/Homebrew/requirements/java_requirement.rb b/Library/Homebrew/requirements/java_requirement.rb index d563ac5476..78014fdab8 100644 --- a/Library/Homebrew/requirements/java_requirement.rb +++ b/Library/Homebrew/requirements/java_requirement.rb @@ -71,7 +71,7 @@ class JavaRequirement < Requirement JAVA_SUGGESTION_MAP = { "1.8" => CaskSuggestion.new( "homebrew/cask-versions/adoptopenjdk8", - "AdoptOpenJDK 8", + "AdoptOpenJDK 8", ), "12.0" => CaskSuggestion.new("adoptopenjdk", "AdoptOpenJDK"), }.freeze diff --git a/Library/Homebrew/rubocops.rb b/Library/Homebrew/rubocops.rb index b3a1fabbe3..8319d11158 100644 --- a/Library/Homebrew/rubocops.rb +++ b/Library/Homebrew/rubocops.rb @@ -2,6 +2,7 @@ require_relative "load_path" +require "rubocop-performance" require "rubocop-rspec" require "rubocops/formula_desc" require "rubocops/components_order" diff --git a/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb b/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb index d5b3c7a990..c8b2c50c09 100644 --- a/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb +++ b/Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb @@ -250,7 +250,7 @@ shared_examples "#uninstall_phase or #zap_phase" do expect(subject).to receive(:system_command!) .with( "osascript", - args: ["-e", 'tell application "System Events" to delete every login item whose name is "Fancy"'], + args: ["-e", 'tell application "System Events" to delete every login item whose name is "Fancy"'], ) .and_return(instance_double("SystemCommand::Result")) diff --git a/Library/Homebrew/test/cask/cmd/style_spec.rb b/Library/Homebrew/test/cask/cmd/style_spec.rb index 7e49ab3305..7faa9771ba 100644 --- a/Library/Homebrew/test/cask/cmd/style_spec.rb +++ b/Library/Homebrew/test/cask/cmd/style_spec.rb @@ -81,7 +81,7 @@ describe Cask::Cmd::Style, :cask do it { expect(subject).to contain_exactly(a_path_ending_with("/homebrew/homebrew-cask/Casks"), - a_path_ending_with("/third-party/homebrew-tap/Casks")) + a_path_ending_with("/third-party/homebrew-tap/Casks")) } end diff --git a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb index 25a3dffc84..6ce53e97f4 100644 --- a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb +++ b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb @@ -221,7 +221,7 @@ RSpec.shared_context "integration test" do system "git", "init" system "git", "add", "--all" system "git", "commit", "-m", - "#{old_name.capitalize} has not yet been renamed" + "#{old_name.capitalize} has not yet been renamed" brew "install", old_name @@ -230,7 +230,7 @@ RSpec.shared_context "integration test" do system "git", "add", "--all" system "git", "commit", "-m", - "#{old_name.capitalize} has been renamed to #{new_name.capitalize}" + "#{old_name.capitalize} has been renamed to #{new_name.capitalize}" end end diff --git a/Library/Homebrew/test/tap_spec.rb b/Library/Homebrew/test/tap_spec.rb index 699fb52933..90ebbb2be4 100644 --- a/Library/Homebrew/test/tap_spec.rb +++ b/Library/Homebrew/test/tap_spec.rb @@ -120,7 +120,7 @@ describe Tap do cd path do system "git", "init" system "git", "remote", "add", "origin", - "https://github.com/someone/homebrew-foo" + "https://github.com/someone/homebrew-foo" end expect(t.issues_url).to eq("https://github.com/someone/homebrew-foo/issues") expect(subject.issues_url).to eq("https://github.com/Homebrew/homebrew-foo/issues") diff --git a/Library/Homebrew/test/utils/git_spec.rb b/Library/Homebrew/test/utils/git_spec.rb index 4160c1587b..9f054e0096 100644 --- a/Library/Homebrew/test/utils/git_spec.rb +++ b/Library/Homebrew/test/utils/git_spec.rb @@ -35,8 +35,8 @@ describe Git do it "gives revision commit based on before_commit when it is not nil" do expect( described_class.last_revision_commit_of_file(HOMEBREW_CACHE, - file, - before_commit: hash2), + file, + before_commit: hash2), ).to eq(hash2) end end diff --git a/Library/Homebrew/test/utils/svn_spec.rb b/Library/Homebrew/test/utils/svn_spec.rb index af8b287579..04492e9fed 100644 --- a/Library/Homebrew/test/utils/svn_spec.rb +++ b/Library/Homebrew/test/utils/svn_spec.rb @@ -35,8 +35,8 @@ describe Utils do it "returns true when remote exists", :needs_network, :needs_svn do HOMEBREW_CACHE.cd do system HOMEBREW_SHIMS_PATH/"scm/svn", "checkout", - "--non-interactive", "--trust-server-cert", "--quiet", - "https://github.com/Homebrew/install" + "--non-interactive", "--trust-server-cert", "--quiet", + "https://github.com/Homebrew/install" end expect(described_class).to be_svn_remote_exists(HOMEBREW_CACHE/"install") diff --git a/Library/Homebrew/utils/analytics.rb b/Library/Homebrew/utils/analytics.rb index df025a2ca7..b5ccf23fb7 100644 --- a/Library/Homebrew/utils/analytics.rb +++ b/Library/Homebrew/utils/analytics.rb @@ -63,9 +63,9 @@ module Utils else pid = fork do exec ENV["HOMEBREW_CURL"], - *args, - "--silent", "--output", "/dev/null", - "https://www.google-analytics.com/collect" + *args, + "--silent", "--output", "/dev/null", + "https://www.google-analytics.com/collect" end Process.detach pid end @@ -73,10 +73,10 @@ module Utils def report_event(category, action, label = os_prefix_ci, value = nil) report(:event, - ec: category, - ea: action, - el: label, - ev: value) + ec: category, + ea: action, + el: label, + ev: value) end def report_build_error(exception) diff --git a/Library/Homebrew/utils/bottles.rb b/Library/Homebrew/utils/bottles.rb index cb2a789ce2..b3b1048f29 100644 --- a/Library/Homebrew/utils/bottles.rb +++ b/Library/Homebrew/utils/bottles.rb @@ -60,7 +60,7 @@ module Utils end def formula_contents(bottle_file, - name: resolve_formula_names(bottle_file)[0]) + name: resolve_formula_names(bottle_file)[0]) bottle_version = resolve_version bottle_file formula_path = "#{name}/#{bottle_version}/.brew/#{name}.rb" contents = Utils.popen_read "tar", "-xOzf", bottle_file, formula_path