Skip to content

Create tests for completeness of documentation #916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AshesITR opened this issue Mar 6, 2022 · 2 comments · Fixed by #1023
Closed

Create tests for completeness of documentation #916

AshesITR opened this issue Mar 6, 2022 · 2 comments · Fixed by #1023

Comments

@AshesITR
Copy link
Collaborator

AshesITR commented Mar 6, 2022

From https://github.com/AshesITR/lintr/pull/2#discussion_r820162915

do we have a CRAN release script? we should add something that ensures this list is complete before release in case new tags are added

Yeah I thought about the possibility to add a test case, but wasn't sure if testthat would be able to reliably inspect the current package help index.

We should also check that all tags have at least one linter, that all tags listed in available_linters() are in fact documented, that all linters listed in available_linters() are exported (and documented) and all exported functions ending in _linter are in available_linters().

Even better would be to check for the Tags & Linters sections where appropriate, to ensure newly created linters have all the necessary boilerplate.

@jimhester
Copy link
Member

jimhester commented Mar 8, 2022

I would suggest using usethis::use_release_issue() for tracking any extra tasks needed for a release.

You can add custom tasks by defining a release_bullets() function in the package namespace.

e.g. here is the one for usethis itself https://github.com/r-lib/usethis/blob/2402ea8e4eb098b5fd18770174fa86ae1a803658/R/usethis-package.R#L13-L17

The only minor gotcha with this approach is you have to have loaded the dev package before you run use_release_issue(), otherwise the extra bullets won't be found.

@AshesITR
Copy link
Collaborator Author

Will this gotcha apply for every release or just those with a modified release_bullets()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants