The cache here needs to be cleared when we are auditing multiple
os/arch combinations but not when we are running the audit only
for the current os/arch combination. This gives a 2x speed boost
to `brew audit --skip-style --except-version --tap=homebrew/core` locally.
In theory we could clear the cache less often by running all audits for
one os/arch combination at a time when auditing multiple os/arch combinations.
This would make the output a bit harder to follow and we don't seem to
run those checks on CI so I'm skipping that for now.
- check for cask.url in audit steps
- check for cask.version in audit steps
- check for cask.sha256 in fetch command
- stop omitting casks based on nil url in audit command
It would be nice to be able to omit casks from the audit
if the os is not supported but there is not easy way to
do that without updating the SimulateSystem code or
refactoring how MacOSRequirement's are defined in the DSL.
It's possible for casks to only run on certain os/arch
combinations but we don't check for them in the fetch and
audit commands.
At first, I tried to check if the macos version was satisfied
in a previous PR but that doesn't work correctly because
MacOSRequirement and ArchRequirement don't respect SimulateSystem.
Instead I'm just checking to see if the url stanza is defined
for each os/arch combination and skipping those casks where
it ends up being nil. This is kind of brute forcing it but
should work.
1. Adjust audit so that it ignore conflicts only for `brew audit --tap`.
This is useful because it prevents us from trying to migrate a formula
to `openssl@3` before all its dependencies have also been migrated.
2. Exempt only PRs that target a branch called
`openssl-migration-staging`.
Emitting annotations currently produces:
Error: no implicit conversion of Symbol into Integer
The issue is that `problem` is an `Array` of problems which we need to
handle individually.
- This was failing but only in CI because the annotations require
"errors" and "warnings" hash elements. Since formulae have this
despite formulae not having warnings (probably for compatibility with
casks), I decided to reinstate `errors` and `warnings` hash for Casks
_right at the end_ and we can clean this up another time (famous last
words).
- Cask warnings are really noisy and numerous. Let's only show them if
the user passes `--strict` or something implying `--strict`, like
`--new-cask`.
- Additionally remove `display_passes` since we would like silence if
nothing is wrong with the cask, the same as with formula audits.