- This builds on @jonchang's work that started in #6265.
- We now use `uses_from_macos` to declare dependencies that are implicit
on macOS because they ship with macOS, but they're needed on Linux. We
have to be sure that the dependencies people specify as
`uses_from_macos` are actually shipped with macOS. So, we maintain a
safelist of those dependencies and check against it.
- Also add more legitimate `uses_from_macos` dependencies to the list.
- This is runnable with `brew audit --only-cops=FormulaAudit/UsesFromMacos`.
- It produces different number of failures on macOS vs. Linux, because
apparently we've not synced Homebrew/linuxbrew-core upstream thoroughly
enough yet.
- Originally this was designed as a `--strict` audit, but we flipped it
to be a normal audit because - to quote Mike - this is "sufficiently
robust" now.
- The final two `brew style` offenses were for Metrics/LineLength where
parsing the GitHub diff URL as a regex took 119/118 lines.
- This disables the cop for each of those long, problematic lines, and
re-enables them straight afterwards, else they'd apply to the whole file
from the first occurrence onwards, which we probably don't want?
- I wondered about increasing the LineLength limit to 119 or 120, but
it appears to have been set for a justifiable reason in 80d75bc0d8.
- Migrate the existing binary URL audit to a RuboCop.
- Check resources as well as main URLs
- Also check for "macos" and "osx" in URLs
- Add whitelists for URLs and formulae
- Ensure that new formulae problems aren't duplicated
- Now that homebrew/core will imminently not have options adjust the
various audits so they make more sense (and exclude taps)
- Exclude taps from more preferential audits
In a number of Cask specs, the value of the `homepage` stanza is currently set
to https://example.com. As of 2018-11-28, the TLS certificate served by
example.com seems to be expired, possibly due to an oversight on ICANN’s side.
While the certificate is certainly going to be renewed soon, it would be
desirable for Homebrew’s test result to be less dependent on ICANN’s actions.
This commit changes the homepages of all test Casks to http://brew.sh, whose
domain and TLS certificate are both controlled by Homebrew.