- Spoiler: they aren't.
- As part of Volunteer Month at work I introduced `hharen` to contributing to
Homebrew, `cd $(brew --repo)`, `brew tests`, `brew style`, etc.
- We started to write a RuboCop for this. But my current thinking is that this
test might be sufficient since it might be easier to notice "oop, a test is
failing and I've added a new envvar" and re-alphabetize it than to write a
RuboCop linter for it to do the one-time autofix. Considering how little this
gets changed?
Co-authored-by: Hana <hharen@github.com>
We already had `HOMEBREW_FORBIDDEN_LICENSES` but this commit adds
`HOMEBREW_FORBIDDEN_CASKS`, `HOMEBREW_FORBIDDEN_FORMULAE` and
`HOMEBREW_FORBIDDEN_TAPS` for also forbidding those.
Relatedly, add `HOMEBREW_FORBIDDEN_OWNER` and
`HOMEBREW_FORBIDDEN_OWNER_CONTACT` to allow customising these
messages.
There were no existing tests for `HOMEBREW_FORBIDDEN_LICENSES` so have
added more tests for all of these checks.
Co-authored-by: Bo Anderson <mail@boanderson.me>
The extra module was their to facilitate testing but now that
everything is properly namespaced and each command is an instance
we can just move the methods into the command. Since it's an
instance now we don't need to be as careful about caching either.
When fixing permissions fails, we should not print the error messages
from e.g. `chmod` unless we are in debug or verbose mode (because we
immediately retry taking ownership `sudo`).
This PR removes all remaining unnecessary cache clearing in tests
from the codebase since we now clear all cachable classes between
tests making this functionally unnecessary.
Original PR to automatically clear caches:
- https://github.com/Homebrew/brew/pull/16746
I also moved the `Utils::Analytics` module to use cachable so
that we don't have to clear caches specifically in tests anymore.
When the `--extract-plist` option was added to livecheck, conditions
were added in `#run_checks` to skip casks using `ExtractPlist` if the
`--extract-plist` isn't used and the run involves multiple
formulae/casks. This integrates the skip into the `SkipConditions`
class.