# will produce lints
lint(
text = "int(1)",
linters = literal_coercion_linter()
)
lint(
text = "as.character(NA)",
linters = literal_coercion_linter()
)
lint(
text = "rlang::lgl(1L)",
linters = literal_coercion_linter()
)
# okay
lint(
text = "1L",
linters = literal_coercion_linter()
)
lint(
text = "NA_character_",
linters = literal_coercion_linter()
)
lint(
text = "TRUE",
linters = literal_coercion_linter()
)
Run the code above in your browser using DataLab