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

Allow lints on expect* cases using info= #2838

Open
MichaelChirico opened this issue Mar 17, 2025 · 0 comments
Open

Allow lints on expect* cases using info= #2838

MichaelChirico opened this issue Mar 17, 2025 · 0 comments
Labels
good first issue ❤️ good issue for first-time contributors

Comments

@MichaelChirico
Copy link
Collaborator

E.g.

/parent::expr[not(SYMBOL_SUB[text() = 'info'])]

Originally, we excluded those because there's not always a clean equivalent where the recommended replacement lacks an info= argument. This was raised upstream to {testthat} at the time:

r-lib/testthat#1594

After some time, we've reached an understanding that, in such cases as benefit from info=, the better alternative is to use expect() directly to provide info=.

So we can throw lints in those cases, which should probably get custom metadata based on whether info= was provided.

@MichaelChirico MichaelChirico added the good first issue ❤️ good issue for first-time contributors label Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue ❤️ good issue for first-time contributors
Projects
None yet
Development

No branches or pull requests

1 participant