reek: Ruby 2.5 compatibility problem in CodeClimate engine

How do you configure reek for a specific ruby version? I am using jruby-9.2.0.0 which is ruby 2.5 compatible and I am getting

This file has unexpected token kRESCUE [reek]

on something like

[].each do
rescue nil
end

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

FWIW, the 4.8.1 release went out today. The QA looked good with a modest amount of testing. If Reek 5 has breaking changes for folks with existing checked-in config, we may want to release it as a special channel, as we do with the rubocop engine 🤔

@klobuczek our codeclimate engine seems indeed to be broken unfortunately in some contexts. We will fix this right after Reek 5 will be released which is expect to happen in the next couple of days since there are only 2 pull requests left to deal with.

I’m really sorry for the bad reporting. I just updated the code snippet which causes the error. However, the error only happens if reek is run via codeclimate. If I run it directly with the gem it does not fail on the rescue. So I have to look if codeclimate is using a different reek version.