- start running this check again
- check the `docs` basename correctly
- use a different name (to a symlink) for the docs rubocop
configuration so that path relativity is done correctly:
https://docs.rubocop.org/rubocop/configuration.html#path-relativity
- add more wildcards to fix docs rubocop exclusions
`brew style` tap support was broken in 7d0ac4d (#17357), so now
something like `brew style homebrew/core` exits without checking
anything. This happens because the new file-handling logic doesn't
do anything with a tap path. Previously, a tap path would be added
to `ruby_files` but now it isn't added to any of the arrays of files
to check.
This fixes the issue by adding some logic to add the path to the
`ruby_files` array if it's a tap.
It feels nice to also be running this as part of `brew style` checks
and, indirectly, `brew test-bot` tap syntax checks.
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
We already do this for deprecations but these may make warnings
and errors from Homebrew easier to spot in GitHub Actions logs.
While we're here, cleanup other cases that should have used
`GitHub::Actions::Annotation` but didn't and provide some helpers and
tweaks there necessary for our use case here.
- Call `Homebrew.install_bundler_gems!` as early as possible
- Always call `Homebrew.install_bundler_gems!` in `dev-cmd` rather than
in `Library/Homebrew` helpers method (to ensure we don't accidentally
call this for non-dev-cmd commands)
- Yes, we have yet another `.rubocop.yml` but in-line exclusions in
`<span class="display:none;">` in the Markdown seemed more ugly.
- This needed tweaks to `brew style` to make it read the new config
file when we're scanning docs.
If you do `brew style --fix .` in `HOMEBREW_REPOSITORY` it behaves
very weirdly and uses the incorrect rules. If this is passed, assume
that people want the same behaviour as `brew style --fix`.
While we're here, do some argument naming and code cleanup.