-
-
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
New configuration option allowing method definitions without parenthesis around arguments #577
Comments
Is there any difference between your proposal and just disabling the cop? If we add a configuration about parentheses in method definitions, I think it should not allow another style, it should enforce either style. |
I'm totally supporting @yujinakayama's comment - allowing both styles is definitely not an option. But if you're writing method definitions all the time without parentheses I guess we could add another enforced style to the cop. |
I like MethodDefinition:
# Valid values are: parentheses, no_parentheses
EnforcedStyle: parentheses |
Thanks for your answers, I agree. I'll write a pull request implementing
|
@Florent2 Ping :-) |
thanks for the reminder and sorry for the delay, I've started implementing the new cop, should be able to send the pull request this week |
sorry for the delay, hopefully this week it should be finished |
…tions This change introduces enforcing a method definition style without parentheses like this: def columnsort array, size end This change also reworks the DefWithoutParentheses cop and replaces it with MethodDefParentheses with EnforceStyle: no_parentheses
[Fix #577] A cop for requiring no parentheses in method definitions
Would you accept a pull request that introduces a new configuration option allowing method definitions without parenthesis around arguments?
If so, I can do it.
Default value would be false.
The text was updated successfully, but these errors were encountered: