Skip to content

object_usage_linter (and probably others) use namespace of installed package #91

Closed
@krlmlr

Description

@krlmlr

Local changes to the NAMESPACE file are reflected only after package is installed. To reproduce:

pkgname="lintr.namespace.test"
rm -rf $pkgname
Rscript -e "devtools::create('$pkgname')"
Rscript -e "devtools::install('$pkgname')"
echo "a <- function() {" > $pkgname/R/a.R
echo "  llply" >> $pkgname/R/a.R
echo "}" >> $pkgname/R/a.R
echo "importFrom(plyr,llply)" > $pkgname/NAMESPACE

# Uncomment line below to fix error
#Rscript -e "devtools::install('$pkgname')"

Rscript -e "lintr::lint_package('$pkgname')"

An equivalent R script didn't exhibit the same error, so this one might be difficult to test automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorfeaturea feature request or enhancementobject linters 🏀

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions