diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 399ede2172ce0..14170c830c266 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -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? diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a1618b90cd376..dfd91c66cd380 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/Library/.rubocop_cask.yml b/Library/.rubocop_cask.yml index 2c128a436a194..db3d6caf66f9c 100644 --- a/Library/.rubocop_cask.yml +++ b/Library/.rubocop_cask.yml @@ -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: diff --git a/Library/Homebrew/cask/audit.rb b/Library/Homebrew/cask/audit.rb index 3a8478e5f0db7..db019bda75e6e 100644 --- a/Library/Homebrew/cask/audit.rb +++ b/Library/Homebrew/cask/audit.rb @@ -219,7 +219,7 @@ def check_latest_with_auto_updates 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 @@ def check_url 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 @@ def core_formula_names 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 diff --git a/Library/Homebrew/cask/cmd/info.rb b/Library/Homebrew/cask/cmd/info.rb index e4acbbe56d7fb..5669d0dcd3e46 100644 --- a/Library/Homebrew/cask/cmd/info.rb +++ b/Library/Homebrew/cask/cmd/info.rb @@ -97,7 +97,7 @@ def self.repo_info(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)}" diff --git a/Library/Homebrew/cask/exceptions.rb b/Library/Homebrew/cask/exceptions.rb index 7a337034c97e3..7679aa043ab88 100644 --- a/Library/Homebrew/cask/exceptions.rb +++ b/Library/Homebrew/cask/exceptions.rb @@ -151,7 +151,7 @@ def to_s 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 diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index 312e50c51ee8a..51a29e1b57d19 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -140,7 +140,7 @@ def print_json 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 diff --git a/Library/Homebrew/extend/os/linux/hardware/cpu.rb b/Library/Homebrew/extend/os/linux/hardware/cpu.rb index 4f37ac614b378..b1fb08e2d2249 100644 --- a/Library/Homebrew/extend/os/linux/hardware/cpu.rb +++ b/Library/Homebrew/extend/os/linux/hardware/cpu.rb @@ -21,7 +21,7 @@ def family 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 diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index 16818f0ce2497..7edb23361b5ff 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -80,7 +80,7 @@ def to_s ).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 diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index f559bfacf97b9..27749cf0c873b 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -43,14 +43,14 @@ def latest_sdk_version 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 diff --git a/Library/Homebrew/rubocops/cask/homepage_matches_url.rb b/Library/Homebrew/rubocops/cask/homepage_matches_url.rb index d142ad7170ac4..ca2bea9d6d2a3 100644 --- a/Library/Homebrew/rubocops/cask/homepage_matches_url.rb +++ b/Library/Homebrew/rubocops/cask/homepage_matches_url.rb @@ -14,7 +14,7 @@ class HomepageMatchesUrl < Cop # rubocop:disable Metrics/ClassLength 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 diff --git a/Library/Homebrew/rubocops/cask/stanza_grouping.rb b/Library/Homebrew/rubocops/cask/stanza_grouping.rb index aec43875c7fa5..c29d8d71c8711 100644 --- a/Library/Homebrew/rubocops/cask/stanza_grouping.rb +++ b/Library/Homebrew/rubocops/cask/stanza_grouping.rb @@ -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 diff --git a/Library/Homebrew/rubocops/cask/stanza_order.rb b/Library/Homebrew/rubocops/cask/stanza_order.rb index 2a81bdb11356d..71dad3cb8e058 100644 --- a/Library/Homebrew/rubocops/cask/stanza_order.rb +++ b/Library/Homebrew/rubocops/cask/stanza_order.rb @@ -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 diff --git a/Library/Homebrew/test/cask/cmd/info_spec.rb b/Library/Homebrew/test/cask/cmd/info_spec.rb index 7d529f7112fc2..ea3385dc52ec2 100644 --- a/Library/Homebrew/test/cask/cmd/info_spec.rb +++ b/Library/Homebrew/test/cask/cmd/info_spec.rb @@ -15,7 +15,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 diff --git a/Library/Homebrew/test/cmd/info_spec.rb b/Library/Homebrew/test/cmd/info_spec.rb index a4c64ca35dcf9..668548fb7fcf1 100644 --- a/Library/Homebrew/test/cmd/info_spec.rb +++ b/Library/Homebrew/test/cmd/info_spec.rb @@ -24,13 +24,13 @@ 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") diff --git a/Library/Homebrew/test/rubocops/cask/homepage_matches_url_spec.rb b/Library/Homebrew/test/rubocops/cask/homepage_matches_url_spec.rb index 05c32ba66cb7a..dd175cb4fc586 100644 --- a/Library/Homebrew/test/rubocops/cask/homepage_matches_url_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/homepage_matches_url_spec.rb @@ -110,7 +110,7 @@ [{ 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 @@ [{ 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, diff --git a/README.md b/README.md index e770c93b2127f..5270a44b8dc0d 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docs/Analytics.md b/docs/Analytics.md index 009038505a483..b2123628180d5 100644 --- a/docs/Analytics.md +++ b/docs/Analytics.md @@ -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: diff --git a/docs/External-Commands.md b/docs/External-Commands.md index f8030d88e702f..c493858291bc5 100644 --- a/docs/External-Commands.md +++ b/docs/External-Commands.md @@ -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: diff --git a/docs/FAQ.md b/docs/FAQ.md index d776a3d73403a..9c7d26867c1bb 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -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 diff --git a/docs/Formula-Cookbook.md b/docs/Formula-Cookbook.md index 242899eb1e566..ac475face9047 100644 --- a/docs/Formula-Cookbook.md +++ b/docs/Formula-Cookbook.md @@ -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 ` 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 there’s hard conflict between formulae, and it can’t 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. It’s 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 you’re 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 you’re *still* not sure, just commit. We’ll 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 (). 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 (). 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 (). 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 (). 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. diff --git a/docs/Homebrew-Governance.md b/docs/Homebrew-Governance.md index 35f0391ce3fc7..9283faa14fed7 100644 --- a/docs/Homebrew-Governance.md +++ b/docs/Homebrew-Governance.md @@ -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). diff --git a/docs/Homebrew-linuxbrew-core-Maintainer-Guide.md b/docs/Homebrew-linuxbrew-core-Maintainer-Guide.md index 29f2e9d0afc68..74a5c858a4a75 100644 --- a/docs/Homebrew-linuxbrew-core-Maintainer-Guide.md +++ b/docs/Homebrew-linuxbrew-core-Maintainer-Guide.md @@ -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! diff --git a/docs/Maintainer-Guidelines.md b/docs/Maintainer-Guidelines.md index d6b8ac32d608f..7eebe79bb8db0 100644 --- a/docs/Maintainer-Guidelines.md +++ b/docs/Maintainer-Guidelines.md @@ -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. diff --git a/docs/Python-for-Formula-Authors.md b/docs/Python-for-Formula-Authors.md index 31a1f4b8baa41..3d7318086e0b3 100644 --- a/docs/Python-for-Formula-Authors.md +++ b/docs/Python-for-Formula-Authors.md @@ -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. diff --git a/docs/Xcode.md b/docs/Xcode.md index 1569b0d1be55d..a2467201aed55 100644 --- a/docs/Xcode.md +++ b/docs/Xcode.md @@ -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` diff --git a/docs/vale-styles/Homebrew/Abbreviations.yml b/docs/vale-styles/Homebrew/Abbreviations.yml index 95bd5b559ea05..c26a146698655 100644 --- a/docs/vale-styles/Homebrew/Abbreviations.yml +++ b/docs/vale-styles/Homebrew/Abbreviations.yml @@ -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: diff --git a/docs/vale-styles/Homebrew/OxfordComma.yml b/docs/vale-styles/Homebrew/OxfordComma.yml index 26f258763eda4..4049ba328e738 100644 --- a/docs/vale-styles/Homebrew/OxfordComma.yml +++ b/docs/vale-styles/Homebrew/OxfordComma.yml @@ -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: diff --git a/docs/vale-styles/Homebrew/Pronouns.yml b/docs/vale-styles/Homebrew/Pronouns.yml index f1d5f30c335c4..f980d584b281d 100644 --- a/docs/vale-styles/Homebrew/Pronouns.yml +++ b/docs/vale-styles/Homebrew/Pronouns.yml @@ -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: diff --git a/docs/vale-styles/Homebrew/Spacing.yml b/docs/vale-styles/Homebrew/Spacing.yml index 2b3f2bdc10171..0ee95cd5f86f5 100644 --- a/docs/vale-styles/Homebrew/Spacing.yml +++ b/docs/vale-styles/Homebrew/Spacing.yml @@ -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: diff --git a/docs/vale-styles/Homebrew/Terms.yml b/docs/vale-styles/Homebrew/Terms.yml index 5262e5df1b77a..5803cdfc2406e 100644 --- a/docs/vale-styles/Homebrew/Terms.yml +++ b/docs/vale-styles/Homebrew/Terms.yml @@ -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: diff --git a/docs/vale-styles/Homebrew/Trademarks.yml b/docs/vale-styles/Homebrew/Trademarks.yml index e1d335d46c3de..869ee35332871 100644 --- a/docs/vale-styles/Homebrew/Trademarks.yml +++ b/docs/vale-styles/Homebrew/Trademarks.yml @@ -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: