-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Add a Rubocop autoconfig #3587
Add a Rubocop autoconfig #3587
Conversation
This alphabetizes the configuration for rubocop.yml and preps for a rubocop auto-config so we're not constantly hit with warnings.
I'm experimenting with this TODO now to see how painful it is to knock out some tasks with |
I can't test this right now, but if this was committed and I added a new module/etc that is rife with style problems, what happens? Would rubocop flag it? Or only if the problems were not among the types of problems already present in existing code? |
It's per type, but not per file. Rubocop doesn't appear to have a syntax for "ignore this problem only in these files." So, we have a zillion strings with double quotes that don't actually need double quotes, so if you add a few more, you will not trigger a warning. Ruby style purity is a very long road. Sent from a tiny computer. |
It’s already super fun when you have methods named after windows api data structs cuz you get a shit-ton of wrong case warnings. I’ve been letting it go if it’s strictly stuff like:
tho I realize it could be enforced w/o real detriment. BTW, I’ve found this a handy technique for shortening and adding readability to long railgun calls
credit to @zeroSteiner and/or @OJ on the idea of using %w On Jul 29, 2014, at 7:03 PM, Tod Beardsley notifications@github.com wrote:
|
Per a discussion in IRC, these rules in particular don't appear to be valuable for Metasploit at this stage.
This excludes all the existing problems reported by Rubocop so that we don't get depressed by seeing every single module fail the check.
The goal is to at least prevent new classes of Rubocop errors from cropping up, and provide a TODO list of fixes to make across our giant code base.
Incidentally, this method of starting out with Rubocop is suggested in Rubocop's README.md.
CC @jhart-r7