Adding type signatures to `#audit_formula` methods in formula cops
would lead to verbose, repetitive signatures across the existing ~63
instances. This reworks `#audit_formula` to use a `T::Struct` for its
arguments, which allows us to use a one-line signature for these
methods.
Avoid running `#value` on unsupported types by selecting only symbol
nodes as we only care about `:build` value.
Signed-off-by: Michael Cho <michael@michaelcho.dev>
Specifically, a `lxml` build resource can depend on build-only `libxml2`
and `libxslt`; however, these were not detected in previous audit since
the dependency would be a hash.
Also change message if Linux-only formula.
These changes are both needed for `systemd`.
Signed-off-by: Michael Cho <michael@michaelcho.dev>
- We're moving from `depends_on "python-lxml"` to `resource "lxml" ...` as part
of the new Python vendoring plan.
- For `resource "lxml"` to work, `uses_from_macos "libxml2"` and
`uses_from_macos "libxslt"` are needed in the formulae.
- This new RuboCop rule enforces that a formula including the "lxml" resource
also include those dependencies.