Manual brew style fixes.

This commit is contained in:
Mike McQuaid 2022-06-28 10:17:14 +01:00
parent 2d5eab2e1c
commit 22d6af1258
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829
10 changed files with 28 additions and 30 deletions

View File

@ -78,8 +78,8 @@ module Homebrew
description: "Specify a comma-separated <cops> list to check for violations of only the listed " \ description: "Specify a comma-separated <cops> list to check for violations of only the listed " \
"RuboCop cops." "RuboCop cops."
comma_array "--except-cops", comma_array "--except-cops",
description: "Specify a comma-separated <cops> list to skip checking for violations of the listed " \ description: "Specify a comma-separated <cops> list to skip checking for violations of the " \
"RuboCop cops." "listed RuboCop cops."
switch "--formula", "--formulae", switch "--formula", "--formulae",
description: "Treat all named arguments as formulae." description: "Treat all named arguments as formulae."
switch "--cask", "--casks", switch "--cask", "--casks",

View File

@ -65,8 +65,8 @@ module Homebrew
"`--merge`." "`--merge`."
switch "--merge", switch "--merge",
description: "Generate an updated bottle block for a formula and optionally merge it into the " \ description: "Generate an updated bottle block for a formula and optionally merge it into the " \
"formula file. Instead of a formula name, requires the path to a JSON file generated with " \ "formula file. Instead of a formula name, requires the path to a JSON file generated " \
"`brew bottle --json` <formula>." "with `brew bottle --json` <formula>."
switch "--write", switch "--write",
depends_on: "--merge", depends_on: "--merge",
description: "Write changes to the formula file. A new commit will be generated unless " \ description: "Write changes to the formula file. A new commit will be generated unless " \

View File

@ -82,8 +82,8 @@ module Homebrew
description: "Append these options to all `cask` commands. All `--*dir` options, " \ description: "Append these options to all `cask` commands. All `--*dir` options, " \
"`--language`, `--require-sha`, `--no-quarantine` and `--no-binaries` are supported. " \ "`--language`, `--require-sha`, `--no-quarantine` and `--no-binaries` are supported. " \
"For example, you might add something like the following to your " \ "For example, you might add something like the following to your " \
"`~/.profile`, `~/.bash_profile`, or `~/.zshenv`:\n\n" \ "`~/.profile`, `~/.bash_profile`, or `~/.zshenv`:" \
' `export HOMEBREW_CASK_OPTS="--appdir=~/Applications --fontdir=/Library/Fonts"`', '\n\n `export HOMEBREW_CASK_OPTS="--appdir=~/Applications --fontdir=/Library/Fonts"`',
}, },
HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: { HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: {
description: "If set, `brew install`, `brew upgrade` and `brew reinstall` will cleanup all formulae " \ description: "If set, `brew install`, `brew upgrade` and `brew reinstall` will cleanup all formulae " \
@ -258,7 +258,7 @@ module Homebrew
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: { HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: {
description: "If set, do not check for broken linkage of dependents or outdated dependents after " \ description: "If set, do not check for broken linkage of dependents or outdated dependents after " \
"installing, upgrading or reinstalling formulae. This will result in fewer dependents " \ "installing, upgrading or reinstalling formulae. This will result in fewer dependents " \
" (and their dependencies) being upgraded or reinstalled but may result in more breakage " \ "(and their dependencies) being upgraded or reinstalled but may result in more breakage " \
"from running `brew install <formula>` or `brew upgrade <formula>`.", "from running `brew install <formula>` or `brew upgrade <formula>`.",
boolean: true, boolean: true,
}, },

View File

@ -27,15 +27,15 @@ module RuboCop
if option !~ /with(out)?-/ && if option !~ /with(out)?-/ &&
option != "cxx11" && option != "cxx11" &&
option != "universal" option != "universal"
problem "Options should begin with with/without." \ problem "Options should begin with with/without. " \
" Migrate '--#{option}' with `deprecated_option`." "Migrate '--#{option}' with `deprecated_option`."
end end
next unless option =~ /^with(out)?-(?:checks?|tests)$/ next unless option =~ /^with(out)?-(?:checks?|tests)$/
next if depends_on?("check", :optional, :recommended) next if depends_on?("check", :optional, :recommended)
problem "Use '--with#{Regexp.last_match(1)}-test' instead of '--#{option}'." \ problem "Use '--with#{Regexp.last_match(1)}-test' instead of '--#{option}'. " \
" Migrate '--#{option}' with `deprecated_option`." "Migrate '--#{option}' with `deprecated_option`."
end end
return if formula_tap != "homebrew-core" return if formula_tap != "homebrew-core"

View File

@ -97,9 +97,12 @@ class Attr < Parlour::Plugin
when :attr_rw when :attr_rw
name = node.shift name = node.shift
name = "self.#{name}" if sclass name = "self.#{name}" if sclass
namespace.create_method(name, parameters: [ namespace.create_method(name,
Parlour::RbiGenerator::Parameter.new("arg", type: "T.untyped", default: "T.unsafe(nil)"), parameters: [
], return_type: "T.untyped") Parlour::RbiGenerator::Parameter.new("arg", type: "T.untyped",
default: "T.unsafe(nil)"),
],
return_type: "T.untyped")
when :attr_predicate when :attr_predicate
name = node.shift name = node.shift
name = "self.#{name}" if sclass name = "self.#{name}" if sclass

View File

@ -109,8 +109,8 @@ describe RuboCop::Cop::Cask::StanzaOrder do
severity: :convention, severity: :convention,
line: 3, line: 3,
column: 2, column: 2,
source: "uninstall :quit => 'com.example.foo',\n" \ source: "uninstall :quit => 'com.example.foo'," \
" :kext => 'com.example.foo.kext'", "\n :kext => 'com.example.foo.kext'",
}, { }, {
message: "`version` stanza out of order", message: "`version` stanza out of order",
severity: :convention, severity: :convention,

View File

@ -62,8 +62,8 @@ describe "Utils::Curl" do
"cache-control" => "private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0", "cache-control" => "private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0",
"expires" => "Thu, 01 Jan 1970 00:00:01 GMT", "expires" => "Thu, 01 Jan 1970 00:00:01 GMT",
"expect-ct" => "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"", "expect-ct" => "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"",
"set-cookie" => "__cf_bm=0123456789abcdef; path=/; expires=Wed, 31-Jan-20 01:23:45 GMT;" \ "set-cookie" => "__cf_bm=0123456789abcdef; path=/; expires=Wed, 31-Jan-20 01:23:45 GMT; " \
" domain=www.example.com; HttpOnly; Secure; SameSite=None", "domain=www.example.com; HttpOnly; Secure; SameSite=None",
"server" => "cloudflare", "server" => "cloudflare",
"cf-ray" => "0123456789abcdef-IAD", "cf-ray" => "0123456789abcdef-IAD",
"alt-svc" => "h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400", "alt-svc" => "h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400",
@ -77,8 +77,8 @@ describe "Utils::Curl" do
details[:cloudflare][:multiple_cookies] = Marshal.load(Marshal.dump(details[:cloudflare][:single_cookie])) details[:cloudflare][:multiple_cookies] = Marshal.load(Marshal.dump(details[:cloudflare][:single_cookie]))
details[:cloudflare][:multiple_cookies][:headers]["set-cookie"] = [ details[:cloudflare][:multiple_cookies][:headers]["set-cookie"] = [
"first_cookie=for_testing", "first_cookie=for_testing",
"__cf_bm=abcdef0123456789; path=/; expires=Thu, 28-Apr-22 18:38:40 GMT; domain=www.example.com; HttpOnly;" \ "__cf_bm=abcdef0123456789; path=/; expires=Thu, 28-Apr-22 18:38:40 GMT; domain=www.example.com; HttpOnly; " \
" Secure; SameSite=None", "Secure; SameSite=None",
"last_cookie=also_for_testing", "last_cookie=also_for_testing",
] ]

View File

@ -549,8 +549,8 @@ module GitHub
ohai "git fetch --unshallow origin" if shallow ohai "git fetch --unshallow origin" if shallow
ohai "git add #{changed_files.join(" ")}" ohai "git add #{changed_files.join(" ")}"
ohai "git checkout --no-track -b #{branch} #{remote}/#{remote_branch}" ohai "git checkout --no-track -b #{branch} #{remote}/#{remote_branch}"
ohai "git commit --no-edit --verbose --message='#{commit_message}'" \ ohai "git commit --no-edit --verbose --message='#{commit_message}' " \
" -- #{changed_files.join(" ")}" "-- #{changed_files.join(" ")}"
ohai "git push --set-upstream #{remote_url} #{branch}:#{branch}" ohai "git push --set-upstream #{remote_url} #{branch}:#{branch}"
ohai "git checkout --quiet #{previous_branch}" ohai "git checkout --quiet #{previous_branch}"
ohai "create pull request with GitHub API (base branch: #{remote_branch})" ohai "create pull request with GitHub API (base branch: #{remote_branch})"

View File

@ -1982,9 +1982,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
*Default:* macOS: `$HOME/Library/Caches/Homebrew`, Linux: `$XDG_CACHE_HOME/Homebrew` or `$HOME/.cache/Homebrew`. *Default:* macOS: `$HOME/Library/Caches/Homebrew`, Linux: `$XDG_CACHE_HOME/Homebrew` or `$HOME/.cache/Homebrew`.
- `HOMEBREW_CASK_OPTS` - `HOMEBREW_CASK_OPTS`
<br>Append these options to all `cask` commands. All `--*dir` options, `--language`, `--require-sha`, `--no-quarantine` and `--no-binaries` are supported. For example, you might add something like the following to your `~/.profile`, `~/.bash_profile`, or `~/.zshenv`: <br>Append these options to all `cask` commands. All `--*dir` options, `--language`, `--require-sha`, `--no-quarantine` and `--no-binaries` are supported. For example, you might add something like the following to your `~/.profile`, `~/.bash_profile`, or `~/.zshenv`:\n\n `export HOMEBREW_CASK_OPTS="--appdir=~/Applications --fontdir=/Library/Fonts"`
`export HOMEBREW_CASK_OPTS="--appdir=~/Applications --fontdir=/Library/Fonts"`
- `HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS` - `HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS`
<br>If set, `brew install`, `brew upgrade` and `brew reinstall` will cleanup all formulae when this number of days has passed. <br>If set, `brew install`, `brew upgrade` and `brew reinstall` will cleanup all formulae when this number of days has passed.
@ -2124,7 +2122,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
<br>If set, do not use Bootsnap to speed up repeated `brew` calls. <br>If set, do not use Bootsnap to speed up repeated `brew` calls.
- `HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK` - `HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK`
<br>If set, do not check for broken linkage of dependents or outdated dependents after installing, upgrading or reinstalling formulae. This will result in fewer dependents (and their dependencies) being upgraded or reinstalled but may result in more breakage from running `brew install *`formula`*` or `brew upgrade *`formula`*`. <br>If set, do not check for broken linkage of dependents or outdated dependents after installing, upgrading or reinstalling formulae. This will result in fewer dependents (and their dependencies) being upgraded or reinstalled but may result in more breakage from running `brew install *`formula`*` or `brew upgrade *`formula`*`.
- `HOMEBREW_NO_CLEANUP_FORMULAE` - `HOMEBREW_NO_CLEANUP_FORMULAE`
<br>A comma-separated list of formulae. Homebrew will refuse to clean up a formula if it appears on this list. <br>A comma-separated list of formulae. Homebrew will refuse to clean up a formula if it appears on this list.

View File

@ -2826,10 +2826,7 @@ Use this directory as the download cache\.
\fBHOMEBREW_CASK_OPTS\fR \fBHOMEBREW_CASK_OPTS\fR
. .
.br .br
Append these options to all \fBcask\fR commands\. All \fB\-\-*dir\fR options, \fB\-\-language\fR, \fB\-\-require\-sha\fR, \fB\-\-no\-quarantine\fR and \fB\-\-no\-binaries\fR are supported\. For example, you might add something like the following to your \fB~/\.profile\fR, \fB~/\.bash_profile\fR, or \fB~/\.zshenv\fR: Append these options to all \fBcask\fR commands\. All \fB\-\-*dir\fR options, \fB\-\-language\fR, \fB\-\-require\-sha\fR, \fB\-\-no\-quarantine\fR and \fB\-\-no\-binaries\fR are supported\. For example, you might add something like the following to your \fB~/\.profile\fR, \fB~/\.bash_profile\fR, or \fB~/\.zshenv\fR:\en\en \fBexport HOMEBREW_CASK_OPTS="\-\-appdir=~/Applications \-\-fontdir=/Library/Fonts"\fR
.
.IP
\fBexport HOMEBREW_CASK_OPTS="\-\-appdir=~/Applications \-\-fontdir=/Library/Fonts"\fR
. .
.TP .TP
\fBHOMEBREW_CLEANUP_PERIODIC_FULL_DAYS\fR \fBHOMEBREW_CLEANUP_PERIODIC_FULL_DAYS\fR