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

consecutive_assertion_linter() gives false positive when interceded by '=' assignment #2444

Closed
MichaelChirico opened this issue Dec 14, 2023 · 0 comments · Fixed by #2454
Closed
Labels
false-positive code that shouldn't lint, but does
Milestone

Comments

@MichaelChirico
Copy link
Collaborator

lint("
stopifnot(a)
b=c
stopifnot(d)
", consecutive_assertion_linter())
# <text>:2:1: warning: [consecutive_assertion_linter] Unify consecutive calls to stopifnot().
# stopifnot(a)
# ^~~~~~~~~~~~

Almost surely this is because of the weird <expr_or_assign_or_help> node that is usually <expr>.

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