-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Style test_that()
calls to always contain code in braced expressions?
#1154
Comments
Thanks. We can think about that. How does {lintr} handle it? |
IIRC no lint currently, but it should lint. |
There isn't currently a linter for this in But, TBH, I don't think EDIT: Michael and I posted almost at the same time 🙈 |
testthat's diagnosis happens at run time, having these things reported at compile time by static analysis is also helpful:
|
That's a good point! We should also track this in |
I agree we could add a linter for this. See also |
This would require |
Preamble
In recent updates to
{testthat}
, it generates a warning if code is not in a braced expression:Created on 2023-11-07 with reprex v2.0.2
But this is not something currently enforced by
{styler}
, and I am wondering if this is something it ought to support?Actual output
Created on 2023-11-07 with reprex v2.0.2
Expected output
The text was updated successfully, but these errors were encountered: