-
Notifications
You must be signed in to change notification settings - Fork 186
Fix some regex-based linters getting spurious matches #620
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
Conversation
Tests added to ensure paren-brace linter, equals-NA linter and no-tab linter do not flag lints in irrelevant sections of code (eg, strings / comments).
This can check if a regex-match is covered by an expression in a source_file and restrict analysis to tokens of a particular type, if required.
Also, rename file containing equals_na_linter to match format of other linter-files (`*_linter.R` not `*_lintr.R`)
…ntr into regex-based-linter-issue-441
2e5a03d
to
2cc47ec
Compare
For now I'll leave this as is on the assumption that #546 would be merged first. After that, I would keep the tests for |
The same issue as #546 (about the XML tree being missing when there's a syntax error) was hitting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…intr into regex-based-linter-issue-441
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for resurrecting this PR!
Closes #441
Forked from #467 -- re-filing with the base branch on the main repo (cc @russHyde)