-
Notifications
You must be signed in to change notification settings - Fork 227
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
Refactor: Extract common method to check if any ancestor belongs to SyntaxKind #9202
Refactor: Extract common method to check if any ancestor belongs to SyntaxKind #9202
Conversation
Quality Gate passedIssues Measures |
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
9600f69
to
5ffc777
Compare
5ffc777
to
67f9cda
Compare
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.
Some cleanup
analyzers/src/SonarAnalyzer.CSharp/Helpers/CSharpSyntaxHelper.cs
Outdated
Show resolved
Hide resolved
analyzers/src/SonarAnalyzer.CSharp/Helpers/CSharpSyntaxHelper.cs
Outdated
Show resolved
Hide resolved
analyzers/src/SonarAnalyzer.VisualBasic/Helpers/VisualBasicSyntaxHelper.cs
Show resolved
Hide resolved
@pavel-mikula-sonarsource there are two more codesmells regarding the |
2dcb177
to
0a31d21
Compare
Quality Gate passed for 'Sonar .NET Java Plugin'Issues Measures |
Quality Gate failed for 'SonarAnalyzer for .NET'Failed conditions |
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
@@ -85,7 +85,7 @@ public override void Visit(SyntaxNode node) | |||
public override void VisitIdentifierName(IdentifierNameSyntax node) => | |||
DereferencesMethodArguments |= | |||
argumentNames.Contains(node.GetName()) | |||
&& node.HasAncestorOfKind(AwaitExpression, | |||
&& node.HasAncestor(AwaitExpression, |
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.
&& node.HasAncestor(AwaitExpression, | |
&& node.HasAncestor( | |
AwaitExpression, |
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.
You can fix this in your next PR, I'll merge this one now as I need to nuke the whole helper file
No description provided.