-
Notifications
You must be signed in to change notification settings - Fork 195
Description
There are a number of linters it would be nice to write regarding roxygen2 documentation, e.g. ensuring @param entries are in sync with the declaration (of course @inheritParams makes this hard to to completely, but certainly @param X should only happen when X is indeed a parameter.
We could also apply the rest of the lint suite directly to code in @examples.
Parsing the roxygen markup is easy enough: roxygen2::parse_file(). The key will be integrating this result with our existing data structure from get_source_expressions(), which I don't see a super clean way to do while also ensuring we keep the link between which doc entry corresponds to which source expression.
As a reminder, the current structure is laid out here: https://lintr.r-lib.org/reference/get_source_expressions.html#value.
We also likely want to keep the data structure back-compatible unless we want this to become a version 4.0.0 thing.
So filing this issue first for design discussion.