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

ConditionEvaluatesToConstant: SyntaxWalker re-factoring #8215

Conversation

martin-strecker-sonarsource
Copy link
Contributor

See also #8103

This PR fixes the params array allocation caused by IsAnyKind and reactors the SyntaxWalker to do the SyntaxKind checks in the dedicated Visit... methods. That way the number of comparisons is reduced.

@martin-strecker-sonarsource martin-strecker-sonarsource force-pushed the Martin/ConditionEvaluatesToConstant_SyntaxWalker branch from 29aff2a to 4ef6d8b Compare October 19, 2023 15:53
@martin-strecker-sonarsource martin-strecker-sonarsource marked this pull request as ready for review October 26, 2023 11:11
@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Oct 26, 2023
Copy link
Contributor

@pavel-mikula-sonarsource pavel-mikula-sonarsource left a comment

Choose a reason for hiding this comment

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

Code looks good, UTs needs some polishing

@github-actions github-actions bot moved this from Review in progress to In progress in Best Kanban Nov 3, 2023
Copy link

sonarcloud bot commented Nov 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link

sonarcloud bot commented Nov 3, 2023

Kudos, SonarCloud Quality Gate passed!    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

Copy link
Contributor

@pavel-mikula-sonarsource pavel-mikula-sonarsource left a comment

Choose a reason for hiding this comment

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

LGTM

}

[DataTestMethod]
[DataRow("""Dim x = 1 And 2""")]
Copy link
Contributor

Choose a reason for hiding this comment

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

The """ could be simplified to " (except one)

Comment on lines +75 to +76
Dim x = From y in New Integer() { }
Where True
Copy link
Contributor

Choose a reason for hiding this comment

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

This can go on a single line, without :

Suggested change
Dim x = From y in New Integer() { }
Where True
Dim x = From y in New Integer() { } Where True

@github-actions github-actions bot moved this from Review in progress to Review approved in Best Kanban Nov 3, 2023
@martin-strecker-sonarsource martin-strecker-sonarsource merged commit 458feb1 into master Nov 16, 2023
33 checks passed
Best Kanban automation moved this from Review approved to Validate Peach Nov 16, 2023
@martin-strecker-sonarsource martin-strecker-sonarsource deleted the Martin/ConditionEvaluatesToConstant_SyntaxWalker branch November 16, 2023 16:01
@martin-strecker-sonarsource martin-strecker-sonarsource moved this from Validate Peach to Done in Best Kanban Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Best Kanban
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants