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

Updates for rubocop deprecations #85

Merged
merged 2 commits into from
Oct 30, 2024
Merged

Conversation

donk-shopify
Copy link
Contributor

https://docs.rubocop.org/rubocop/v1_upgrade_notes.html

This is causing warnings in rubocop runs in repositories that use this gem.

Rubocop deprecates the use of Cop as a base
class (https://docs.rubocop.org/rubocop/v1_upgrade_notes.html). This leads to warnings in projects
that use the smart_todo gem.
Replacing the deprecated Cop base class with Cop::Base means that we need to avoid
investigate. Following the example of comment processing Cops including with rubocop, we should
instead use on_new_investigation.

The expect_offense test helper also needed reworking. Cop::Base doesn't allow access to the offenses
detected. Those should come from the InvestigationReport from the Commissioner instance that invokes
the investigation (via Commissioner::investigate).
@donk-shopify donk-shopify force-pushed the donk/checks/rubocop_1 branch from 96b0f8e to 3c3f962 Compare October 30, 2024 01:52
Copy link
Contributor

@Morriar Morriar left a comment

Choose a reason for hiding this comment

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

(we generally do the gem bump/release outside of the code change PR)

@donk-shopify
Copy link
Contributor Author

(we generally do the gem bump/release outside of the code change PR)

Oh, so do I normally. I was getting lazy. I'll fix that before merging.

@donk-shopify donk-shopify force-pushed the donk/checks/rubocop_1 branch from 3c3f962 to 45186bc Compare October 30, 2024 15:12
@donk-shopify donk-shopify merged commit aaad6ca into main Oct 30, 2024
7 checks passed
@donk-shopify donk-shopify deleted the donk/checks/rubocop_1 branch October 30, 2024 15:14
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.

2 participants