New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix brew audit Formula/formula.rb
#8589
Conversation
|
brew audit Formula/formula.rb
brew audit Formula/formula.rb
Only one style failure remains:
Looks like we also have to exclude |
Or you can add a dummy conditional like |
Clever idea – however, what do we do if future me (say, when |
Make it |
If I’m not back by midnight, you can probably find me in jail. |
@reitermarkus The cops say puts "This caveat is conditional" unless String("Caffeine") == "Caffeine" |
Failing on linuxbrew-core (which means the way these rules are being applied to formula has changed): https://github.com/Homebrew/brew/pull/8589/checks?check_run_id=1109379026#step:16:1 |
@SeekingMeaning, @claui mentioned (in a commit comment which I can't find anymore) that |
Here’s the source: https://docs.rubocop.org/rubocop/configuration.html#path-relativity |
So maybe |
@claui Any news here? Would be good to get this merged. |
@claui Could you try to finish this off or close it out? Thanks. |
@SeekingMeaning What purpose did your commit intend to serve? From my point of view, it simply re-introduces the very bug that this PR is trying to fix. Do you want to fix it or shall I revert? |
I can't remember off the top of my head, but feel free to revert |
Fix a regression introduced in PR #8542, which wouldn’t exclude formulae and casks from stricter style checks properly unless tapped. This caused `brew audit Formula/formula.rb` to report violations which were not meant for formulae and casks. The fix is to add Exclude patterns for formulae and casks in any `git clone`d tap’s working tree. Working outside of the productive Homebrew installation makes sure that the latter doesn’t interfere with development, and vice versa. It also helps track work in progress, especially if one tends to forget things.
Thanks @reitermarkus for reinstating the previous state. |
Everything seems to be working now. |
Thank you ❤️ |
Thanks @claui for starting this and @reitermarkus for finishing this off. |
brew style
with your changes locally?Reports the presence of# rubocop:disable
as a violation in 70 cases.Update: A couple of style checks fail, see below.Update 2: All style checks pass now for me.
brew tests
with your changes locally?One test (style_spec.rb
) fails for me but I feel it should pass, hence WIP.Update: A couple of tests fail on my local machine but they’re all unrelated.
Explanation
Fix a regression introduced in PR #8542, which wouldn’t exclude formulae and casks from stricter style checks properly unless tapped. This caused
brew audit Formula/formula.rb
to report violations which were not meant for formulae and casks.The fix is to add Exclude patterns for formulae and casks in any
git clone
d tap’s working tree.Working outside of the productive Homebrew installation makes sure that the latter doesn’t interfere with development, and vice versa. It also helps track work in progress, especially if one tends to forget things.
WIP becausestyle_spec.rb
inexplicably fails for me.Update: passes now.
Failing style checks
WIP because the following style checks still fail: