8000 Fix FPs in S5994 and S6002 by Swalkyn · Pull Request #269 · SonarSource/sonar-analyzer-commons · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix FPs in S5994 and S6002 #269

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 GitH 8000 ub”, 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

Merged

Conversation

Swalkyn
Copy link
Contributor
@Swalkyn Swalkyn commented Oct 28, 2022

PR #257 added support for lookahead and possessive quantifiers inside of repetitions by excluding nodes on the same branch from being traversed. This correctly prevented from exploring nodes that would lead back to the lookahead/possessive quantifier under analysis. However, this original solution was mistakenly excluding valid nodes, that came after the lookahead/quantifier.

This fix reduces the set of excluded node from a whole branch to only the part of the branch up to the lookahead/pos. quantifier itself.

PR #257 added support for lookahead and possessive quantifiers inside of
repetitions by excluding nodes on the same branch from being traversed.
This correctly prevented from exploring nodes that would lead back to
the lookahead/possessive quantifier under analysis. However, this
original solution was mistakenly excluding valid nodes, that came after
the lookahead/quantifier.

This fix reduces the set of excluded node from a whole branch to only
the part of the branch up to the lookahead/pos. quantifier itself.
@Swalkyn Swalkyn requested a review from alban-auzeill October 28, 2022 14:09
@sonarsource-next
Copy link

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dorian-burihabwa-sonarsource dorian-burihabwa-sonarsource deleted the fix-subautomaton-branch-exclusion branch October 31, 2022 14:03
nils-werner-sonarsource added a commit to SonarSource/sonar-python that referenced this pull request Nov 2, 2022
andreaguarino pushed a commit to SonarSource/sonar-python that referenced this pull request Nov 2, 2022
* FP was removed due to SonarSource/sonar-analyzer-commons#269

* FP from extended ruling was removed as well
nils-werner-sonarsource added a commit to SonarSource/sonar-php that referenced this pull request Nov 3, 2022
nils-werner-sonarsource added a commit to SonarSource/sonar-php that referenced this pull request Nov 3, 2022
nils-werner-sonarsource added a commit to SonarSource/sonar-php that referenced this pull request Dec 7, 2022
mstachniuk pushed a commit to SonarSource/sonar-php that referenced this pull request Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0