-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 autocorrect for style cops #743
Comments
Indeed we should autocorrections for all of those. Btw, auto-correction for |
@jonas054 @yujinakayama Feel free to add more items to the list. I'm fairly sure there are other cops that are missing auto-correct functionality, for which it's possible to implement it. I guess it might be a good idea to have a table in the wiki that keeps track of this (and possibly other cop features). |
Just off the top of my head, I know that I recently split |
I've added a wiki page. Please make additions, deletions and changes as you see fit. It's just my opinions and guesses; something to get a discussion started. |
@jonas054 Nice work on the wiki page. I guess we should start by implementing auto-correct where it's easier to do so and move to the tougher cases down the road. |
I'll do |
Part of solution for rubocop#743.
I'll do |
I'll do |
I'll do |
I’ve updated this issue with some more candidates for auto-correction. |
Good! I'll try to tackle some of them. Anyone is of course welcome to help out. |
By the way, I'm not overly fond of long-lived issues with lots of bullets. Tickets with smaller scope are generally easier to track, discuss and close. |
Fair enough. I’m happy to close this issue and open new issues for all the unchecked boxes. |
Great! Let's do this then. |
Specifically, I noticed the following cops are missing auto-correction:
NumericLiterals
WordArray
AccessModifierIndentation
SingleLineMethods
EmptyLineBetweenDefs
IndentationWidth
IndentationConsistency
Proc
There may be others but these are the ones that affect me most frequently. I may contribute some of these patches myself but wanted to open an issue to document the defect. Ideally, after running
rubocop --auto-correct
, the only remaining offenses be things likeClassLength
,MethodLength
,CyclomaticComplexity
, etc., which cannot be programmatically fixed.The text was updated successfully, but these errors were encountered: