-
-
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 auto-correct to BlockAlignment cop #1078
Conversation
Looks OK to me, but let's here what @jonas054 thinks as well. You should also add a changelog entry for this. |
@barunio The |
Or actually a new cop for "end statement is not on its own line" similar to the one in #1079 makes much more sense. Then you can use |
@barunio Ping |
Sure. |
Thanks, @barunio. I'll hold my horses. |
It'd be good if this were wrapped soon, as I plan to release the next stable version in the beginning of next week. |
ok, will try to wrap it up today |
Coverage increased (+0.0%) when pulling 9d052f4beb6df86a1fe01943500281e9c74cec3c on barunio:block_alignment_autocorrect into 106da8b on bbatsov:master. |
I split up the "end statement not on its own line" into a separate cop as requested. But, I don't see any easy way to use the I'm not sure if |
Add auto-correct to BlockAlignment cop
Guess this will do for now. Thanks! |
This is a modified version of #1002. The original PR went beyond the scope of this one cop, so this no longer includes the extra functionality. (That will be taken care of by a new cop, which I'll open a PR for in a bit.)
Note that the class disables the ClassLength cop, because it is too long with the extra functionality. It didn't make sense to me to extract the autocorrect into a module, since it isn't shared anywhere, just to satisfy the length limit. Let me know if there's some other approach that you think makes more sense here.