Skip to content

SONARPY-775 Fix FN on S5797: flow sensitive inference not enabled for nested try/except#827

Merged
guillaume-dequenne merged 2 commits intomasterfrom
SONARPY-775
Aug 10, 2020
Merged

SONARPY-775 Fix FN on S5797: flow sensitive inference not enabled for nested try/except#827
guillaume-dequenne merged 2 commits intomasterfrom
SONARPY-775

Conversation

@guillaume-dequenne
Copy link
Copy Markdown
Contributor

No description provided.

@guillaume-dequenne guillaume-dequenne force-pushed the SONARPY-775 branch 2 times, most recently from 5e28e86 to 69fad5b Compare August 10, 2020 09:01
@guillaume-dequenne guillaume-dequenne marked this pull request as draft August 10, 2020 09:02
@guillaume-dequenne guillaume-dequenne force-pushed the SONARPY-775 branch 3 times, most recently from a813bf7 to 6f13d71 Compare August 10, 2020 13:47
functionDef.accept(new BaseTreeVisitor() {
@Override
public void visitFunctionDef(FunctionDef visited) {
if (functionDef == visited) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that to avoid this condition we can call the visitor on the body like functionDef.body().accept(new BaseTreeVisitor() {}) at line 107


@Override
public void visitFunctionDef(FunctionDef visited) {
if (functionDef == visited) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also here, I think we can call the visitor on the body of the function

@sonarsource-next
Copy link
Copy Markdown

Kudos, SonarQube Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@guillaume-dequenne guillaume-dequenne merged commit a8e735d into master Aug 10, 2020
@guillaume-dequenne guillaume-dequenne deleted the SONARPY-775 branch August 10, 2020 15:25
hashicorp-vault-sonar-prod Bot pushed a commit that referenced this pull request Feb 3, 2026
GitOrigin-RevId: b12a8338b5faa6b2658c86f5f028dc3c09920f1e
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