Add missing on_<system> stanzas to cask stanza order - #23321
Conversation
946e9b3 to
e890499
Compare
|
Thanks @AlternateRT! Would need fixed in homebrew/cask before this can get merged. |
d588728 to
35be9f1
Compare
|
@MikeMcQuaid I'd be happy to fix them, though how would one go about doing that? Without this PR, some of these orderings are currently considered style violations. Take the following If I attempt to fix this without this PR, wouldn't the CI on homebrew/cask fail with the following? Taps/homebrew/homebrew-cask/Casks/1/1password-cli.rb:30:1: C: [Corrected] Cask/StanzaGrouping: stanza groups should be separated by a single empty line
generate_completions_from_executable "op", "completion"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 file inspected, 1 offense detected, 1 offense corrected |
3cf40d8 to
35a7113
Compare
@AlternateRT open a PR in homebrew/cask with the fixes: one commit per cask changed in format
The CI on this repo should make it impossible to merge something and accidentally break homebrew/cask PR. That's why the If you create the proposed PR above: it should be mergeable on homebrew/cask before this PR is merged and then you can merge this. Make sense? Thanks for the work here! |
@MikeMcQuaid Thank you for the guidance 😄 I'll get right to it now! |
|
Thanks so much for this @AlternateRT - I've had on my list to make some changes here since |
As I feared, the PRs in homebrew/cask are failing because these groupings are not valid with the styling from |
@AlternateRT Need to figure out a way to merge one before the other then I think. It may involve something like adding but disabling by default a new or existing rule here before merge and splitting this PR into two. |
|
PR to group |
- Handle `on_system_conditional` stanzas correctly, which should allow it to be grouped with `arch`, and `on_arch_conditional`, and `os` - Always require `generate_completions_from_executable` to be grouped with other artifact stanzas
Also adds missing info for conditional statements section
on_<system> stanzas to cask stanza order
35a7113 to
bcf3453
Compare
|
This triggered a systematic tap-syntax failure on casks: https://github.com/Homebrew/homebrew-cask/actions/runs/30438103281/job/90530829495?pr=277889 I don't know if this is a false positive of the audit, or one cask that somehow wasn't fixed prior to merging this (and if so, why it didn't trigger in CI here). |
|
OK it's already fixed by Homebrew/homebrew-cask@01ce7eb thanks @MikeMcQuaid |
|
FYI, the following PRs will result in more tap-sytax failures if they are merged as-is:
Looking at the dates, it seems like this is what happened:
|
|
Thanks @AlternateRT. Looks like these are now both missing required jobs so should be safe. |
brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Adds
on_macosandon_linuxtoON_SYSTEM_METHODS_STANZA_ORDERso that they also follow the pattern that was already established with olderon_<system>blocks. Furthermore, this also ensures that the stanza order is enforced inside them - before this PR, this did not happen.Adjusts the cask AST so that
on_system_conditionalis correctly grouped with thearch,on_arch_conditional, andosstanzas.And finally, this re-enables the cask rubocops that were momentarily disabled to allow these migrations to occur.