r-lib / urlchecker

Run CRAN URL checks from older versions of R
https://urlchecker.r-lib.org/
GNU General Public License v3.0
47 stars 4 forks source link

redirects in vignettes not discovered in some cases #2

Closed kevinushey closed 4 years ago

kevinushey commented 4 years ago

E.g. in reticulate I have:

https://github.com/rstudio/reticulate/blob/0196df93091ff0d75b6823aba47b286cce604e23/vignettes/arrays.Rmd#L98

which redirects as:

https://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html -> https://numpy.org/doc/stable/reference/arrays.ndarray.html

but url_check() does not report it.

jimhester commented 4 years ago

Yeah, I guess the code pulled from R CMD check is meant for a built package so only checks the rendered HTML files, not the Rmd, so misses it in a unrendered Rmd.

jimhester commented 4 years ago

Ok I added some code to query un-rendered Rmd vignettes for URLs as well

kevinushey commented 4 years ago

Thank you! Much appreciated.

> urlchecker::url_update()
✓ Updated: <http://rmarkdown.rstudio.com> to <https://rmarkdown.rstudio.com/> in vignettes/r_markdown.Rmd
✓ Updated: <http://www.numpy.org/> to <https://numpy.org/> in vignettes/calling_python.Rmd
✓ Updated: <http://www.numpy.org/> to <https://numpy.org/> in vignettes/r_markdown.Rmd