-
Notifications
You must be signed in to change notification settings - Fork 186
paren_brace_linter
false positive within regex strings: "(match_group){quantifier}"
#441
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
Comments
grepl("(iss){2}", "Mississippi") |
This seems to be a more general issue with using regex-based linters. For example, the following throws with
Similarly
|
This can be mitigated by allowing the # nolint comment to specify the linter to be turned off. |
It seems this did not make it into a release: it was fixed on Dec 4, 2020, and there was a 2.0.1 release on Dec 5, 2020: https://github.com/jimhester/lintr/releases/tag/v2.0.1 However, 2.0.1 on CRAN is from Feb 19, 2020: https://cran.r-project.org/web/packages/lintr/index.html |
I believe the commit that was tagged as v2.0.1 came from Feb 2020 (01e57c2). It's simply that the released 2.0.1 version didn't get tagged on github at the time that it was released. (That is, in December 2020 @AshesITR ensured that the CRAN-destined v2.0.1 commit from Feb 2020 was tagged with the git tag "v2.0.1") |
Sounds convincing, but that means there hasn't been a release in over a year. Would you recommend installing from GitHub master rather than from CRAN? |
If having this paren-brace issue solved is necessary, then use the github master. I always use the github master in continuous integration. Locally, I use multiple R environments: using the CRAN-lintr when working on stuff other than lintr. |
paren_brace_linter
flags the "){" within regex definition below:Should
paren_brace_linter
be made more strict - so that it doesn't consider strings?The text was updated successfully, but these errors were encountered: