Skip to content
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

rubocop: exclude more tap files from the top-level method cop #16577

Conversation

apainintheneck
Copy link
Contributor

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Basically, this started failing for me on my personal tap because there are some methods defined at the top-level in my Rakefile. That seems acceptable to me and since we're already ignoring all other Ruby files in the tap I figured we might as well just ignore all of them.

I tested it locally and the errors I was getting with my personal tap went away.

Errors: https://github.com/apainintheneck/homebrew-dev-utils/actions/runs/7769885195/job/21189430063?pr=38

@apainintheneck
Copy link
Contributor Author

I wonder if we should always use Taps/**/* instead of Taps/**/*.rb to avoid situations like this.

@Bo98
Copy link
Member

Bo98 commented Feb 3, 2024

I wonder if we should always use Taps/**/* instead of Taps/**/*.rb to avoid situations like this.

Probably. I see no reason why it should be limited to .rb

Basically, this started failing for me on my personal tap because
there are some methods defined at the top-level in my Rakefile.
That seems acceptable to me and since we're already ignoring all
other Ruby files in the tap I figured we might as well just ignore
all of them.

I ended up changing one other use of `Taps/**/*.rb` to `Taps/**/*.rb`
as well.
@apainintheneck apainintheneck force-pushed the exclude-more-tap-files-from-top-level-method-cop branch from c5fa0f0 to 648c50e Compare February 4, 2024 00:49
@apainintheneck
Copy link
Contributor Author

It turned out that there was only one other use of it. The other ones are all Taps/*/*/*.rb which is a little bit more specific.

@apainintheneck apainintheneck merged commit 34882f5 into Homebrew:master Feb 4, 2024
22 checks passed
@MikeMcQuaid
Copy link
Member

Makes sense, thanks @apainintheneck!

@github-actions github-actions bot added the outdated PR was locked due to age label Mar 6, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants