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
That's fine and can be #nolint'd, but still it throws a warning:
l<- lint(text='as.integer("a")', linters= literal_coercion_linter())
# Warning message:# In eval(expr) : NAs introduced by coercion
The resulting lint message still looks right to me:
<text>:1:1: warning: [literal_coercion_linter] Use NA_integer_ instead of as.integer("a"), i.e., use literals directly where possible, instead of coercion.
as.integer("a")
^~~~~~~~~~~~~~~
So IMO we can solve this by just suppressing warnings in eval() here:
Here we intentionally run
as.integer('a')
to pull out the coercion warning message to later match against:https://github.com/Rdatatable/data.table/blob/8c34563c6390d9acb0b4067a9e1d260b57937c24/inst/tests/tests.Rraw#L186
That's fine and can be
#nolint
'd, but still it throws a warning:The resulting lint message still looks right to me:
So IMO we can solve this by just suppressing warnings in
eval()
here:lintr/R/literal_coercion_linter.R
Line 102 in 28166bf
The text was updated successfully, but these errors were encountered: