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

Add config and registry to processed source if the methods exist #77

Merged
merged 2 commits into from Nov 9, 2022

Conversation

renatolond
Copy link
Contributor

Fixes issue with rubocop > 1.38.x

It seems that rubocop/rubocop#10987 introduced registry and config to new versions of rubocop which were not there before.
Without those, rubocop still works, but it raises a lot of errors for some files.

I added the registry and source like in the rubocop code if the ProcessedSource responds to it, so I'm hoping it won't break compatibility with older rubocop versions.

This fixes #76

@renatolond renatolond requested a review from a team as a code owner November 7, 2022 16:44
Copy link
Member

@ashkulz ashkulz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@renatolond can you specifically add 1.38.0 to this line so that we check this? You'll probably need to add to the excludes as well for Ruby 2.3 and 2.4.

I'm also wondering why I don't get an option to trigger the CI run on this PR 🤔

@renatolond
Copy link
Contributor Author

@renatolond can you specifically add 1.38.0 to this line so that we check this? You'll probably need to add to the excludes as well for Ruby 2.3 and 2.4.

I'm also wondering why I don't get an option to trigger the CI run on this PR thinking

Sure, done!

It's weird about the CI, I already saw the option of "allow run" for new contributors on some of my projects, but not showing at all is odd 🤔

@ashkulz
Copy link
Member

ashkulz commented Nov 8, 2022

@renatolond can you do a rebase or something? I triggered a run manually, apparently scheduled actions got suspended on this repo, which were supposed to inform me about regressions -- another fun thing to research 🙈

@renatolond
Copy link
Contributor Author

@ashkulz Sure, done! :)

Copy link
Member

@ashkulz ashkulz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's a typo, @renatolond 🙂

lib/pronto/rubocop/patch_cop.rb Outdated Show resolved Hide resolved
@ashkulz ashkulz merged commit e374c32 into prontolabs:master Nov 9, 2022
@ashkulz
Copy link
Member

ashkulz commented Nov 9, 2022

Thanks for the contribution, @renatolond! I'll push up a release by EOD.

@renatolond
Copy link
Contributor Author

Thanks for the contribution, @renatolond! I'll push up a release by EOD.

Thank you, @ashkulz 🎉

@renatolond renatolond deleted the fix_cops_for_1.38.x branch November 9, 2022 07:31
@ashkulz
Copy link
Member

ashkulz commented Nov 9, 2022

Released to RubyGems: https://rubygems.org/gems/pronto-rubocop/versions/0.11.3

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

Successfully merging this pull request may close these issues.

Pronto raises cop errors since rubocop v1.38.0
2 participants