-
-
Notifications
You must be signed in to change notification settings - Fork 206
Open
Labels
upkeepmaintenance, infrastructure, and similarmaintenance, infrastructure, and similar
Description
Replace occurrences of x != ""' with !nzchar(x) https://github.com/search?q=repo%3Aigraph%2Frigraph+%2F%21%3D+%22%22%2F+path%3A%2F%5ER%5C%2F%2F&type=code
Replace occurrences of x == "" with nzchar(x) https://github.com/search?q=repo%3Aigraph%2Frigraph+%2F%3D%3D+%22%22%2F+path%3A%2F%5ER%5C%2F%2F&type=code
@krlmlr If you agree, is this something you'd assign to Copilot? It seems flir doesn't fix this, it only lints it:
flir::fix_text('x == ""', linters = flir::nzchar_linter())
flir::lint_text('x == ""', linters = flir::nzchar_linter())
#> Original code: x == ""
#> Suggestion: Use !nzchar(x) instead of x == "". Use !nzchar(x, keepNA = TRUE) if missing data is possible. Use !nzchar(as.character(x)) if x may not be a character vector.
#> Rule ID: nzchar-4Created on 2025-11-04 with reprex v2.1.1
Metadata
Metadata
Assignees
Labels
upkeepmaintenance, infrastructure, and similarmaintenance, infrastructure, and similar