Skip to content

Intended behaviour of namespace_imports for object_name_linter? #642

@AshesITR

Description

@AshesITR

I think the namespace one is actually a legit bug. namespace_imports is only called here:

https://github.com/jimhester/lintr/blob/fa05ceb2bf967ddad9230e25879b95084c80b0dc/R/object_name_linters.R#L57

without an argument. the default is to run find_package() (again without argument), but there's no default, so normalizePath always fails:

https://github.com/jimhester/lintr/blob/fa05ceb2bf967ddad9230e25879b95084c80b0dc/R/lint.R#L287

In namespace_imports this error happens within tryCatch so it just returns NULL.

I'm not sure the intended behavior but certainly the above is not it 😃

Originally posted by @MichaelChirico in #639 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions