Skip to content

Commit

Permalink
Update rspec scaffolding script after the SonarAnalysisContext refact…
Browse files Browse the repository at this point in the history
…oring and implicit namespaces (#6668)
  • Loading branch information
gregory-paidis-sonarsource committed Jan 24, 2023
1 parent 71ccb2b commit 1168a47
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
5 changes: 0 additions & 5 deletions scripts/rspec/rspec-templates/Rule.Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

using System.Collections.Immutable;
using Microsoft.CodeAnalysis;
using SonarAnalyzer.Common;
using SonarAnalyzer.Helpers;

namespace SonarAnalyzer.Rules;

public abstract class $DiagnosticClassName$Base<TSyntaxKind> : SonarDiagnosticAnalyzer<TSyntaxKind>
Expand Down
11 changes: 1 addition & 10 deletions scripts/rspec/rspec-templates/Rule.CS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
using SonarAnalyzer.Common;
using SonarAnalyzer.Helpers;

namespace SonarAnalyzer.Rules.CSharp;

[DiagnosticAnalyzer(LanguageNames.CSharp)]
Expand All @@ -40,7 +31,7 @@ public sealed class $DiagnosticClassName$ : SonarDiagnosticAnalyzer
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);

protected override void Initialize(SonarAnalysisContext context) =>
context.RegisterSyntaxNodeActionInNonGenerated(c =>
context.RegisterNodeAction(c =>
{
var node = c.Node;
if (true)
Expand Down
11 changes: 1 addition & 10 deletions scripts/rspec/rspec-templates/Rule.VB.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.VisualBasic;
using Microsoft.CodeAnalysis.VisualBasic.Syntax;
using SonarAnalyzer.Common;
using SonarAnalyzer.Helpers;

namespace SonarAnalyzer.Rules.VisualBasic;

[DiagnosticAnalyzer(LanguageNames.VisualBasic)]
Expand All @@ -40,7 +31,7 @@ public sealed class $DiagnosticClassName$ : SonarDiagnosticAnalyzer
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);

protected override void Initialize(SonarAnalysisContext context) =>
context.RegisterSyntaxNodeActionInNonGenerated(c =>
context.RegisterNodeAction(c =>
{
var node = c.Node;
if (true)
Expand Down

0 comments on commit 1168a47

Please sign in to comment.