You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far, this cop just checks that we're not using redundant parentheses for method calls without arguments. We should extend this to allow enforcing parentheses for method calls with arguments.
This would need to exclude method calls made from within a constant body (e.g. attr_reader) and common "keyword" methods (e.g. puts), and potentially be configurable to always omit parentheses. (The last part is a bit harder, since sometimes that produces ambiguous code.)
Example:
foo :bar, :baz
should generate an offense and be corrected to:
foo(:bar, :baz)
The text was updated successfully, but these errors were encountered:
So far, this cop just checks that we're not using redundant parentheses for method calls without arguments. We should extend this to allow enforcing parentheses for method calls with arguments.
This would need to exclude method calls made from within a constant body (e.g.
attr_reader
) and common "keyword" methods (e.g.puts
), and potentially be configurable to always omit parentheses. (The last part is a bit harder, since sometimes that produces ambiguous code.)Example:
should generate an offense and be corrected to:
The text was updated successfully, but these errors were encountered: