inbo / checklist

An R package for checking R packages and R code
https://inbo.github.io/checklist
GNU General Public License v3.0
16 stars 2 forks source link

check_lintr how to deal with renv folder in some arbitray subfolder #118

Closed hansvancalster closed 7 months ago

hansvancalster commented 7 months ago

Problem:

check_lintr() calls https://github.com/inbo/checklist/blob/3413f5fec507f8039063f7573fabc0e1bc20adab/R/check_lintr.R#L21C16-L21C16 which forces the function to use the hard coded linter options which are delivered with the checklist package. These lintr options include exclusion of lintr checks for folders renv and packrat directly beneath the root of the project.

We have a git version controlled repository (created with checklist::create_project) where we want renv package management only for code belonging to a specific analysis pipeline created with the targetspackage. We would therefore need a way to tell checklist::check_lintr() to exclude that renv folder, which is in our case in a subfolder like so: source/targets/pipeline1/renv.

Possible solutions?

I think the last approach is the best for this particular problem.

tagging @EmmaCartuyvels1 and @wlangera so they can follow along.

ThierryO commented 7 months ago

Please check this version. Can you confirm the problem is solved?

hansvancalster commented 7 months ago

Thanks! This works.