Refactor commands to remove 'require "cmd/*"'#4286
Refactor commands to remove 'require "cmd/*"'#4286MikeMcQuaid merged 1 commit intoHomebrew:masterfrom apjanke:refactor-require-cmd
Conversation
|
BTW, the style failure is this: Complaining about: Are we actually requiring longer argument names now? I seem to recall quite a few of these |
Yes, definitely, thanks and great work here!
I think ideally, yeh. Make it |
|
Cool. I don't remember: do you accept PRs for style-only fixes? I could make a pass of style fixes after doing this refactor; there's a lot of files with style complaints right now. |
Not sure what you mean here, |
|
I think the problem is that |
Oh, yep, that's what's going on. When you pass a file argument, it pulls in the "audit" rules, regardless of whether that file is a formula or something else. No problem; I can just run plain |
|
I've updated this PR to include other commands. Combined with #4253, this will cover all the commands that are importing "cmd/*". Then we need to refactor the tests, but I'll leave that for another PR. |
There was a problem hiding this comment.
Can you make both the above block ifs (and refactor the unless .. ||). I know not your code but nice to refactor this so it's not wider than the GitHub diff UI.
Nice! One nit but otherwise 👍 👏. |
Rebase needed for this. |
|
Amended to rebase and refactor that nit out. (Had to modify the nit code a bit more to satisfy |
|
Thanks again @apjanke! |
brew stylewith your changes locally?brew testswith your changes locally?This is an attempt to refactor install, upgrade, and help to remove their use of
require "cmd/*"imports.Fixes #4059.
Does this style of refactoring look good to you folks? If so, I'll do the rest, except for
search, which is handled in #4253.