true_false_symbol
What it does
Checks for usage of T and F symbols. If they correspond to the TRUE and FALSE values, then replace them by that. If they correspond to something else, such as an object or a variable name, then no automatic fixes are applied.
Why is this bad?
T and F are not reserved symbols (like break) and therefore can be used as variable names. Therefore, it is better for readability to replace them by TRUE and FALSE.
It is also recommended to rename objects or parameters named F and T to avoid confusion.
Configuration options
The operation of the true_false_symbol rule can be customised in the configuration file.
Use skipped-functions to list functions whose arguments are allowed to contain the T and F symbols.
Function names in skipped-functions also match namespaced calls, e.g. skipped-functions = ["foo"] will ignore foo(T) and pkg::foo(T).
Default values
skipped-functions = []TOML settings
[lint]
...
[lint.true_false_symbol]
skipped-functions = ["foo"]Example
x <- T
y <- FUse instead:
x <- TRUE
y <- FALSE