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

Remove usage of Exclude with rubocop #14685

Closed
1 task done
MikeMcQuaid opened this issue Feb 17, 2023 · 4 comments
Closed
1 task done

Remove usage of Exclude with rubocop #14685

MikeMcQuaid opened this issue Feb 17, 2023 · 4 comments
Assignees
Labels
features New features help wanted We want help addressing this outdated PR was locked due to age

Comments

@MikeMcQuaid
Copy link
Member

Verification

Provide a detailed description of the proposed feature

When Exclude is used in e.g. .rubocop.yml files: these are not always handled consistently by e.g. the VSCode rubocop integration and they aren't flagged as unnecessary when they on longer are.

We should instead:

  • disable all the rubocop rules we're never going to realistically fix e.g. Metrics/ClassLength
  • for those we'd like to tackle some day, use # rubocop:disable with a reason in the file itself

What is the motivation for the feature?

VSCode not to flag all of formula_installer.rb as failing rubocop :sweat

How will the feature be relevant to at least 90% of Homebrew users?

It wouldn't be but it will make life easier for maintainers and contributors.

What alternatives to the feature have been considered?

Fixing all these rules.

@MikeMcQuaid MikeMcQuaid added help wanted We want help addressing this features New features labels Feb 17, 2023
@issyl0 issyl0 self-assigned this Feb 17, 2023
@issyl0
Copy link
Member

issyl0 commented Feb 19, 2023

disable all the rubocop rules we're never going to realistically fix e.g. Metrics/ClassLength

Do you mean disable the rules entirely across everything (Enabled: false), not just for the specific files? I agree that we are never going to get the big files below the limits any time soon, but that seems like a slippery slope towards a lot more files becoming like formula.rb.

@MikeMcQuaid
Copy link
Member Author

Do you mean disable the rules entirely across everything (Enabled: false)

Yes.

but that seems like a slippery slope towards a lot more files becoming like formula.rb.

It seems these numbers just keep getting bumped anyway so: I'm not sure it's stopping anything right now and is just annoying for no real reason 😢

@issyl0
Copy link
Member

issyl0 commented Mar 11, 2023

This is as done as it's gonna get! The remaining Excludes are for tap paths and Homebrew/MoveToExtendOS.

@issyl0 issyl0 closed this as completed Mar 11, 2023
@MikeMcQuaid
Copy link
Member Author

Great work, thanks @issyl0!

@github-actions github-actions bot added the outdated PR was locked due to age label Apr 12, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
features New features help wanted We want help addressing this outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

2 participants