Merge branch 'master' into integrate-uninstall-reinstall

This commit is contained in:
William Ma 2020-06-26 09:18:19 -04:00
commit 1044cb91c3
58 changed files with 235 additions and 154 deletions

View File

@ -1,7 +1,7 @@
- [ ] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md) document?
- [ ] Have you followed the guidelines in our [Contributing](https://github.com/Homebrew/brew/blob/HEAD/CONTRIBUTING.md) document?
- [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/Homebrew/brew/pulls) for the same change?
- [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
- [ ] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/test/PATH_spec.rb).
- [ ] Have you written new tests for your changes? [Here's an example](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/test/PATH_spec.rb).
- [ ] Have you successfully run `brew style` with your changes locally?
- [ ] Have you successfully run `brew tests` with your changes locally?

View File

@ -1,6 +1,6 @@
# Contributing to Homebrew
First time contributing to Homebrew? Read our [Code of Conduct](https://github.com/Homebrew/.github/blob/master/CODE_OF_CONDUCT.md#code-of-conduct) and review [How To Open a Homebrew Pull Request](https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request).
First time contributing to Homebrew? Read our [Code of Conduct](https://github.com/Homebrew/.github/blob/HEAD/CODE_OF_CONDUCT.md#code-of-conduct) and review [How To Open a Homebrew Pull Request](https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request).
### Report a bug

View File

@ -1,7 +1,7 @@
inherit_from: ./.rubocop_shared.yml
Cask/HomepageMatchesUrl:
Description: 'Ensure that the homepage and url match, otherwise add a comment. More info at https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment'
Description: 'Ensure that the homepage and url match, otherwise add a comment. More info at https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment'
Enabled: true
Exclude:
- '**/test/support/fixtures/cask/Casks/**/*.rb'
@ -15,11 +15,11 @@ Cask/NoDslVersion:
Enabled: true
Cask/StanzaGrouping:
Description: 'Ensure that cask stanzas are grouped correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order'
Description: 'Ensure that cask stanzas are grouped correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order'
Enabled: true
Cask/StanzaOrder:
Description: 'Ensure that cask stanzas are sorted correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order'
Description: 'Ensure that cask stanzas are sorted correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order'
Enabled: true
Layout/HashAlignment:

View File

@ -219,7 +219,7 @@ module Cask
def check_hosting_with_appcast
return if cask.appcast
add_appcast = "please add an appcast. See https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/appcast.md"
add_appcast = "please add an appcast. See https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/appcast.md"
case cask.url.to_s
when %r{github.com/([^/]+)/([^/]+)/releases/download/(\S+)}
@ -246,9 +246,9 @@ module Cask
def check_download_url_format
odebug "Auditing URL format"
if bad_sourceforge_url?
add_warning "SourceForge URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
add_warning "SourceForge URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
elsif bad_osdn_url?
add_warning "OSDN URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
add_warning "OSDN URL format incorrect. See https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/cask_language_reference/stanzas/url.md#sourceforgeosdn-urls"
end
end
@ -355,7 +355,7 @@ module Cask
end
def core_formula_url
"#{core_tap.default_remote}/blob/master/Formula/#{cask.token}.rb"
"#{core_tap.default_remote}/blob/HEAD/Formula/#{cask.token}.rb"
end
def check_download

View File

@ -97,7 +97,7 @@ module Cask
url = if cask.tap.custom_remote? && !cask.tap.remote.nil?
cask.tap.remote
else
"#{cask.tap.default_remote}/blob/master/Casks/#{cask.token}.rb"
"#{cask.tap.default_remote}/blob/HEAD/Casks/#{cask.token}.rb"
end
"From: #{Formatter.url(url)}"

View File

@ -151,7 +151,7 @@ module Cask
File: #{path}
To retry an incomplete download, remove the file above.
If the issue persists, visit:
#{Formatter.url("https://github.com/Homebrew/homebrew-cask/blob/master/doc/reporting_bugs/checksum_does_not_match_error.md")}
#{Formatter.url("https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/reporting_bugs/checksum_does_not_match_error.md")}
EOS
end
end

View File

@ -22,9 +22,9 @@ module Homebrew
switch "--force-bottle",
description: "Show the cache file used when pouring a bottle."
switch "--formula",
description: "Show cache files for only formulae"
description: "Only show cache files for formulae."
switch "--cask",
description: "Show cache files for only casks"
description: "Only show cache files for casks."
conflicts "--build-from-source", "--force-bottle"
conflicts "--formula", "--cask"
end

View File

@ -140,7 +140,7 @@ module Homebrew
def github_remote_path(remote, path)
if remote =~ %r{^(?:https?://|git(?:@|://))github\.com[:/](.+)/(.+?)(?:\.git)?$}
"https://github.com/#{Regexp.last_match(1)}/#{Regexp.last_match(2)}/blob/master/#{path}"
"https://github.com/#{Regexp.last_match(1)}/#{Regexp.last_match(2)}/blob/HEAD/#{path}"
else
"#{remote}/#{path}"
end

View File

@ -23,6 +23,8 @@ module Homebrew
description: "Create a basic template for an Autotools-style build."
switch "--cmake",
description: "Create a basic template for a CMake-style build."
switch "--crystal",
description: "Create a basic template for a Crystal build."
switch "--go",
description: "Create a basic template for a Go build."
switch "--meson",
@ -50,7 +52,7 @@ module Homebrew
switch :force
switch :verbose
switch :debug
conflicts "--autotools", "--cmake", "--go", "--meson", "--perl", "--python", "--rust"
conflicts "--autotools", "--cmake", "--crystal", "--go", "--meson", "--perl", "--python", "--rust"
named 1
end
end
@ -82,6 +84,8 @@ module Homebrew
:autotools
elsif args.meson?
:meson
elsif args.crystal?
:crystal
elsif args.go?
:go
elsif args.perl?

View File

@ -14,9 +14,9 @@ module Homebrew
Reupload the stable URL of a formula to Bintray for use as a mirror.
EOS
flag "--bintray-org=",
description: "Upload to the specified Bintray organisation (default: homebrew)."
description: "Upload to the specified Bintray organisation (default: `homebrew`)."
flag "--bintray-repo=",
description: "Upload to the specified Bintray repository (default: mirror)."
description: "Upload to the specified Bintray repository (default: `mirror`)."
switch "--no-publish",
description: "Upload to Bintray, but don't publish."
switch :verbose

View File

@ -34,18 +34,18 @@ module Homebrew
description: "When a patch fails to apply, leave in progress and allow user to resolve, "\
"instead of aborting."
flag "--workflow=",
description: "Retrieve artifacts from the specified workflow (default: tests.yml)."
description: "Retrieve artifacts from the specified workflow (default: `tests.yml`)."
flag "--artifact=",
description: "Download artifacts with the specified name (default: bottles)."
description: "Download artifacts with the specified name (default: `bottles`)."
flag "--bintray-org=",
description: "Upload to the specified Bintray organisation (default: homebrew)."
description: "Upload to the specified Bintray organisation (default: `homebrew`)."
flag "--tap=",
description: "Target tap repository (default: homebrew/core)."
description: "Target tap repository (default: `homebrew/core`)."
flag "--root-url=",
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
flag "--bintray-mirror=",
description: "Use the specified Bintray repository to automatically mirror stable URLs "\
"defined in the formulae (default: mirror)"
"defined in the formulae (default: `mirror`)."
switch :verbose
switch :debug
min_named 1

View File

@ -15,10 +15,10 @@ module Homebrew
EOS
switch "--no-publish",
description: "Apply the bottle commit and upload the bottles, but don't publish them."
switch "--dry-run", "-n",
switch "-n", "--dry-run",
description: "Print what would be done rather than doing it."
flag "--bintray-org=",
description: "Upload to the specified Bintray organisation (default: homebrew)."
description: "Upload to the specified Bintray organisation (default: `homebrew`)."
flag "--root-url=",
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
switch :verbose

View File

@ -21,7 +21,7 @@ module Hardware
return :dunno unless intel?
# See https://software.intel.com/en-us/articles/intel-architecture-and-processor-identification-with-cpuid-model-and-family-numbers
# and https://github.com/llvm-mirror/llvm/blob/master/lib/Support/Host.cpp
# and https://github.com/llvm-mirror/llvm/blob/HEAD/lib/Support/Host.cpp
# and https://en.wikipedia.org/wiki/List_of_Intel_CPU_microarchitectures#Roadmap
cpu_family = cpuinfo[/^cpu family\s*: ([0-9]+)/, 1].to_i
cpu_model = cpuinfo[/^model\s*: ([0-9]+)/, 1].to_i

View File

@ -6,7 +6,9 @@ module Utils
undef tag
def tag
MacOS.version.to_sym
tag = MacOS.version.to_sym
tag = "#{tag}_arm".to_sym if Hardware::CPU.arm?
tag
end
end

View File

@ -103,6 +103,8 @@ module Homebrew
<% if mode == :cmake %>
depends_on "cmake" => :build
<% elsif mode == :crystal %>
depends_on "crystal" => :build
<% elsif mode == :go %>
depends_on "go" => :build
<% elsif mode == :meson %>
@ -138,6 +140,9 @@ module Homebrew
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=\#{prefix}"
<% elsif mode == :crystal %>
system "shards", "build", "--release"
bin.install "bin/#{name}"
<% elsif mode == :go %>
system "go", "build", *std_go_args
<% elsif mode == :meson %>

View File

@ -103,7 +103,7 @@ module Homebrew
help_lines = command_help_lines(path)
return if help_lines.blank?
Formatter.wrap(help_lines.join.delete_prefix(" "), COMMAND_DESC_WIDTH)
Formatter.wrap(help_lines.join, COMMAND_DESC_WIDTH)
.sub("@hide_from_man_page ", "")
.sub(/^\* /, "#{Tty.bold}Usage: brew#{Tty.reset} ")
.gsub(/`(.*?)`/m, "#{Tty.bold}\\1#{Tty.reset}")

View File

@ -80,7 +80,7 @@ class Keg
).map { |dir| HOMEBREW_PREFIX/dir }.sort.uniq.freeze
# Keep relatively in sync with
# https://github.com/Homebrew/install/blob/master/install
# https://github.com/Homebrew/install/blob/HEAD/install
MUST_EXIST_DIRECTORIES = (MUST_EXIST_SUBDIRECTORIES + [
HOMEBREW_CELLAR,
].sort.uniq).freeze

View File

@ -3,6 +3,7 @@
require "keg"
require "formula"
require "linkage_cache_store"
require "fiddle"
class LinkageChecker
attr_reader :undeclared_deps
@ -125,6 +126,11 @@ class LinkageChecker
if (dep = dylib_to_dep(dylib))
@broken_deps[dep] |= [dylib]
elsif MacOS.version >= :big_sur && dylib_found_via_dlopen(dylib)
# If we cannot associate the dylib with a dependency, then it may be a system library.
# In macOS Big Sur and later, system libraries do not exist on-disk and instead exist in a cache.
# If dlopen finds the dylib, then the linkage is not broken.
@system_dylibs << dylib
else
@broken_dylibs << dylib
end
@ -151,6 +157,13 @@ class LinkageChecker
end
alias generic_check_dylibs check_dylibs
def dylib_found_via_dlopen(dylib)
Fiddle.dlopen(dylib).close
true
rescue Fiddle::DLError
false
end
def check_formula_deps
filter_out = proc do |dep|
next true if dep.build?

View File

@ -43,14 +43,14 @@ module OS
def latest_stable_version
# TODO: bump version when new macOS is released and also update
# references in docs/Installation.md and
# https://github.com/Homebrew/install/blob/master/install
# https://github.com/Homebrew/install/blob/HEAD/install
Version.new "10.15"
end
def outdated_release?
# TODO: bump version when new macOS is released and also update
# references in docs/Installation.md and
# https://github.com/Homebrew/install/blob/master/install
# https://github.com/Homebrew/install/blob/HEAD/install
version < "10.13"
end

View File

@ -14,7 +14,7 @@ module RuboCop
include CaskHelp
REFERENCE_URL =
"https://github.com/Homebrew/homebrew-cask/blob/master/doc/" \
"https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/" \
"cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment"
COMMENT_FORMAT = /# [^ ]+ was verified as official when first introduced to the cask/.freeze

View File

@ -6,7 +6,7 @@ module RuboCop
module Cop
module Cask
# This cop checks that a cask's stanzas are grouped correctly.
# See https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order
# See https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order
# for more info.
class StanzaGrouping < Cop
extend Forwardable

View File

@ -6,7 +6,7 @@ module RuboCop
module Cop
module Cask
# This cop checks that a cask's stanzas are ordered correctly.
# See https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md#stanza-order
# See https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order
# for more info.
class StanzaOrder < Cop
extend Forwardable

View File

@ -495,7 +495,15 @@ module RuboCop
when :str
node.str_content
when :dstr
node.each_child_node(:str).map(&:str_content).join
content = ""
node.each_child_node(:str, :begin) do |child|
content += if child.begin_type?
child.source
else
child.str_content
end
end
content
when :const
node.const_name
when :sym

View File

@ -1,5 +1,5 @@
# This file is autogenerated. Do not edit it by hand. Regenerate it with:
# tapioca sync
# tapioca sync --exclude json
# typed: false

View File

@ -1,5 +1,5 @@
# This file is autogenerated. Do not edit it by hand. Regenerate it with:
# tapioca sync
# tapioca sync --exclude json
# typed: true

View File

@ -1,5 +1,5 @@
# This file is autogenerated. Do not edit it by hand. Regenerate it with:
# tapioca sync
# tapioca sync --exclude json
# typed: true

View File

@ -1,5 +1,5 @@
# This file is autogenerated. Do not edit it by hand. Regenerate it with:
# tapioca sync
# tapioca sync --exclude json
# typed: true
@ -53,7 +53,9 @@ class Parser::AST::Processor < ::AST::Processor
def on_empty_else(node); end
def on_ensure(node); end
def on_erange(node); end
def on_find_pattern(node); end
def on_for(node); end
def on_forward_arg(node); end
def on_gvar(node); end
def on_gvasgn(node); end
def on_hash(node); end
@ -217,9 +219,11 @@ class Parser::Builders::Default
def emit_file_line_as_literals; end
def emit_file_line_as_literals=(_); end
def false(false_t); end
def find_pattern(lbrack_t, elements, rbrack_t); end
def float(float_t); end
def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end
def forward_args(begin_t, dots_t, end_t); end
def forward_arg(dots_t); end
def forward_only_args(begin_t, dots_t, end_t); end
def forwarded_args(dots_t); end
def gvar(token); end
def hash_pattern(lbrace_t, kwargs, rbrace_t); end
@ -366,6 +370,8 @@ class Parser::Builders::Default
def self.emit_arg_inside_procarg0=(_); end
def self.emit_encoding; end
def self.emit_encoding=(_); end
def self.emit_forward_arg; end
def self.emit_forward_arg=(_); end
def self.emit_index; end
def self.emit_index=(_); end
def self.emit_lambda; end
@ -1024,8 +1030,11 @@ class Parser::Source::TreeRewriter
def initialize(source_buffer, crossing_deletions: _, different_replacements: _, swallowed_insertions: _); end
def as_nested_actions; end
def as_replacements; end
def diagnostics; end
def empty?; end
def import!(foreign_rewriter, offset: _); end
def in_transaction?; end
def insert_after(range, content); end
def insert_after_multi(range, text); end
@ -1059,10 +1068,13 @@ class Parser::Source::TreeRewriter::Action
def initialize(range, enforcer, insert_before: _, replacement: _, insert_after: _, children: _); end
def combine(action); end
def contract; end
def empty?; end
def insert_after; end
def insert_before; end
def insertion?; end
def moved(source_buffer, offset); end
def nested_actions; end
def ordered_replacements; end
def range; end
def replacement; end

View File

@ -1,5 +1,5 @@
# This file is autogenerated. Do not edit it by hand. Regenerate it with:
# tapioca sync
# tapioca sync --exclude json
# typed: true
@ -3415,6 +3415,19 @@ end
RuboCop::Cop::Lint::CircularArgumentReference::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::ConstantResolution < ::RuboCop::Cop::Cop
def on_const(node); end
def unqualified_const?(node = _); end
private
def allowed_names; end
def const_name?(name); end
def ignored_names; end
end
RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Cop
def binding_irb_call?(node = _); end
def debugger_call?(node = _); end
@ -4004,6 +4017,7 @@ end
RuboCop::Cop::Lint::PercentSymbolArray::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::RaiseException < ::RuboCop::Cop::Cop
def autocorrect(node); end
def exception?(node = _); end
def exception_new_with_message?(node = _); end
def on_send(node); end
@ -4170,6 +4184,7 @@ RuboCop::Cop::Lint::RedundantWithObject::MSG_EACH_WITH_OBJECT = T.let(T.unsafe(n
RuboCop::Cop::Lint::RedundantWithObject::MSG_WITH_OBJECT = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Lint::RegexpAsCondition < ::RuboCop::Cop::Cop
def autocorrect(node); end
def on_match_current_line(node); end
end
@ -4762,11 +4777,14 @@ class RuboCop::Cop::Metrics::CyclomaticComplexity < ::RuboCop::Cop::Cop
include(::RuboCop::Cop::ConfigurableMax)
include(::RuboCop::Cop::IgnoredMethods)
include(::RuboCop::Cop::MethodComplexity)
include(::RuboCop::Cop::Metrics::Utils::IteratingBlock)
private
def complexity_score_for(_node); end
def block_method(node); end
def complexity_score_for(node); end
def count_block?(block); end
end
RuboCop::Cop::Metrics::CyclomaticComplexity::COUNTED_NODES = T.let(T.unsafe(nil), Array)
@ -4857,6 +4875,14 @@ RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::BRANCH_NODES = T.let(T.unsafe(n
RuboCop::Cop::Metrics::Utils::AbcSizeCalculator::CONDITION_NODES = T.let(T.unsafe(nil), Array)
module RuboCop::Cop::Metrics::Utils::IteratingBlock
def block_method_name(node); end
def iterating_block?(node); end
def iterating_method?(name); end
end
RuboCop::Cop::Metrics::Utils::IteratingBlock::KNOWN_ITERATING_METHODS = T.let(T.unsafe(nil), Set)
module RuboCop::Cop::Migration
end
@ -5478,6 +5504,9 @@ module RuboCop::Cop::RegexpLiteralHelp
private
def freespace_mode_regexp?(node); end
def pattern_source(node); end
def replace_match_with_spaces(source, pattern); end
def source_with_comments_and_interpolations_blanked(child, freespace_mode); end
end
class RuboCop::Cop::Registry
@ -7376,6 +7405,7 @@ end
RuboCop::Cop::Style::MultilineMethodSignature::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::MultilineTernaryOperator < ::RuboCop::Cop::Cop
def autocorrect(node); end
def on_if(node); end
end
@ -7509,7 +7539,13 @@ end
RuboCop::Cop::Style::NestedParenthesizedCalls::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::NestedTernaryOperator < ::RuboCop::Cop::Cop
def autocorrect(node); end
def on_if(node); end
private
def if_node(node); end
def remove_parentheses(source); end
end
RuboCop::Cop::Style::NestedTernaryOperator::MSG = T.let(T.unsafe(nil), String)
@ -8056,6 +8092,26 @@ RuboCop::Cop::Style::RedundantException::MSG_1 = T.let(T.unsafe(nil), String)
RuboCop::Cop::Style::RedundantException::MSG_2 = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::RedundantFetchBlock < ::RuboCop::Cop::Cop
include(::RuboCop::Cop::FrozenStringLiteral)
include(::RuboCop::Cop::RangeHelp)
def autocorrect(node); end
def on_block(node); end
def redundant_fetch_block_candidate?(node = _); end
private
def basic_literal?(node); end
def build_bad_method(send, body); end
def build_good_method(send, body); end
def check_for_constant?; end
def check_for_string?; end
def fetch_range(send, node); end
end
RuboCop::Cop::Style::RedundantFetchBlock::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::RedundantFreeze < ::RuboCop::Cop::Cop
include(::RuboCop::Cop::FrozenStringLiteral)
@ -8201,10 +8257,9 @@ class RuboCop::Cop::Style::RedundantRegexpEscape < ::RuboCop::Cop::Cop
private
def allowed_escape?(node, char, within_character_class); end
def delimiter?(node, char); end
def each_escape(node); end
def escape_range_at_index(node, index); end
def pattern_source(node); end
def slash_literal?(node); end
end
RuboCop::Cop::Style::RedundantRegexpEscape::ALLOWED_ALWAYS_ESCAPES = T.let(T.unsafe(nil), Array)
@ -8266,7 +8321,6 @@ class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Cop
def add_scope(node, local_variables = _); end
def allow_self(node); end
def allowed_send_node?(node); end
def keyword?(method_name); end
def on_argument(node); end
def regular_method_call?(node); end
@ -8275,6 +8329,8 @@ end
RuboCop::Cop::Style::RedundantSelf::KERNEL_METHODS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Style::RedundantSelf::KEYWORDS = T.let(T.unsafe(nil), Array)
RuboCop::Cop::Style::RedundantSelf::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::RedundantSort < ::RuboCop::Cop::Cop
@ -8699,8 +8755,15 @@ end
RuboCop::Cop::Style::Strip::MSG = T.let(T.unsafe(nil), String)
class RuboCop::Cop::Style::StructInheritance < ::RuboCop::Cop::Cop
include(::RuboCop::Cop::RangeHelp)
def autocorrect(node); end
def on_class(node); end
def struct_constructor?(node = _); end
private
def correct_parent(parent, corrector); end
end
RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String)
@ -9066,6 +9129,7 @@ class RuboCop::Cop::Style::YodaCondition < ::RuboCop::Cop::Cop
def corrected_code(node); end
def enforce_yoda?; end
def equality_only?; end
def interpolation?(node); end
def message(node); end
def non_equality_operator?(node); end
def noncommutative_operator?(node); end

View File

@ -13558,26 +13558,6 @@ end
ParseError = Racc::ParseError
class Parser::AST::Processor
def on_find_pattern(node); end
def on_forward_arg(node); end
end
class Parser::Builders::Default
def find_pattern(lbrack_t, elements, rbrack_t); end
def forward_arg(dots_t); end
def forward_only_args(begin_t, dots_t, end_t); end
end
class Parser::Builders::Default
def self.emit_forward_arg(); end
def self.emit_forward_arg=(emit_forward_arg); end
end
Parser::CurrentRuby = Parser::Ruby26
class Parser::Ruby24
@ -15344,22 +15324,6 @@ end
class Parser::Ruby26
end
class Parser::Source::TreeRewriter
def as_nested_actions(); end
def as_replacements(); end
def import!(foreign_rewriter, offset: T.unsafe(nil)); end
end
class Parser::Source::TreeRewriter::Action
def contract(); end
def moved(source_buffer, offset); end
def nested_actions(); end
end
class Pathname
include ::MachOShim
def fnmatch?(*_); end
@ -24484,8 +24448,6 @@ module Tins::SexySingleton
def dup(); end
end
Tins::SexySingleton::SingletonClassMethods = Singleton::SingletonClassMethods
module Tins::SexySingleton
def self.__init__(klass); end

View File

@ -15,7 +15,7 @@ describe Cask::Cmd::Info, :cask do
local-caffeine: 1.2.3
https://brew.sh/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-caffeine.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/local-caffeine.rb
==> Name
None
==> Artifacts
@ -30,7 +30,7 @@ describe Cask::Cmd::Info, :cask do
with-auto-updates: 1.0 (auto_updates)
https://brew.sh/autoupdates
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-auto-updates.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/with-auto-updates.rb
==> Name
AutoUpdates
==> Artifacts
@ -44,7 +44,7 @@ describe Cask::Cmd::Info, :cask do
local-caffeine: 1.2.3
https://brew.sh/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-caffeine.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/local-caffeine.rb
==> Name
None
==> Artifacts
@ -53,7 +53,7 @@ describe Cask::Cmd::Info, :cask do
local-transmission: 2.61
https://brew.sh/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/local-transmission.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/local-transmission.rb
==> Name
Transmission
==> Artifacts
@ -75,7 +75,7 @@ describe Cask::Cmd::Info, :cask do
with-caveats: 1.2.3
https://brew.sh/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-caveats.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/with-caveats.rb
==> Name
None
==> Artifacts
@ -100,7 +100,7 @@ describe Cask::Cmd::Info, :cask do
with-conditional-caveats: 1.2.3
https://brew.sh/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-conditional-caveats.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/with-conditional-caveats.rb
==> Name
None
==> Artifacts
@ -115,7 +115,7 @@ describe Cask::Cmd::Info, :cask do
with-languages: 1.2.3
https://brew.sh/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/with-languages.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/with-languages.rb
==> Name
None
==> Languages
@ -132,7 +132,7 @@ describe Cask::Cmd::Info, :cask do
without-languages: 1.2.3
https://brew.sh/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/without-languages.rb
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/without-languages.rb
==> Name
None
==> Artifacts

View File

@ -24,13 +24,13 @@ describe Homebrew do
specify "::github_remote_path" do
expect(subject.github_remote_path(remote, "Formula/git.rb"))
.to eq("https://github.com/Homebrew/homebrew-core/blob/master/Formula/git.rb")
.to eq("https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/git.rb")
expect(subject.github_remote_path("#{remote}.git", "Formula/git.rb"))
.to eq("https://github.com/Homebrew/homebrew-core/blob/master/Formula/git.rb")
.to eq("https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/git.rb")
expect(subject.github_remote_path("git@github.com:user/repo", "foo.rb"))
.to eq("https://github.com/user/repo/blob/master/foo.rb")
.to eq("https://github.com/user/repo/blob/HEAD/foo.rb")
expect(subject.github_remote_path("https://mywebsite.com", "foo/bar.rb"))
.to eq("https://mywebsite.com/foo/bar.rb")

View File

@ -110,7 +110,7 @@ describe RuboCop::Cop::Cask::HomepageMatchesUrl do
[{
message: "`# brew.sh was verified as official` does not " \
"match the expected comment format. For details, see " \
"https://github.com/Homebrew/homebrew-cask/blob/master/doc/" \
"https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/" \
"cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment",
severity: :convention,
line: 2,
@ -188,7 +188,7 @@ describe RuboCop::Cop::Cask::HomepageMatchesUrl do
[{
message: "`brew.sh` does not match `example.org`, a comment " \
"has to be added above the `url` stanza. For details, see " \
"https://github.com/Homebrew/homebrew-cask/blob/master/doc/" \
"https://github.com/Homebrew/homebrew-cask/blob/HEAD/doc/" \
"cask_language_reference/stanzas/url.md#when-url-and-homepage-hostnames-differ-add-a-comment",
severity: :convention,
line: 2,

View File

@ -0,0 +1 @@
testball_bottle-0.1.yosemite.bottle.tar.gz

View File

@ -0,0 +1 @@
testball_bottle-0.1.yosemite.bottle.tar.gz

View File

@ -497,7 +497,7 @@ module Kernel
path.read
.lines
.grep(/^#:/)
.map { |line| line.slice(2..-1) }
.map { |line| line.slice(2..-1).delete_prefix(" ") }
end
def redact_secrets(input, secrets)

View File

@ -19,7 +19,7 @@ Second, read the [Troubleshooting Checklist](https://docs.brew.sh/Troubleshootin
**If you don't read these it will take us far longer to help you with your problem.**
## Contributing
We'd love you to contribute to Homebrew. First, please read our [Contribution Guide](CONTRIBUTING.md) and [Code of Conduct](https://github.com/Homebrew/.github/blob/master/CODE_OF_CONDUCT.md#code-of-conduct).
We'd love you to contribute to Homebrew. First, please read our [Contribution Guide](CONTRIBUTING.md) and [Code of Conduct](https://github.com/Homebrew/.github/blob/HEAD/CODE_OF_CONDUCT.md#code-of-conduct).
We explicitly welcome contributions from people who have never contributed to open-source before: we were all beginners once! We can help build on a partially working pull request with the aim of getting it merged. We are also actively seeking to diversify our contributors and especially welcome contributions from women from all backgrounds and people of colour.

View File

@ -162,6 +162,7 @@ _brew_create() {
--HEAD
--autotools
--cmake
--crystal
--debug
--force
--go

View File

@ -45,7 +45,7 @@ Homebrew's analytics are sent throughout Homebrew's execution to Google Analytic
Summaries of installation and error analytics are publicly available [here](https://brew.sh/analytics/). A JSON API is also available.
## How?
The code is viewable in [`analytics.rb`](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/utils/analytics.rb) and [`analytics.sh`](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/utils/analytics.sh). They are done in a separate background process and fail fast to avoid delaying any execution. They will fail immediately and silently if you have no network connection.
The code is viewable in [`analytics.rb`](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/utils/analytics.rb) and [`analytics.sh`](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/utils/analytics.sh). They are done in a separate background process and fail fast to avoid delaying any execution. They will fail immediately and silently if you have no network connection.
## Opting out
Homebrew analytics helps us maintainers and leaving it on is appreciated. However, if you want to opt out of Homebrew's analytics, you can set this variable in your environment:

View File

@ -8,7 +8,7 @@ If a bottle is available and usable it will be downloaded and poured automatical
Bottles will not be used if the user requests it (see above), if the formula requests it (with `pour_bottle?`), if any options are specified during installation (bottles are all compiled with default options), if the bottle is not up to date (e.g. lacking a checksum) or if the bottle's `cellar` is not `:any` nor equal to the current `HOMEBREW_CELLAR`.
## Creation
Bottles are created using the [Brew Test Bot](Brew-Test-Bot.md). This happens mostly when people submit pull requests to Homebrew and the `bottle do` block is updated by maintainers when they `brew pr-publish` or `brew pr-pull` the contents of a pull request. For the Homebrew organisations' taps they are uploaded to and downloaded from [Bintray](https://bintray.com/homebrew).
Bottles are created using the [Brew Test Bot](Brew-Test-Bot.md), usually when people submit pull requests to Homebrew. The `bottle do` block is updated by maintainers when they merge a pull request. For the Homebrew organisations' taps they are uploaded to and downloaded from [Bintray](https://bintray.com/homebrew).
By default, bottles will be built for the oldest CPU supported by the OS/architecture you're building for (Core 2 for 64-bit OSs). This ensures that bottles are compatible with all computers you might distribute them to. If you *really* want your bottles to be optimised for something else, you can pass the `--bottle-arch=` option to build for another architecture; for example, `brew install foo --build-bottle --bottle-arch=penryn`. Just remember that if you build for a newer architecture some of your users might get binaries they can't run and that would be sad!

View File

@ -8,6 +8,7 @@ If a pull request is correct and doesn't need any modifications to commit messag
1. Ensure the job has already completed successfully.
2. Run `brew pr-publish 12345` where `12345` is the pull request number (or URL).
- Approving a PR for an existing formula will automatically publish the bottles and close the PR, taking care of this step.
3. Watch the [actions queue](https://github.com/Homebrew/homebrew-core/actions) to ensure your job finishes. BrewTestBot will usually notify you of failures with a ping as well.
If a pull request needs changes to the commit messages:

View File

@ -39,7 +39,7 @@ For example, see the [header of `brew-services.rb`](https://github.com/Homebrew/
### homebrew-livecheck
Check if there is a new upstream version of a formula.
See the [`README`](https://github.com/Homebrew/homebrew-livecheck/blob/master/README.md) for more info and usage.
See the [`README`](https://github.com/Homebrew/homebrew-livecheck/blob/HEAD/README.md) for more info and usage.
Install using:
@ -49,7 +49,7 @@ brew tap homebrew/livecheck
### homebrew-command-not-found
Ubuntu's `command-not-found equivalent` for Homebrew.
See the [`README`](https://github.com/Homebrew/homebrew-command-not-found/blob/master/README.md) for more info and usage.
See the [`README`](https://github.com/Homebrew/homebrew-command-not-found/blob/HEAD/README.md) for more info and usage.
Install using:
@ -59,7 +59,7 @@ brew tap homebrew/command-not-found
### homebrew-aliases
Allows you to alias your Homebrew commands.
See the [`README`](https://github.com/Homebrew/homebrew-aliases/blob/master/README.md) for more info and usage.
See the [`README`](https://github.com/Homebrew/homebrew-aliases/blob/HEAD/README.md) for more info and usage.
Install using:

View File

@ -74,7 +74,7 @@ the launchctl PATH for *all users*. For earlier versions of macOS, see
[this page](https://developer.apple.com/legacy/library/qa/qa1067/_index.html).
## How do I contribute to Homebrew?
Read our [contribution guidelines](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md#contributing-to-homebrew).
Read our [contribution guidelines](https://github.com/Homebrew/brew/blob/HEAD/CONTRIBUTING.md#contributing-to-homebrew).
## Why do you compile everything?
Homebrew provides pre-compiled versions for many formulae. These

View File

@ -21,7 +21,7 @@ Homebrew uses Git for downloading updates and contributing to the project.
Homebrew installs to the `Cellar` and then symlinks some of the installation into `/usr/local` so that other programs can see what's going on. We suggest you `brew ls` a few of the kegs in your Cellar to see how it is all arranged.
Packages are installed according to their formulae, which live in `/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula`. Check out a simple one, e.g. `brew edit etl` (or [`etl`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/etl.rb)) or a more advanced one, e.g. `brew edit git` (or [`git`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/git.rb)).
Packages are installed according to their formulae, which live in `/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula`. Check out a simple one, e.g. `brew edit etl` (or [`etl`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/etl.rb)) or a more advanced one, e.g. `brew edit git` (or [`git`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/git.rb)).
## Basic instructions
@ -36,7 +36,7 @@ Before submitting a new formula make sure your package:
* has a stable, tagged version (i.e. not just a GitHub repository with no versions)
* passes all `brew audit --new-formula <formula>` tests
Before submitting a new formula make sure you read over our [contribution guidelines](https://github.com/Homebrew/brew/blob/master/CONTRIBUTING.md#contributing-to-homebrew).
Before submitting a new formula make sure you read over our [contribution guidelines](https://github.com/Homebrew/brew/blob/HEAD/CONTRIBUTING.md#contributing-to-homebrew).
### Grab the URL
@ -121,7 +121,7 @@ to avoid conflicting with the system so sometimes formulae need to
have environment variables set or special configuration flags passed
to locate our OpenSSL. You can see this mechanism in the
[`clamav`](https://github.com/Homebrew/homebrew-core/blob/89c4574ef1a6d15e92196637ff315a0a4bb3e289/Formula/clamav.rb#L37)
formula. Usually this is unnecessary because Homebrew sets up our [build environment](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/extend/ENV/super.rb)
formula. Usually this is unnecessary because Homebrew sets up our [build environment](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/extend/ENV/super.rb)
to favour finding [`keg_only`](https://rubydoc.brew.sh/Formula#keg_only-class_method) formulae first.
**Important:** `$(brew --prefix)/bin` is NOT on the `PATH` during formula installation. If you have dependencies at build time, you must specify them and `brew` will add them to the `PATH` or create a [`Requirement`](https://rubydoc.brew.sh/Requirement).
@ -168,9 +168,9 @@ description can be overridden using the normal option syntax (in this case, the
Sometimes theres hard conflict between formulae, and it cant be avoided or circumvented with [`keg_only`](https://rubydoc.brew.sh/Formula#keg_only-class_method).
A good example formula for minor conflict is [`mbedtls`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/mbedtls.rb), which ships and compiles a "Hello World" executable. This is obviously non-essential to `mbedtls`s functionality, and conflict with the popular GNU [`hello`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/hello.rb) formula would be overkill, so we just [remove it](https://github.com/Homebrew/homebrew-core/blob/966273060ad507fea490bd931971963de8b1a1dc/Formula/mbedtls.rb#L30-L31) during the installation process.
A good example formula for minor conflict is [`mbedtls`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/mbedtls.rb), which ships and compiles a "Hello World" executable. This is obviously non-essential to `mbedtls`s functionality, and conflict with the popular GNU [`hello`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/hello.rb) formula would be overkill, so we just [remove it](https://github.com/Homebrew/homebrew-core/blob/966273060ad507fea490bd931971963de8b1a1dc/Formula/mbedtls.rb#L30-L31) during the installation process.
[`pdftohtml`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/pdftohtml.rb) provides an example of a serious
[`pdftohtml`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/pdftohtml.rb) provides an example of a serious
conflict, where both formula ship an identically-named binary that is essential to functionality, so a [`conflicts_with`](https://rubydoc.brew.sh/Formula#conflicts_with-class_method) is preferable.
As a general rule, [`conflicts_with`](https://rubydoc.brew.sh/Formula#conflicts_with-class_method) should be a last-resort option. Its a fairly blunt instrument.
@ -235,7 +235,7 @@ class Foo < Formula
end
```
[`jrnl`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/jrnl.rb) is an example of a formula that does this well. The end result means the user doesn't have to use `pip` or Python and can just run `jrnl`.
[`jrnl`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/jrnl.rb) is an example of a formula that does this well. The end result means the user doesn't have to use `pip` or Python and can just run `jrnl`.
[homebrew-pypi-poet](https://github.com/tdsmith/homebrew-pypi-poet) can help you generate [`resource`](https://rubydoc.brew.sh/Formula#resource-class_method) stanzas for the dependencies of your Python application.
@ -259,9 +259,9 @@ function. The environment variable `HOME` is set to [`testpath`](https://rubydoc
We want tests that don't require any user input and test the basic functionality of the application. For example `foo build-foo input.foo` is a good test and (despite their widespread use) `foo --version` and `foo --help` are bad tests. However, a bad test is better than no test at all.
See [`cmake`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/cmake.rb) for an example of a formula with a good test. The formula writes a basic `CMakeLists.txt` file into the test directory then calls CMake to generate Makefiles. This test checks that CMake doesn't e.g. segfault during basic operation.
See [`cmake`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/cmake.rb) for an example of a formula with a good test. The formula writes a basic `CMakeLists.txt` file into the test directory then calls CMake to generate Makefiles. This test checks that CMake doesn't e.g. segfault during basic operation.
You can check that the output is as expected with `assert_equal` or `assert_match` on the output of shell_output such as in this example from the [envv formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/envv.rb):
You can check that the output is as expected with `assert_equal` or `assert_match` on the output of shell_output such as in this example from the [envv formula](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/envv.rb):
```ruby
assert_equal "mylist=A:C; export mylist", shell_output("#{bin}/envv del mylist B").strip
@ -275,7 +275,7 @@ assert_predicate testpath/"output.txt", :exist?
Some advice for specific cases:
* If the formula is a library, compile and run some simple code that links against it. It could be taken from upstream's documentation / source examples.
A good example is [`tinyxml2`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/tinyxml2.rb), which writes a small C++ source file into the test directory, compiles and links it against the tinyxml2 library and finally checks that the resulting program runs successfully.
A good example is [`tinyxml2`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/tinyxml2.rb), which writes a small C++ source file into the test directory, compiles and links it against the tinyxml2 library and finally checks that the resulting program runs successfully.
* If the formula is for a GUI program, try to find some function that runs as command-line only, like a format conversion, reading or displaying a config file, etc.
* If the software cannot function without credentials or requires a virtual machine, docker instance, etc. to run, a test could be to try to connect with invalid credentials (or without credentials) and confirm that it fails as expected. This is prefered over mocking a dependency.
* Homebrew comes with a number of [standard test fixtures](https://github.com/Homebrew/brew/tree/master/Library/Homebrew/test/support/fixtures), including numerous sample images, sounds, and documents in various formats. You can get the file path to a test fixture with `test_fixtures("test.svg")`.
@ -322,7 +322,7 @@ If youre not sure about the name, check its homepage, Wikipedia page and [wha
When Homebrew already has a formula called `foo` we typically do not accept requests to replace that formula with something else also named `foo`. This is to avoid both confusing and surprising users expectations.
When two formulae share an upstream name, e.g. [AESCrypt](https://github.com/Homebrew/homebrew-core/blob/master/Formula/aescrypt.rb) and [AES Crypt](https://github.com/Homebrew/homebrew-core/blob/master/Formula/aescrypt-packetizer.rb) the newer formula must typically adapt its name to avoid conflict with the current formula.
When two formulae share an upstream name, e.g. [AESCrypt](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/aescrypt.rb) and [AES Crypt](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/aescrypt-packetizer.rb) the newer formula must typically adapt its name to avoid conflict with the current formula.
If youre *still* not sure, just commit. Well apply some arbitrary rule and make a decision 😉.
@ -740,9 +740,9 @@ Homebrew provides two formula DSL methods for launchd plist files:
Homebrew has multiple levels of environment variable filtering which affects variables available to formulae.
Firstly, the overall environment in which Homebrew runs is filtered to avoid environment contamination breaking from-source builds (<https://github.com/Homebrew/brew/issues/932>). In particular, this process filters all but the given whitelisted variables, but allows environment variables prefixed with `HOMEBREW_`. The specific implementation can be seen in [`bin/brew`](https://github.com/Homebrew/brew/blob/master/bin/brew).
Firstly, the overall environment in which Homebrew runs is filtered to avoid environment contamination breaking from-source builds (<https://github.com/Homebrew/brew/issues/932>). In particular, this process filters all but the given whitelisted variables, but allows environment variables prefixed with `HOMEBREW_`. The specific implementation can be seen in [`bin/brew`](https://github.com/Homebrew/brew/blob/HEAD/bin/brew).
The second level of filtering removes sensitive environment variables (such as credentials like keys, passwords or tokens) to avoid malicious subprocesses obtaining them (<https://github.com/Homebrew/brew/pull/2524>). This has the effect of preventing any such variables from reaching a formula's Ruby code as they are filtered before it is called. The specific implementation can be seen in the [`ENV.clear_sensitive_environment!` method](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/extend/ENV.rb).
The second level of filtering removes sensitive environment variables (such as credentials like keys, passwords or tokens) to avoid malicious subprocesses obtaining them (<https://github.com/Homebrew/brew/pull/2524>). This has the effect of preventing any such variables from reaching a formula's Ruby code as they are filtered before it is called. The specific implementation can be seen in the [`ENV.clear_sensitive_environment!` method](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/extend/ENV.rb).
In summary, environment variables used by a formula need to conform to these filtering rules in order to be available.

View File

@ -16,7 +16,7 @@
4. Members may be dismissed by majority vote of the Project Leadership Committee and removed from the Homebrew organisation on GitHub. Removed members may be reinstated by the usual admission process.
5. All members will follow the [Homebrew Code of Conduct](https://github.com/Homebrew/.github/blob/master/CODE_OF_CONDUCT.md#code-of-conduct). Changes to the code of conduct must be approved by the PLC.
5. All members will follow the [Homebrew Code of Conduct](https://github.com/Homebrew/.github/blob/HEAD/CODE_OF_CONDUCT.md#code-of-conduct). Changes to the code of conduct must be approved by the PLC.
6. Homebrew members will comply with the Software Freedom Conservancy's [conflict of interest policy](https://sfconservancy.org/projects/policies/conflict-of-interest-policy.html).

View File

@ -54,7 +54,7 @@ Check for:
- if CI is green and...
- formula `bottle :unneeded`, you can merge it through GitHub UI
- bottles need to be pulled, and...
- the commits are correct and don't need changes, use: `brew pr-publish $PR_ID`
- the commits are correct and don't need changes, approve the PR to trigger an automatic merge (use `brew pr-publish $PR_ID` to trigger manually in case of a new formula)
- the commits need to be amended, use `brew pr-pull $PR_ID`, make changes, and `git push`
- don't forget to thank the contributor
- celebrate the first-time contributors

View File

@ -341,7 +341,7 @@ correct repository:
> Thanks for your PR.
>
> However, this formula is not Linux-specific. Its new versions are merged from the [Homebrew/homebrew-core](https://github.com/Homebrew/homebrew-core) repository daily [as documented in CONTRIBUTING.md](https://github.com/Homebrew/linuxbrew-core/blob/master/CONTRIBUTING.md). Please submit this change as a PR to that repository.
> However, this formula is not Linux-specific. Its new versions are merged from the [Homebrew/homebrew-core](https://github.com/Homebrew/homebrew-core) repository daily [as documented in CONTRIBUTING.md](https://github.com/Homebrew/linuxbrew-core/blob/HEAD/CONTRIBUTING.md). Please submit this change as a PR to that repository.
>
> We look forward to your PR against Homebrew/homebrew-core for the next version bump!

View File

@ -165,6 +165,6 @@ All communication should ideally occur in public on GitHub. Where this is not po
This makes it easier for other maintainers, contributors and users to follow along with what we're doing (and, more importantly, why we're doing it) and means that decisions have a linkable URL.
All maintainers (and lead maintainer) communication through any medium is bound by [Homebrew's Code of Conduct](https://github.com/Homebrew/.github/blob/master/CODE_OF_CONDUCT.md#code-of-conduct). Abusive behaviour towards other maintainers, contributors or users will not be tolerated; the maintainer will be given a warning and if their behaviour continues they will be removed as a maintainer.
All maintainers (and lead maintainer) communication through any medium is bound by [Homebrew's Code of Conduct](https://github.com/Homebrew/.github/blob/HEAD/CODE_OF_CONDUCT.md#code-of-conduct). Abusive behaviour towards other maintainers, contributors or users will not be tolerated; the maintainer will be given a warning and if their behaviour continues they will be removed as a maintainer.
Maintainers should feel free to pleasantly disagree with the work and decisions of other maintainers. Healthy, friendly, technical disagreement between maintainers is actively encouraged and should occur in public on the issue tracker to make the project better. Interpersonal issues should be handled privately in Slack, ideally with moderation. If work or decisions are insufficiently documented or explained any maintainer or contributor should feel free to ask for clarification. No maintainer may ever justify a decision with e.g. "because I say so" or "it was I who did X" alone. Off-topic discussions on the issue tracker, [bike-shedding](https://en.wikipedia.org/wiki/Law_of_triviality) and personal attacks are forbidden.

View File

@ -588,9 +588,9 @@ If *`formula`* is provided, display the file or directory used to cache *`formul
* `--force-bottle`:
Show the cache file used when pouring a bottle.
* `--formula`:
Show cache files for only formulae
Only show cache files for formulae.
* `--cask`:
Show cache files for only casks
Only show cache files for casks.
### `--cellar` [*`formula`*]
@ -769,6 +769,8 @@ a simple example. For the complete API, see:
Create a basic template for an Autotools-style build.
* `--cmake`:
Create a basic template for a CMake-style build.
* `--crystal`:
Create a basic template for a Crystal build.
* `--go`:
Create a basic template for a Go build.
* `--meson`:
@ -898,17 +900,17 @@ repository.
* `--resolve`:
When a patch fails to apply, leave in progress and allow user to resolve, instead of aborting.
* `--workflow`:
Retrieve artifacts from the specified workflow (default: tests.yml).
Retrieve artifacts from the specified workflow (default: `tests.yml`).
* `--artifact`:
Download artifacts with the specified name (default: bottles).
Download artifacts with the specified name (default: `bottles`).
* `--bintray-org`:
Upload to the specified Bintray organisation (default: homebrew).
Upload to the specified Bintray organisation (default: `homebrew`).
* `--tap`:
Target tap repository (default: homebrew/core).
Target tap repository (default: `homebrew/core`).
* `--root-url`:
Use the specified *`URL`* as the root of the bottle's URL instead of Homebrew's default.
* `--bintray-mirror`:
Use the specified Bintray repository to automatically mirror stable URLs defined in the formulae (default: mirror)
Use the specified Bintray repository to automatically mirror stable URLs defined in the formulae (default: `mirror`).
### `pr-upload` [*`options`*]
@ -919,7 +921,7 @@ Apply the bottle commit and publish bottles to Bintray.
* `-n`, `--dry-run`:
Print what would be done rather than doing it.
* `--bintray-org`:
Upload to the specified Bintray organisation (default: homebrew).
Upload to the specified Bintray organisation (default: `homebrew`).
* `--root-url`:
Use the specified *`URL`* as the root of the bottle's URL instead of Homebrew's default.

View File

@ -33,9 +33,10 @@ A few requests:
- In Homebrew/brew, close pull requests using GitHub's "Merge pull request"
button in "Create a merge commit" mode.
- In Homebrew/homebrew-core, use `brew pr-publish` to close pull requests
that require new bottles or change multiple formulae. If commits need to
be amended use `brew pr-pull` instead. Let these commands auto-close
issues whenever possible (it may take up to 5 minutes). If in doubt,
that require new bottles or change multiple formulae. Note that an approving
review on a pull request for an existing formula will trigger this automatically.
If commits need to be amended use `brew pr-pull` instead. Let these commands
auto-close issues whenever possible (it may take up to 5 minutes). If in doubt,
check with e.g. Fork.app that you've not accidentally added merge commits.
If bottles are unnecessary, use GitHub's "Merge pull request" button in
"Squash and merge" mode for a single formula change.

View File

@ -2,9 +2,9 @@
This document explains how to successfully use Python in a Homebrew formula.
Homebrew draws a distinction between Python **applications** and Python **libraries**. The difference is that users generally do not care that applications are written in Python; it is unusual that a user would expect to be able to `import foo` after installing an application. Examples of applications are [`ansible`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/ansible.rb) and [`jrnl`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/jrnl.rb).
Homebrew draws a distinction between Python **applications** and Python **libraries**. The difference is that users generally do not care that applications are written in Python; it is unusual that a user would expect to be able to `import foo` after installing an application. Examples of applications are [`ansible`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/ansible.rb) and [`jrnl`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/jrnl.rb).
Python libraries exist to be imported by other Python modules; they are often dependencies of Python applications. They are usually no more than incidentally useful in a terminal. Examples of libraries are [`py2cairo`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/py2cairo.rb) and the bindings that are installed by [`protobuf`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/protobuf.rb).
Python libraries exist to be imported by other Python modules; they are often dependencies of Python applications. They are usually no more than incidentally useful in a terminal. Examples of libraries are [`py2cairo`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/py2cairo.rb) and the bindings that are installed by [`protobuf`](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/protobuf.rb).
Bindings are a special case of libraries that allow Python code to interact with a library or application implemented in another language.

View File

@ -2,13 +2,13 @@
## Supported Xcode versions
Homebrew supports and recommends the latest Xcode and/or Command Line
Tools available for your platform (see `OS::Mac::Xcode.latest_version` and `OS::Mac::CLT.latest_version` in [`Library/Homebrew/os/mac/xcode.rb`](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/os/mac/xcode.rb)).
Tools available for your platform (see `OS::Mac::Xcode.latest_version` and `OS::Mac::CLT.latest_version` in [`Library/Homebrew/os/mac/xcode.rb`](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/os/mac/xcode.rb)).
## Updating for new Xcode releases
When a new Xcode release is made, the following things need to be
updated:
* In [`Library/Homebrew/os/mac/xcode.rb`](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/os/mac/xcode.rb)
* In [`Library/Homebrew/os/mac/xcode.rb`](https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/os/mac/xcode.rb)
* `OS::Mac::Xcode.latest_version`
* `OS::Mac::CLT.latest_version`
* `OS::Mac::Xcode.detect_version_from_clang_version`

View File

@ -2,7 +2,7 @@
extends: substitution
message: Use '%s'
ignorecase: false
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#style-and-usage'
link: 'https://github.com/Homebrew/brew/blob/HEAD/docs/Prose-Style-Guidelines.md#style-and-usage'
level: error
nonword: true
swap:

View File

@ -1,7 +1,7 @@
---
extends: existence
message: 'No Oxford commas!'
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#typographical-conventions'
link: 'https://github.com/Homebrew/brew/blob/HEAD/docs/Prose-Style-Guidelines.md#typographical-conventions'
scope: sentence
level: warning
tokens:

View File

@ -1,7 +1,7 @@
---
extends: existence
message: Avoid gender-specific language when not necessary.
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#personal-pronouns'
link: 'https://github.com/Homebrew/brew/blob/HEAD/docs/Prose-Style-Guidelines.md#personal-pronouns'
level: warning
ignorecase: true
tokens:

View File

@ -1,7 +1,7 @@
---
extends: existence
message: "'%s' should have one space."
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#typographical-conventions'
link: 'https://github.com/Homebrew/brew/blob/HEAD/docs/Prose-Style-Guidelines.md#typographical-conventions'
level: error
nonword: true
tokens:

View File

@ -1,7 +1,7 @@
---
extends: substitution
message: Use '%s' instead of '%s'.
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#terminology-words-and-word-styling'
link: 'https://github.com/Homebrew/brew/blob/HEAD/docs/Prose-Style-Guidelines.md#terminology-words-and-word-styling'
level: error
scope: $paragraph
swap:

View File

@ -1,7 +1,7 @@
---
extends: existence
message: 'No "TM", ™, SM, ©, ®, or other explicit indicators of rights ownership or trademarks'
link: 'https://github.com/Homebrew/brew/blob/master/docs/Prose-Style-Guidelines.md#typographical-conventions'
link: 'https://github.com/Homebrew/brew/blob/HEAD/docs/Prose-Style-Guidelines.md#typographical-conventions'
level: error
nonword: true
tokens:

View File

@ -765,11 +765,11 @@ Show the cache file used when pouring a bottle\.
.
.TP
\fB\-\-formula\fR
Show cache files for only formulae
Only show cache files for formulae\.
.
.TP
\fB\-\-cask\fR
Show cache files for only casks
Only show cache files for casks\.
.
.SS "\fB\-\-cellar\fR [\fIformula\fR]"
Display Homebrew\'s Cellar path\. \fIDefault:\fR \fB$(brew \-\-prefix)/Cellar\fR, or if that directory doesn\'t exist, \fB$(brew \-\-repository)/Cellar\fR\.
@ -999,6 +999,10 @@ Create a basic template for an Autotools\-style build\.
Create a basic template for a CMake\-style build\.
.
.TP
\fB\-\-crystal\fR
Create a basic template for a Crystal build\.
.
.TP
\fB\-\-go\fR
Create a basic template for a Go build\.
.
@ -1165,19 +1169,19 @@ When a patch fails to apply, leave in progress and allow user to resolve, instea
.
.TP
\fB\-\-workflow\fR
Retrieve artifacts from the specified workflow (default: tests\.yml)\.
Retrieve artifacts from the specified workflow (default: \fBtests\.yml\fR)\.
.
.TP
\fB\-\-artifact\fR
Download artifacts with the specified name (default: bottles)\.
Download artifacts with the specified name (default: \fBbottles\fR)\.
.
.TP
\fB\-\-bintray\-org\fR
Upload to the specified Bintray organisation (default: homebrew)\.
Upload to the specified Bintray organisation (default: \fBhomebrew\fR)\.
.
.TP
\fB\-\-tap\fR
Target tap repository (default: homebrew/core)\.
Target tap repository (default: \fBhomebrew/core\fR)\.
.
.TP
\fB\-\-root\-url\fR
@ -1185,7 +1189,7 @@ Use the specified \fIURL\fR as the root of the bottle\'s URL instead of Homebrew
.
.TP
\fB\-\-bintray\-mirror\fR
Use the specified Bintray repository to automatically mirror stable URLs defined in the formulae (default: mirror)
Use the specified Bintray repository to automatically mirror stable URLs defined in the formulae (default: \fBmirror\fR)\.
.
.SS "\fBpr\-upload\fR [\fIoptions\fR]"
Apply the bottle commit and publish bottles to Bintray\.
@ -1200,7 +1204,7 @@ Print what would be done rather than doing it\.
.
.TP
\fB\-\-bintray\-org\fR
Upload to the specified Bintray organisation (default: homebrew)\.
Upload to the specified Bintray organisation (default: \fBhomebrew\fR)\.
.
.TP
\fB\-\-root\-url\fR