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
When using an exception class with just keyword arguments, it should not find an offense.
raiseMyError.new(keyword: argument,key: word)
Actual behavior
It finds an offense, telling me I should be using raise MyError, message instead. This is because the code simply checks if there's only 1 argument, and keyword argument always count as one.
Steps to reproduce the problem
Run rubocop on the following snippet, with Style/RaiseArgs enabled
raiseMyError.new(keyword: argument,key: word)
RuboCop version
Include the output of rubocop -V. Here's an example:
Expected behavior
When using an exception class with just keyword arguments, it should not find an offense.
Actual behavior
It finds an offense, telling me I should be using
raise MyError, message
instead. This is because the code simply checks if there's only 1 argument, and keyword argument always count as one.Steps to reproduce the problem
Run rubocop on the following snippet, with Style/RaiseArgs enabled
RuboCop version
Include the output of
rubocop -V
. Here's an example:The text was updated successfully, but these errors were encountered: