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

T and TRUE / F and FALSE #3

Closed
lorenzwalthert opened this issue Mar 22, 2017 · 1 comment
Closed

T and TRUE / F and FALSE #3

lorenzwalthert opened this issue Mar 22, 2017 · 1 comment

Comments

@lorenzwalthert
Copy link
Collaborator

The Introduction to R states in section 2.4 that you should not use the abbreviations T and F for TRUE and FALSE since T and F are just variables that are set to TRUE and FALSE by default but can be overwritten by the user.

The tidyverse style guide, does not explicitly discourage the use of T and F, but always uses TRUE and FALSE as the logical values.

As of 00f0d96, styler does not convert the values T and F to TRUE and FALSE. Since T and F might have been assigned other values than the default, such a conversion would be highly problematic.
On the other hand, currently, T and F are just left as is, without message to the user, which is probably also not the thing we would expect from styler.

To conclude, checking for the usage of T and F and return a warning might be a reasonable way to go, so the user can resolve the problem manually.

@lorenzwalthert
Copy link
Collaborator Author

lorenzwalthert commented Jan 14, 2020

As of v1.2.0, styler does not emit a warning and leaves this to https://github.com/jimhester/lintr.

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

1 participant