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

description of allow_file_path= in ?paste_linter is wrong? #2675

Open
MichaelChirico opened this issue Oct 22, 2024 · 1 comment
Open

description of allow_file_path= in ?paste_linter is wrong? #2675

MichaelChirico opened this issue Oct 22, 2024 · 1 comment

Comments

@MichaelChirico
Copy link
Collaborator

lintr/R/paste_linter.R

Lines 26 to 32 in 1db7cc7

#' @param allow_file_path String, one of `"never"`, `"double_slash"`, or `"always"`; `"double_slash"` by default.
#' If `"never"`, usage of `paste()` and `paste0()` to construct file paths is not linted. If `"double_slash"`,
#' strings containing consecutive forward slashes will not lint. The main use case here is for URLs -- "paths" like
#' `"https://"` will not induce lints, since constructing them with `file.path()` might be deemed unnatural.
#' Lastly, if `"always"`, strings with consecutive forward slashes will also lint. Note that `"//"` is never linted
#' when it comes at the beginning or end of the input, to avoid requiring empty inputs like
#' `file.path("", ...)` or `file.path(..., "")`.

Shouldn't "always" and "never" be flipped?

@AshesITR

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants