Skip to content

fixed_regex_linter() throws false positives for piped-in stringr calls #1811

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
MichaelChirico opened this issue Dec 7, 2022 · 0 comments · Fixed by #2094
Closed

fixed_regex_linter() throws false positives for piped-in stringr calls #1811

MichaelChirico opened this issue Dec 7, 2022 · 0 comments · Fixed by #2094
Labels
false-positive code that shouldn't lint, but does
Milestone

Comments

@MichaelChirico
Copy link
Collaborator

x %>%
  str_replace(fixed("abc"), "cde")

Since our logic currently uses the argument number and doesn't account for whether the call is piped-in, it sees cde as being "fixed" and hence throws a lint.

@MichaelChirico MichaelChirico added the false-positive code that shouldn't lint, but does label Dec 7, 2022
@MichaelChirico MichaelChirico added this to the 3.1.1 milestone Aug 22, 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant