When I run rubocop on a file, I get the following warning:
(Using Ruby 2.5 parser; configure using TargetRubyVersion parameter, under AllCops)
I added the following on .rubocop.yml file:
AllCops:
TargetRubyVersion: 2.5.8
Still the warning is not going away. What am I doing wrong?
Had same issue, added the
AllCops:
TargetRubyVersion: 2.X
to my .rubocop.yml file and it did nothing, error was still showing up.
Turns out I had a syntax error, I was missing a } , once I added it rubocop was able to properly go through my file and find/fix the usual offenses. Have a great day guys!
you can fix it by adding the following to your .rubocop.yml
AllCops:
TargetRubyVersion: 3.1.x
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With