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

Improve documentation for default_undesirable_functions #1133

Closed
MichaelChirico opened this issue May 11, 2022 · 7 comments
Closed

Improve documentation for default_undesirable_functions #1133

MichaelChirico opened this issue May 11, 2022 · 7 comments
Milestone

Comments

@MichaelChirico
Copy link
Collaborator

Currently I don't see any reasoning behind why the various default undesirables are considered undesirable.

Inspired by this SO Q:

https://stackoverflow.com/questions/65466324/why-are-sapply-and-options-undesirable

@AshesITR
Copy link
Collaborator

We could document those either in the lint itself (e.g. use lapply() or vapply() because they are type-stable.) or document in ?default_undesirable_functions. WDYT?

@MichaelChirico
Copy link
Collaborator Author

I think both would be good. In the lint is better for users, in the docs for developers.

@AshesITR
Copy link
Collaborator

The message is currently hard-coded to be "Function {fun} is undesirable. As an alternative, {explanation}".
So explaining the reasoning in the lints would require refactoring the generated message.
Any idea for a good "format" for the new messages?

Maybe simply "Function {fun} is undesirable. {explanation}"?

@MichaelChirico
Copy link
Collaborator Author

It can be similar to our deprecation note, right? old / new / explanation?

@AshesITR
Copy link
Collaborator

That would make the old interface (named character vector) impossible to use for customization.

@MichaelChirico
Copy link
Collaborator Author

right... in that case your suggestion is the best we can do I think. (I always found the old pattern to restrictive anyway)

@AshesITR
Copy link
Collaborator

Fixed in #1149

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

No branches or pull requests

2 participants