`FormulaInstaller` calls `audit_installed` at install time, which
invokes methods in `FormulaCellarChecks`. One of these methods makes a
call to `tap_audit_exception` (cf. #11750), but this method isn't
visible in `FormulaInstaller`.
Instead of trying to replicate the logic of `tap_audit_exception` in
`FormulaAuditor` (or trying to initialise an instance of one to make the
call to `FormulaAuditor`'s implementation of it), let's just implement a
stub that assumes an exception always exists.
I'll need to think a bit about whether this is the right fix for this,
but currently the missing method error is blocking PRs in Homebrew/core,
so let's go with this for now. [1]
[1] e.g. Homebrew/homebrew-core#81388, Homebrew/homebrew-core#81582
The `check_binary_arches` audit will fail any formula that produces
universal binaries. We have a handful of formulae in Homebrew/core that
do this (see any formula that does `ENV.permit_arch_flags`, for
example). Moreover, some third party taps may have their own formulae
that build universal binaries.
I've updated the check so that it ignores a formula that produces
universal binaries whenever the formula is in the appropriate allowlist.
We'll need to create one in Homebrew/core for the handful of formulae
that do (expectedly) build universal binaries.
If we don't want to maintain an allowlist, we can easily modify this to
pass over any formulae that builds compatible universal binaries.
I've also fixed the spacing of the error this audit produces whenever
there is more than one file that fails the audit.
There have been a few instances I've noticed that we've been silently
installing binaries built for x86_64 on ARM. There's probably more that
I haven't found yet, so it seems useful to check this with an audit.
I often find myself checking Repology to quickly reference how other
package managers handle certain things, so it seems useful to be able to
do so with `brew search`.
While we're here, let's fix the query URL for MacPorts.
It's too easy to forget to, and the consequences of forgetting to pass
`--autosquash` are worse (i.e. almost always permanent) than forgetting
to pass `--no-autosquash` (i.e. just do `pr-publish --no-autosquash`
when your command fails).
See the discussion at Homebrew/homebrew-core#80717.