inbo / checklist

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

error message doesn't reveal problem, only solution #77

Closed ElsLommelen closed 5 months ago

ElsLommelen commented 2 years ago

[Here](https://github.com/inbo/inbodb/pull/35#:~:text=check%20package%3A%20locally%20I%20don%27t%20get%20the%20error%20that%20suggests%20to%20run%20devtools%3A%3Adocument().%20Running%20devtools%3A%3Adocument()%20locally%20(with%20roxygen2%207.1.2%20installed)%20rewrites%20the%20NAMESPACE%20file%2C%20but%20apparently%20without%20any%20changes%2C%20as%20the%20file%20does%20not%20appear%20in%20the%20git%20window%20(also%20not%20after%20refreshing)) I describe an error that is unclear to me: it suggests to run devtools::document() and push an updated version of NAMESPACE, but running this command locally doesn't generate a new version of the NAMESPACE file. And the logging doesn't give the slightest hint on what has been tested, and what could be wrong there.

I like the fact that checklist errors always explain clearly what has to be done, and mostly this works fine. But in the few cases where it doesn't (often due to a different behaviour in different OS), I think it is a drawback that even in the logging it is unclear what causes the error. Would it be a possibility that for instance in this case, the differences between the NAMESPACE files, or even just both versions of the file, could be added to the logging? And more generally: could some more outputs be generated in the logging for the checklist specific tests?

ThierryO commented 2 years ago

Would adding a git diff to the error message a solution?

ElsLommelen commented 2 years ago

Yes, sounds like a perfect solution.