From 58d6c9262583610bbab05d359dd3b066ffee7091 Mon Sep 17 00:00:00 2001 From: mary-georgiou-sonarsource Date: Wed, 12 Jun 2024 11:32:22 +0200 Subject: [PATCH] give switch mini facelift --- .../LiveVariableAnalysis/LiveVariableAnalysisBase.cs | 2 +- .../SonarCSharpLiveVariableAnalysis.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/analyzers/src/SonarAnalyzer.CFG/LiveVariableAnalysis/LiveVariableAnalysisBase.cs b/analyzers/src/SonarAnalyzer.CFG/LiveVariableAnalysis/LiveVariableAnalysisBase.cs index 8a09eaee1cc..dbcfd95abf7 100644 --- a/analyzers/src/SonarAnalyzer.CFG/LiveVariableAnalysis/LiveVariableAnalysisBase.cs +++ b/analyzers/src/SonarAnalyzer.CFG/LiveVariableAnalysis/LiveVariableAnalysisBase.cs @@ -44,7 +44,7 @@ protected LiveVariableAnalysisBase(TCfg cfg, ISymbol originalDeclaration, Cancel { Cfg = cfg; this.originalDeclaration = originalDeclaration; - this.Cancel = cancel; + Cancel = cancel; } /// diff --git a/analyzers/src/SonarAnalyzer.CSharp/LiveVariableAnalysis/SonarCSharpLiveVariableAnalysis.cs b/analyzers/src/SonarAnalyzer.CSharp/LiveVariableAnalysis/SonarCSharpLiveVariableAnalysis.cs index c0acba80803..a68d6d676a6 100644 --- a/analyzers/src/SonarAnalyzer.CSharp/LiveVariableAnalysis/SonarCSharpLiveVariableAnalysis.cs +++ b/analyzers/src/SonarAnalyzer.CSharp/LiveVariableAnalysis/SonarCSharpLiveVariableAnalysis.cs @@ -101,10 +101,10 @@ public void ProcessBlock(Block block) ProcessVariableDeclarator((VariableDeclaratorSyntax)instruction); break; - case SyntaxKind.AnonymousMethodExpression: - case SyntaxKind.ParenthesizedLambdaExpression: - case SyntaxKind.SimpleLambdaExpression: - case SyntaxKind.QueryExpression: + case SyntaxKind.AnonymousMethodExpression + or SyntaxKind.ParenthesizedLambdaExpression + or SyntaxKind.SimpleLambdaExpression + or SyntaxKind.QueryExpression: CollectAllCapturedLocal(instruction); break; }