-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Style/MethodCallWithoutArgsParentheses should have an IgnoredMethods setting #4753
Comments
Good point. 🙂 It's also a bit unfortunate the author went with |
It's not like we can't change this. ;-) |
There are unfortunately a ton of inconsistencies from the early days of the project. |
Indeed. Another one I've noticed is the varied use of |
Works like a charm, thanks! |
RuboCop 0.55.0 supports ignoring this cop only for specific methods. See rubocop/rubocop#4753 for details. [ci skip]
The Style/MethodCallWithArgsParentheses cop allows some methods to be ignored using the IgnoredMethods setting. Oddly, the Style/MethodCallWithoutArgsParentheses cop does not.
Expected behavior
Given the following code
If I add the following to
.rubocop.yml
:I expect RuboCop not to report an offense for Style/MethodCallWithoutArgsParentheses.
Actual behavior
RuboCop complains about the parameter and reports an offense for Style/MethodCallWithoutArgsParentheses:
Steps to reproduce the problem
Create a file
foo.rb
with:And a file
.rubocop.yml
with:Run RuboCop:
RuboCop version
The text was updated successfully, but these errors were encountered: