r-lib / devtools

Tools to make an R developer's life easier
https://devtools.r-lib.org
Other
2.37k stars 753 forks source link

feature: new note when CRAN links are in non-canonical form #2442

Closed markjrieke closed 2 years ago

markjrieke commented 2 years ago

If copied from a browser, links to packages on CRAN will generate a note during the submission process. E.g., adding the link:

https://cran.r-project.org/web/packages/gapminder/index.html

will generate the note:

Found the following (possibly) invalid URLs: URL: https://cran.r-project.org/web/packages/gapminder/index.html From: (docs with link) Status: 200 Message: OK CRAN URL not in canonical form The canonical URL of the CRAN page for a package is https:://CRAN.R-project.org/package=pkgname

This is pretty easy to fix/reupload, but isn't something that devtools checks for currently. Is this something that could be added to devtools::check() to catch on the front-end? Or somewhere else if there's a better location (maybe a part of the questions that pop-up during devtools::release())?

markjrieke commented 2 years ago

Sorry - despite having used devtools, I wasn't aware that it's split into subpackages! I'll close this issue here & open in the rcmdcheck package instead.