Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuboCop is broken with Parser 2.5.1.1 #6092

Closed
mvz opened this issue Jul 10, 2018 · 6 comments
Closed

RuboCop is broken with Parser 2.5.1.1 #6092

mvz opened this issue Jul 10, 2018 · 6 comments

Comments

@mvz
Copy link
Contributor

mvz commented Jul 10, 2018

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)
@mvz
Copy link
Contributor Author

mvz commented Jul 10, 2018

@whitequark any insight you can bring to this ☝️ would be highly appreciated.

@mvz
Copy link
Contributor Author

mvz commented Jul 10, 2018

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: ^~~

@jodosha
Copy link

jodosha commented Jul 10, 2018

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. 😄

@bbatsov
Copy link
Collaborator

bbatsov commented Jul 10, 2018

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

@bbatsov
Copy link
Collaborator

bbatsov commented Jul 10, 2018

0.58.1 is out.

@jodosha
Copy link

jodosha commented Jul 10, 2018

@bbatsov TYVM 🎉

jodosha added a commit to hanami/utils that referenced this issue Jul 10, 2018
bundlerbot added a commit to rubygems/rubygems that referenced this issue Jul 10, 2018
…by-swandale

Fix broken rubocop task by upgrading to 0.58.1

# Description:

The problem is a broken parser release (2.5.1.1). Rubocop 0.58.1 skips
this bad release so upgrading fixes the problem. An alternative is to
explicitly install the previous version of parser, but I see no harm in
upgrading.

See rubocop/rubocop#6092.

# Tasks:

- [x] Describe the problem / feature
- [ ] Write tests
- [x] Write code to solve the problem
- [ ] Get code review from coworkers / friends

I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
bpollack added a commit to activemerchant/active_merchant that referenced this issue Jul 10, 2018
This version includes a bugfix (rubocop/rubocop#6092)
that should allow us to add PayPal-related code to the RuboCop checks.
For this patch, though, only RuboCop is upgraded (and a tiny tweak to
Mercury implemented to handle a new RuboCop test); the PayPal compliance
changes will be a separate commit.
bpollack added a commit to activemerchant/active_merchant that referenced this issue Jul 11, 2018
This version includes a bugfix (rubocop/rubocop#6092)
that should allow us to add PayPal-related code to the RuboCop checks.
For this patch, though, only RuboCop is upgraded (and a tiny tweak to
Mercury implemented to handle a new RuboCop test); the PayPal compliance
changes will be a separate commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants