# will produce lints
lint(
text = "
library(dplyr)
print('test')
library(tidyr)
",
linters = library_call_linter()
)
lint(
text = "
library(dplyr)
print('test')
library(tidyr)
library(purrr)
",
linters = library_call_linter()
)
# okay
lint(
text = "
library(dplyr)
print('test')
",
linters = library_call_linter()
)
lint(
text = "
# comment
library(dplyr)
",
linters = library_call_linter()
)
Run the code above in your browser using DataLab