You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Markers displayed:
When running tests, I expect no lint markers to be displayed in Rstudio (or other IDEs). Simply replacing print(lints) by lints in expectation_lint() fixes this issue.
Bad error message:
This second problem is due to expectation_lint() passing a "msg" containing more than one element to testthat::expect(); the lints variable contains more than one lint. In addition, the name of the linters are supposed to be shown, but since I am using the default linters (using ...), no linter name is shown. Personally, I would drop this information as long as the details of the lints (which contain the linter name) are shown.
In the case where check=NULL, "msg" could be:
paste0("Got ", length(lints), " lints instead of none!\n", paste0(lints, collapse="\n"))
In the case where check="superfluous", "msg" could be:
* do not display markers when check is NULL
* fixed malformed error messages
* more consistent errors messages
* check validity of Lint fields in 'checks'
* return invisible(NULL), just like expect_error()
* doc update
Hi,
I found a few issues with
expectation_lint()
:Markers displayed:
When running tests, I expect no lint markers to be displayed in Rstudio (or other IDEs). Simply replacing
print(lints)
bylints
inexpectation_lint()
fixes this issue.Bad error message:
This second problem is due to
expectation_lint()
passing a "msg" containing more than one element totestthat::expect()
; thelints
variable contains more than one lint. In addition, the name of the linters are supposed to be shown, but since I am using the default linters (using...
), no linter name is shown. Personally, I would drop this information as long as the details of the lints (which contain the linter name) are shown.In the case where
check=NULL
, "msg" could be:In the case where
check="superfluous"
, "msg" could be:That's it! Cheers,
Florent
PS/ The sofware versions used are:
The text was updated successfully, but these errors were encountered: