# \donttest{
pkg_name <- "foo"
res_check <- list(
notes = c("'foo' import not declared from: 'bar'",
"Namespace in Imports field not imported from: 'baz'",
"no visible global function definition for 'qux'",
"some harmless note"),
warnings = character(0),
errors = character(0)
)
updated <- check_forbidden_notes(res_check, pkg_name)
print(updated$errors) # Should include the first three notes
print(updated$notes) # Should include only the harmless note
# }
Run the code above in your browser using DataLab