Reprex:
example_file <- tempfile()
readr::write_file(".onLoad <- function(libname, pkgname) {\n # some action\n}\n",
path = example_file)
lintr::lint(filename = example_file, linters = lintr::object_name_linter())
R's hooks for namespace events are CamelCase and you can't change that AFAIK, so lintr complaining about
Variable and function name style should be snake_case.
is pointless.