Closed crazyoptimist closed 1 year ago
It's soooo weird that rubocop passes on my machine, with the exactly same ruby version with the ci.
❯ ruby --version
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux]
bundle exec rake rubocop
result:
Inspecting 67 files
...................................................................
67 files inspected, no offenses detected
But 2 offences are detected in the ci and it doesn't pass.
🤔
Your local is probably not running the same version of Rubocop. Enable all cops (AllCops/Enabled: true) and then run bundle exec rubocop -a ; bundle exec rubocop --auto-gen-config
.
It turns out that TargetRubyVersion
should be set in the rubocop config. Now I set it to 3.1 and it passes, but do you see any problem in doing so?
@dblock
Actually need to revert the rubocop run, because it broke some working code. Working on it.
So let me know if running rubocop on ruby 3.1 may have any problem. I'm not sure.
So let me know if running rubocop on ruby 3.1 may have any problem. I'm not sure.
Yeah you should be targeting the minimum version of Ruby we support, which is 2.6 I believe looking at CI, otherwise it might generate code that doesn’t work.
Got it. I'll do.
1 Message | |
---|---|
:book: | We really appreciate pull requests that demonstrate issues, even without a fix. That said, the next step is to try and fix the failing tests! |
Generated by :no_entry_sign: Danger
So let me know if running rubocop on ruby 3.1 may have any problem. I'm not sure.
Yeah you should be targeting the minimum version of Ruby we support, which is 2.6 I believe looking at CI, otherwise it might generate code that doesn’t work.
Done. @dblock
TargetRubyVersion
in Rubocop config is the oldest officially supported Ruby version(currently 2.6).