lintr
lintr copied to clipboard
Is it possible to avoid repetition across code and docs for undesirable linters?
Currently, we are repeating the same text twice:
Once in docs-
https://github.com/r-lib/lintr/blob/1a567f09cee74f5eb264a19dfde78f68d8e82278/R/zzz.R#L51
The other time in code-
https://github.com/r-lib/lintr/blob/1a567f09cee74f5eb264a19dfde78f68d8e82278/R/zzz.R#L101-L102
This means that we run the risk of forgetting to update one if the other is updated.
Can we think of a way to avoid this repetition?
Not completely sure yet, but there might be a hint about a possible approach in this PR.
Maybe a helper like rd_tags() can be written that would auto generate the roxygen docs from all_undesirable_functions.