Skip to content

lint_package() and find_package(".") does not work anymore if depth >= 2 #1759

@BenoitLondon

Description

@BenoitLondon

In my package I have a code style test so it calls lint_package() from the tests/testthat folder.
The new logic in find_package fails at finding the root of the package ( I guess from this commit 3009505 )

so If I call lint_package from a deeper level than 2 it fails at finding the package actually...

test_that("check that package has code style", {
        skip_on_covr()
        lints <- lintr::lint_package()
        ....
        }

The above code warns/fails with:

Warning message:
In lintr::lint_package() :
  Didn't find any R package searching upwards from '.'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions