Skip to content

Fix Rubocop deprecated method warnings#91

Merged
ashkulz merged 3 commits intoprontolabs:masterfrom
ramil350:fix-rubocop-deprecated-method-warnings
Aug 20, 2024
Merged

Fix Rubocop deprecated method warnings#91
ashkulz merged 3 commits intoprontolabs:masterfrom
ramil350:fix-rubocop-deprecated-method-warnings

Conversation

@ramil350
Copy link
Copy Markdown
Contributor

Fix Rubocop deprecated method warnings:

  • pronto-rubocop-0.11.5/lib/pronto/rubocop/patch_cop.rb:34: warning: Cop.all is deprecated. Use Registry.all instead.
  • pronto-rubocop-0.11.5/lib/pronto/rubocop/patch_cop.rb:62: warning: inspect_file is deprecated. Use investigate instead.

@ramil350 ramil350 requested a review from a team as a code owner August 14, 2024 12:23
@ashkulz
Copy link
Copy Markdown
Member

ashkulz commented Aug 19, 2024

Closing and reopening so that CI is run.

@ashkulz ashkulz closed this Aug 19, 2024
@ashkulz ashkulz reopened this Aug 19, 2024
Copy link
Copy Markdown
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.

@ramil350 can you use respond_to? to decide if the new aliases should be called, as this change breaks compatibility with older Rubocop versions (which may be used with older Ruby versions).

* `Cop.all` is deprecated. Use `Registry.all` instead.
* `inspect_file` is deprecated. Use `investigate` instead.
@ramil350 ramil350 force-pushed the fix-rubocop-deprecated-method-warnings branch from 44bdd26 to 15eabe3 Compare August 19, 2024 08:33
@ramil350
Copy link
Copy Markdown
Contributor Author

@ashkulz I have made updates to check if new aliases are defined to support older Rubocop versions. Please take a look.

@ashkulz
Copy link
Copy Markdown
Member

ashkulz commented Aug 19, 2024

@ramil350 tests are still failing.

@ramil350
Copy link
Copy Markdown
Contributor Author

@ashkulz Yeah, sorry. I can only run rspec locally for current version, which passed. Cannot check the whole workflow on my own. I see where the issue likely is, and pushed one more update.

Comment thread lib/pronto/rubocop/patch_cop.rb Outdated
@ashkulz ashkulz merged commit 8233606 into prontolabs:master Aug 20, 2024
@ashkulz
Copy link
Copy Markdown
Member

ashkulz commented Aug 20, 2024

Thanks for the contribution, @ramil350!

@ibrahima
Copy link
Copy Markdown

ibrahima commented Jan 8, 2025

If possible, it would be great to have a release with this fixed to silence the warnings. Thanks!

@andriusm
Copy link
Copy Markdown

Yes, would be great to get a new version released with this improvement.

@ashkulz 🙇

@ashkulz
Copy link
Copy Markdown
Member

ashkulz commented Jan 11, 2025

0.11.6 has been released to RubyGems. Publishing future versions should be simpler due to implementation of Trusted Publishing workflow (4f2d0f5) 😁

@ibrahima
Copy link
Copy Markdown

Wow thank you!

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.

4 participants