# will produce lints
lint(
text = 'data.frame(x = "a")',
linters = strings_as_factors_linter()
)
# okay
lint(
text = 'data.frame(x = "a", stringsAsFactors = TRUE)',
linters = strings_as_factors_linter()
)
lint(
text = 'data.frame(x = "a", stringsAsFactors = FALSE)',
linters = strings_as_factors_linter()
)
lint(
text = "data.frame(x = 1.2)",
linters = strings_as_factors_linter()
)
Run the code above in your browser using DataLab