Thanks to visit codestin.com
Credit goes to github.com

Skip to content

object_name_linter() complains about ns-hooks (e.g. .onLoad) #500

@salim-b

Description

@salim-b

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions