-
Notifications
You must be signed in to change notification settings - Fork 222
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
Fix styling issues on new code #9220
Conversation
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. I found two more whitespace violations that you might want to fix while you're at it.
node.Ancestors().Any(x => x.IsAnyKind(SyntaxKind.IfStatement, | ||
SyntaxKind.SwitchStatement, | ||
SyntaxKindEx.SwitchExpression, | ||
SyntaxKind.ConditionalExpression, | ||
SyntaxKindEx.CoalesceAssignmentExpression)); |
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.Ancestors().Any(x => x.IsAnyKind(SyntaxKind.IfStatement, | |
SyntaxKind.SwitchStatement, | |
SyntaxKindEx.SwitchExpression, | |
SyntaxKind.ConditionalExpression, | |
SyntaxKindEx.CoalesceAssignmentExpression)); | |
node.Ancestors().Any(x => x.IsAnyKind( | |
SyntaxKind.IfStatement, | |
SyntaxKind.SwitchStatement, | |
SyntaxKindEx.SwitchExpression, | |
SyntaxKind.ConditionalExpression, | |
SyntaxKindEx.CoalesceAssignmentExpression)); |
private static bool IsAssignedToStaticFieldOrProperty(SonarSyntaxNodeReportingContext context) => | ||
context.Node.Parent.WalkUpParentheses() is AssignmentExpressionSyntax assignment | ||
&& context.SemanticModel.GetSymbolInfo(assignment.Left, context.Cancel).Symbol is { IsStatic: true, Kind: SymbolKind.Field or SymbolKind.Property }; |
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.
private static bool IsAssignedToStaticFieldOrProperty(SonarSyntaxNodeReportingContext context) => | |
context.Node.Parent.WalkUpParentheses() is AssignmentExpressionSyntax assignment | |
&& context.SemanticModel.GetSymbolInfo(assignment.Left, context.Cancel).Symbol is { IsStatic: true, Kind: SymbolKind.Field or SymbolKind.Property }; | |
private static bool IsAssignedToStaticFieldOrProperty(SonarSyntaxNodeReportingContext context) => | |
context.Node.Parent.WalkUpParentheses() is AssignmentExpressionSyntax assignment | |
&& context.SemanticModel.GetSymbolInfo(assignment.Left, context.Cancel).Symbol is { IsStatic: true, Kind: SymbolKind.Field or SymbolKind.Property }; |
Quality Gate passed for 'Sonar .NET Java Plugin'Issues Measures |
Quality Gate passed for 'SonarAnalyzer for .NET'Issues Measures |
Cleanup after #9207