- Part of issue 16323.
- Previously this was being done manually by Cask maintainers.
- While we're here, enforce that the `zap trash` path is not in `[]` if
it only contains a single element.
- This is buggy on actual Casks, hence the draft PR.
- As discussed in
https://github.com/Homebrew/brew/pull/14976#issuecomment-1474544569
and further comments, this is needed because in order to enforce the
order of `on_{arch,system}` blocks we need to have everything
consistently within one of those blocks.
- We previously allowed overrides where the top-level `version` stanza
would be the default, unless on an OS that had an `on_system` block
with a `version` specified. But this breaks down when we try to order
the `on_system` blocks because if a `url` at the top-level has a
`version` interpolated in it, then the `version` stanza needs to be
above the `url` stanza. But it could be that `version` is OS-specific.
- Let's stop allowing overrides and require that everything be in an
`on_system` block. This will make it easier to enforce the order of
`on_system` blocks in a future PR (14976).
- Apparently the "verified" parameter in the URL (present when a Cask's
download URL is not the same as its homepage) shouldn't have the
protocol (`https`, `http`) at the front.
- Removing this has happened manually in the past, so here's an
autocorrecting RuboCop for it.