-
-
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
Inconsistence between ruby-style-guide for fail/raise and rubocop implementation #2732
Comments
+1 to do something here. I ran rubocop on my code yesterday and noticed many raise's turned into fail's. I googled raise vs. fail, and found https://www.relishapp.com/womply/ruby-style-guide/docs/exceptions, which implies that rubocop's behavior is correct. But as you said, the style guide that bbatsov wrote says otherwise. The question of how to proceed boils down to which style guide we follow. If relishapp, then we should update the style-guide that bbatsov wrote. If the bbatsov guide wins, then rubocop impl should be updated. |
Is there any objective reason to prefer one over the other? Or is it just a case of picking whichever one seems more descriptive? |
It should be addressed by making |
There are reasons, but they aren't important for this particular ticket. :-) I'm fine with always using |
There has been a change to the Ruby Style Guide. See here for recent discussion: rubocop/rubocop#2732
There has been a change to the Ruby Style Guide. See here for recent discussion: rubocop/rubocop#2732
Policy seems to have changed recently rubocop/rubocop#2732 (comment)
I noticed that rubocop has a dead link to https://github.com/bbatsov/ruby-style-guide#fail-method and the current rule in the README (https://github.com/bbatsov/ruby-style-guide#prefer-raise-over-fail) is exactly the contrary of what rubocop currently checks.
I think we should align the implementation to the guide.
The text was updated successfully, but these errors were encountered: