Rubocop: RuboCop is broken with Parser 2.5.1.1

Created on 10 Jul 2018  路  6Comments  路  Source: rubocop-hq/rubocop

Parser 2.5.1.1 was released two hours ago and it breaks RuboCop.

Expected behavior

RuboCop works fine with both parser 2.5.1.0 and 2.5.1.1

Actual behavior

RuboCop gives very odd results with 2.5.1.1. Also, 37 of its tests fail.

Steps to reproduce the problem

Once parser 2.5.1.1 is installed:

  • Just run rubocop on your favourite software that was RuboCop clean.
  • Or: Run RuboCop's tests with.

RuboCop version

Include the output of rubocop -V. Here's an example:

$ rubocop -V
0.58.0 (using Parser 2.5.1.1, running on ruby 2.5.1 x86_64-linux)

Most helpful comment

0.58.1 is out.

All 6 comments

@whitequark any insight you can bring to this :point_up: would be highly appreciated.

Parsing the following with ruby-parse fails with a syntax error, so for now I'm assuming this is a bug in parser.

class Foo < Bar
end

Result:

$ ruby-parse --25 foo.rb
foo.rb:2:1: error: unexpected token kEND
foo.rb:2: end
foo.rb:2: ^~~

I confirm. Rubocop check is telling us that most of our production code has Ruby syntax errors, which of course it's not true.

In case you need more information, please ask. Thank you all. 馃槃

I'll issue a fix for RuboCop in a moment. (just ignore this broken parser version)

0.58.1 is out.

@bbatsov TYVM 馃帀

Was this page helpful?
0 / 5 - 0 ratings