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_filename() only shows errors on Github #57

Closed ElsLommelen closed 3 years ago

ElsLommelen commented 3 years ago

When running check_package() or check_filename() locally, I don't get any errors related to filenames, while the Github action check package (inbo/actions/check_pkg@master) gives several errors concerning filenames (due to use of uppercase,...). Locally the following note is added to the output of check_filename() (I'm not sure it has something to do with the problem, but I don't see anything else that could be relevant to solve the problem):

...
[1] C:/R/Library
[2] C:/R/R-4.1.0/library

P -- Loaded and on-disk path mismatch
hansvancalster commented 3 years ago

Probably due to differences in OS handling of case-sensitivity in folder and filenaming? Windows is case-insensitive, while ubuntu is case-sensitive.

ElsLommelen commented 3 years ago

Ah, yes indeed, all errors are due to the use of uppercase (or - vs _).

Is there maybe any possibility to check it locally as well? The default in Windows is indeed case-insensitivity, but in a lot of R functions it is possible to choose for case-sensitivity. It would be helpful to not have to push commits and wait for the checks to find out this type of problems. Also, in case of for instance a warning on the use of - instead of _: how to ignore these using write_checklist() if these warnings do not show up locally?

ThierryO commented 3 years ago

Do you get uppercase names when you run the code below in your git repo?

library(git2r)
repo <- repository()
ls_tree(repo = repo, recursive = TRUE)
ThierryO commented 3 years ago

Can you check list.files(".", recursive = TRUE, all.files = TRUE) too?

ElsLommelen commented 3 years ago

Yes, I get uppercase names in both cases.

ThierryO commented 3 years ago

A few more things to check:

If those things work as I expected them to work, then please run debug(check_filename) and check_filename(). And try to see where things go wrong.

ElsLommelen commented 3 years ago

Ok, it seems to work fine now: I get the same errors locally and on github.