10 Commits

Author SHA1 Message Date
BrewTestBot
456677a3f2
sorbet: Autobump sigils via Spoom
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
2024-07-14 00:24:16 +00:00
Sam Ford
17b0493e18
Use struct for #audit_formula args
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.
2024-07-08 12:22:25 -04:00
Markus Reiter
0f0055ede4
Make documentation @api private by default. 2024-04-26 19:04:20 +02:00
Michael Cho
747e95b159
rubocops/resource_requires_dependencies: check sym_type?
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>
2024-04-05 10:23:02 -04:00
Michael Cho
a7e5e7b8e8
rubocops/resource_requires_dependencies: allow lxml build resource
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>
2024-04-04 19:53:13 -04:00
Issy Long
3bfe7e5aa1
Handle nil resource args for some reason
- Ran this against `signal-cli` and despite it having a valid-looking resource block, it failed on `undefined method 'str_content' for nil:NilClass`.
2024-02-20 23:48:58 +00:00
Issy Long
5c7be57531
Appease Sorbet 2024-02-20 23:36:52 +00:00
Issy Long
a895496982
rubocop: The pyyaml resource requires depends_on "libyaml" 2024-02-20 23:22:15 +00:00
Issy Long
ff23de4766
Formatting and cope with more modern RSpec config changes
Co-authored-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2024-02-20 12:17:27 +00:00
Issy Long
33c33b5338
rubocop: Formulae with the "lxml" resource have required dependencies
- 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.
2024-02-19 22:50:55 +00:00