ropensci-review-tools / goodpractice

Advice on R Package Building
https://docs.ropensci.org/goodpractice/
Other
463 stars 36 forks source link

'lintr::expect_lint_free()' fails when run by goodpractice #139

Closed richelbilderbeek closed 4 months ago

richelbilderbeek commented 4 years ago

goodpractice is right, but I am having trouble getting a clean result of goodpractice.

If I have a minimal package with only this test:

test_that("Package style", {
  lintr::expect_lint_free()
})

Building on Travis CI passes fine.

However, when Travis script runs the next line, with the command goodpractice::gp(), I get this log error message:

It is good practice to

  ✖ checking tests ... Running ‘testthat.R’ ERROR Running the tests in

    ‘tests/testthat.R’ failed. Last 13 lines of output: >
    test_check("galb") ── 1. Error: Package style (@test-style.R#2)
    ────────────────────────────────── invalid 'path' argument
    Backtrace: 1. lintr::expect_lint_free() 2. lintr::lint_package(...)
    3. base::normalizePath(path, mustWork = FALSE) 4.
    base::path.expand(path) ══ testthat results
    ═══════════════════════════════════════════════════════════ [ OK: 0
    | SKIPPED: 0 | WARNINGS: 0 | FAILED: 1 ] 1. Error: Package style
    (@test-style.R#2) Error: testthat unit tests failed Execution
    halted

I expect the goodpractice::gp() test to work on Travis. When I run it locally, it also just works.

I hope you enjoy my thorough bug report and I hope I can wish you good luck to fix this :+1:

mpadge commented 4 months ago

rOpenSci has now taken over maintenance of this package, as part of which we're cleaning out old issues. I'll presume the issue you describe is no longer relevant, and will close for now. Please feel free to re-open or comment further if that's not the case. Thanks for the input.