Skip to content
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

Is it possible to avoid repetition across code and docs for undesirable linters? #1464

Closed
IndrajeetPatil opened this issue Jul 21, 2022 · 2 comments · Fixed by #2373
Closed
Labels
documentation internals Issues related to inner workings of lintr, i.e., not user-visible

Comments

@IndrajeetPatil
Copy link
Collaborator

Currently, we are repeating the same text twice:

Once in docs-

lintr/R/zzz.R

Line 51 in 1a567f0

#' * [attach()] modifies the global search path. Use roxygen2's @importFrom statement in packages, or `::` in scripts.

The other time in code-

lintr/R/zzz.R

Lines 101 to 102 in 1a567f0

"attach" = paste("It modifies the global search path. Use roxygen2's @importFrom statement in packages,",
"or `::` in scripts."),

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?

@IndrajeetPatil
Copy link
Collaborator Author

Not completely sure yet, but there might be a hint about a possible approach in this PR.

@AshesITR
Copy link
Collaborator

Maybe a helper like rd_tags() can be written that would auto generate the roxygen docs from all_undesirable_functions.

@MichaelChirico MichaelChirico added the internals Issues related to inner workings of lintr, i.e., not user-visible label Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation internals Issues related to inner workings of lintr, i.e., not user-visible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants