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

rubocops/lines: audit std_npm_args usage #17867

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

branchvincent
Copy link
Member

@branchvincent branchvincent commented Jul 26, 2024

  • 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?

Wanted to add an audit to help migrate existing std_npm_install_args usage to std_npm_args. This is my first time looking at our rubocops so help is greatly appreciated :)

My plan was to test this out and merge Homebrew/homebrew-core#178538 without bottles, but that triggers our existing audit: Use Language::Node for npm install args. So not sure how we want to sequence this, maybe I should first remove the older audit in a separate PR

@MikeMcQuaid
Copy link
Member

So not sure how we want to sequence this, maybe I should first remove the older audit in a separate PR

This seems sensible.

@p-linnane
Copy link
Member

I'm going to start from Z and work backwards on getting existing stuff updated in core.

@p-linnane
Copy link
Member

This should probably check for require "language/node" and flag if it's in formulae with *std_npm_args.

@branchvincent
Copy link
Member Author

thanks! we just need to wait for std_npm_args to land in a stable release. also after a couple no-bottle PRs, I wonder if we are ok updating the rest of core in a syntax-only PR since this should just be a cosmetic change

This should probably check for require "language/node"

Yea agreed, that might be harder since it's still needed/used for detected_node_shebang (although #17773 should cover our existing usage). Maybe we could move it to formula.rb like we do for python/java:

require "language/java"
require "language/python"

@branchvincent
Copy link
Member Author

core's updated, this is now ready for review

@branchvincent branchvincent marked this pull request as ready for review August 4, 2024 03:42
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @branchvincent!

@MikeMcQuaid MikeMcQuaid merged commit 1e56012 into Homebrew:master Aug 5, 2024
24 checks passed
@branchvincent branchvincent deleted the std_npm_args branch August 5, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants