-
Notifications
You must be signed in to change notification settings - Fork 51
Infer TargetRubyVersion from .ruby_version file #195
Comments
If you look at this PR (rubocop/rubocop#3261), they actually slightly modified the logic to make it so that if you define TargetRubyVersion, it'll still take precedence over Let me know if it's working for you and I'll close the issue |
I don't have TargetRubyVersion set in my rubocop config and I'm getting warnings about the safe navigation operator in my editor with a 2.3 ruby version file. When I run rubocop from the command line I don't get these errors. |
Ahh I see what's happening. The problem is that the linter is running |
Ah sure that makes sense. Thanks for investigating! |
+1 |
Please let me know if the fix above resolved your issue. Thanks! |
@maschwenk looks great! thank you, this is going to help me out a ton!! |
Rubocop will default to reading the
.ruby_version
file if theTargetRubyVersion
parameter is not present in your rubocop configuration. Here's the PR that implemented that behavior on the rubocop side.It would be nice to add that behavior to this linter.
The text was updated successfully, but these errors were encountered: