Skip to content

object_usage_linter() metadata wrong for 'unused argument' lint with pipe #1936

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

Open
MichaelChirico opened this issue Mar 26, 2023 · 1 comment

Comments

@MichaelChirico
Copy link
Collaborator

MichaelChirico commented Mar 26, 2023

lintr::lint(
  text = "foo <- function(x) {\n  x |>\n    exp(xxx = 'days'\n  )\n}",
  linters = lintr::object_usage_linter()
)
# <text>:2:3: warning: [object_usage_linter] unused argument (xxx = "days").
#   x |>
#   ^~~~

Should be related to #1497

@MichaelChirico
Copy link
Collaborator Author

In the meantime round() has gained ... so this doesn't quite reproduce :)

Replaced the reprex with a different base function that doesn't use ... nor have xxx in the signature.

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

1 participant