codeclimate-duplication icon indicating copy to clipboard operation
codeclimate-duplication copied to clipboard

Hash value ommission from Ruby-3.1

Open Zmokizmoghi opened this issue 3 years ago • 2 comments

Hash value omission was introduced with ruby 3.1 - rubyreferences.github.io/rubychanges/3.1.html#values-in-hash-literals-and-keyword-arguments-can-be-omitted

And apparently it breaks codeclimate-duplication engine: Skipping file examle.rb due to exception (Racc::ParseError): example.rb:5 :: parse error on value ":" (tCOLON)

example.rb content:

# frozen_string_literal: true

class Example
  def perform(id)
    Model.find_by!(id:)
  end
end

Thanks

Zmokizmoghi avatar Jun 15 '22 17:06 Zmokizmoghi

Also breaks flog, so I allowed myself to copy-paste this issue. Thanks @Zmokizmoghi!

fonji avatar Apr 17 '23 12:04 fonji

Flog has now the beta channel that fixes this :tada: Can we have the same here? :pray:

fonji avatar Jun 06 '23 13:06 fonji