-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Use Rubocop for some brew audit
s
#569
Comments
I might be able to take a stab at this, seems doable. But I would like some pointers though. May I please have some? (Also maybe you could ping the right persons @MikeMcQuaid) |
Take a look at rubocop-cask as an example of custom cops and parsing logic. |
Nice, will do 👍 . But should I then point a PR to that repo or put inside here somewhere (and then what is a good place)? |
Or make a new repo, but that seems like overkill. |
@maxnordlund That would be so great! I agree that probably having it inside this repo would be ideal, if that's possible (similarly maybe with rubocop-cask one day). @jawshooah any thoughts on why you made it a separate repo to avoid hitting any issues you may have hit? Regardless, I wouldn't worry too much about location or even completeness for now; I'd pick a single rule from |
Sounds like a plan, I'll make a new repo and steal/borrow the cask rubocop structure and do as you say and implement a single rule. We can always move the code around if needed I guess. |
A suggestion for an easy single rule that requires understanding Ruby more than |
I haven't been able to get this rolling because a lot of stuff have cropped up at work. I still will try to do this, but it may take quite some time. |
@maxnordlund No worries or rush. |
@MikeMcQuaid I could work on implementing this feature. I implemented a basic cop that you mentioned above.
I tested it on a formula and its working fine. The link to the code: https://github.com/GauthamGoli/rubocop-brew . Please let me know what you think Command to run the custom cop |
@GauthamGoli That looks like a great start, nice work! Next step and I'd consider this done would be to submit a PR to add |
@MikeMcQuaid We can place |
Nice! I think
Yeh, that works. It's already there on |
@MikeMcQuaid Can porting audit rules to use Rubo Cop be a GSoC project? |
@GauthamGoli Yep, that seems like a good one 👍 |
Going to consider this basically done at this point. Great work again, @GauthamGoli and hope that you'll keep doing some bits on this! |
We should investigate using Rubocop for some (maybe all)
brew audit
s rather than just regex as Rubocop can actually parse Ruby.The text was updated successfully, but these errors were encountered: