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
Undefined method reject
for Rubocop::Cop::Registry in Rubocop::Cop::Team#roundup_relevant_cops
#8077
Comments
Sorry for the trouble you're having.
|
@marcandre Thanks, I can confirm that your PR fixes the immediate error, but it only gets one line further before failing again: Gemfile: $ bundle exec pronto run -c=development
# ...
bundler: failed to load command: pronto (/Users/pauld/.gem/ruby/2.6.6/bin/pronto)
NoMethodError: undefined method `excluded_file?' for RuboCop::Cop::Migration::DepartmentName:Class
/Users/pauld/.gem/ruby/2.6.6/bundler/gems/rubocop-a0acfc562e1f/lib/rubocop/cop/team.rb:148:in `block in roundup_relevant_cops'
/Users/pauld/.gem/ruby/2.6.6/bundler/gems/rubocop-a0acfc562e1f/lib/rubocop/cop/registry.rb:187:in `each'
/Users/pauld/.gem/ruby/2.6.6/bundler/gems/rubocop-a0acfc562e1f/lib/rubocop/cop/registry.rb:187:in `each'
/Users/pauld/.gem/ruby/2.6.6/bundler/gems/rubocop-a0acfc562e1f/lib/rubocop/cop/team.rb:147:in `reject'
/Users/pauld/.gem/ruby/2.6.6/bundler/gems/rubocop-a0acfc562e1f/lib/rubocop/cop/team.rb:147:in `roundup_relevant_cops'
/Users/pauld/.gem/ruby/2.6.6/bundler/gems/rubocop-a0acfc562e1f/lib/rubocop/cop/team.rb:116:in `offenses'
/Users/pauld/.gem/ruby/2.6.6/bundler/gems/rubocop-a0acfc562e1f/lib/rubocop/cop/team.rb:67:in `inspect_file'
/Users/pauld/.gem/ruby/2.6.6/gems/pronto-rubocop-0.10.0/lib/pronto/rubocop/patch_cop.rb:44:in `offences'
/Users/pauld/.gem/ruby/2.6.6/gems/pronto-rubocop-0.10.0/lib/pronto/rubocop/patch_cop.rb:12:in `messages'
/Users/pauld/.gem/ruby/2.6.6/gems/pronto-rubocop-0.10.0/lib/pronto/rubocop.rb:10:in `block in run'
/Users/pauld/.gem/ruby/2.6.6/gems/pronto-rubocop-0.10.0/lib/pronto/rubocop.rb:10:in `map'
/Users/pauld/.gem/ruby/2.6.6/gems/pronto-rubocop-0.10.0/lib/pronto/rubocop.rb:10:in `run'
/Users/pauld/.gem/ruby/2.6.6/gems/pronto-0.10.0/lib/pronto/runners.rb:20:in `block in run'
/Users/pauld/.gem/ruby/2.6.6/gems/pronto-0.10.0/lib/pronto/runners.rb:13:in `each'
/Users/pauld/.gem/ruby/2.6.6/gems/pronto-0.10.0/lib/pronto/runners.rb:13:in `run'
/Users/pauld/.gem/ruby/2.6.6/gems/pronto-0.10.0/lib/pronto.rb:64:in `run'
/Users/pauld/.gem/ruby/2.6.6/gems/pronto-0.10.0/lib/pronto/cli.rb:66:in `block in run'
/Users/pauld/.gem/ruby/2.6.6/gems/pronto-0.10.0/lib/pronto/cli.rb:64:in `chdir'
/Users/pauld/.gem/ruby/2.6.6/gems/pronto-0.10.0/lib/pronto/cli.rb:64:in `run'
/Users/pauld/.gem/ruby/2.6.6/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
/Users/pauld/.gem/ruby/2.6.6/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
/Users/pauld/.gem/ruby/2.6.6/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
/Users/pauld/.gem/ruby/2.6.6/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
/Users/pauld/.gem/ruby/2.6.6/gems/pronto-0.10.0/bin/pronto:6:in `<top (required)>'
/Users/pauld/.gem/ruby/2.6.6/bin/pronto:23:in `load'
/Users/pauld/.gem/ruby/2.6.6/bin/pronto:23:in `<top (required)>' |
Yes, I just realized this, I was confused, sorry about that. So the issue is that instead of |
Also seeing this exact error with |
@bbatsov I could make a quick patch to |
Is this fully fixed in 0.85.1? It's not in the changelog ... |
Yes it is fixed. We typically only include user facing issues in the Changelog... |
Thanks @marcandre that's good news. FWIW, due to the breaking of erb-lint (#8077 (comment)) I think this is a user facing issue and you deserve credit for fixing it. |
Well, I broke it (witingly) in the first place 🤣. The issue with RuboCop is that it was always more thought of as a tool to use than a code library to extend. |
Related again Shopify/erb-lint#179 |
Expected behavior
I am getting an exception (see below) after updating to rubocop 0.85.0 when running the pronto-rubocop gem. I suspect this is due to changes in: #8030
rubocop 0.84.0 didn't fail in this way.
Actual behavior
Steps to reproduce the problem
From what I can tell, any pronto run that includes pronto-rubocop will cause this failure... will update if i can find other ways to reproduce.
RuboCop version
The text was updated successfully, but these errors were encountered: