Skip to content

False positive in function_left_parentheses_linter() #1963

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

Closed
IndrajeetPatil opened this issue Apr 17, 2023 · 1 comment · Fixed by #1982
Closed

False positive in function_left_parentheses_linter() #1963

IndrajeetPatil opened this issue Apr 17, 2023 · 1 comment · Fixed by #1982
Labels
false-positive code that shouldn't lint, but does regression code that used to work, but now doesn't

Comments

@IndrajeetPatil
Copy link
Collaborator

'roxygen2::roc_proc_text(paste(roxygen, collapse = "\n"))[[1L]]$get_section("examples")' -> code

lintr::lint(text = code, linters = lintr::function_left_parentheses_linter())
#> <text>:1:1: style: [function_left_parentheses_linter] Left parenthesis should be on the same line as the function's symbol.
#> roxygen2::roc_proc_text(paste(roxygen, collapse = "
#> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Created on 2023-04-17 with reprex v2.0.2

@lorenzwalthert
Copy link

Also with lines broken (not sure that matters?):

text <- roxygen2::roc_proc_text(
  roxygen2::rd_roclet(),
  paste(roxygen, collapse = "\n")
)[[1L]]$get_section("examples")

@MichaelChirico MichaelChirico added this to the 3.1.0 milestone Apr 17, 2023
@MichaelChirico MichaelChirico added the regression code that used to work, but now doesn't label Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
false-positive code that shouldn't lint, but does regression code that used to work, but now doesn't
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants