Skip to content

Commit

Permalink
Explicitly use latest Microsoft.CodeAnalysis.Analyzers per @sharwell
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwilson committed Jun 5, 2024
1 parent 4124038 commit 70f5c6c
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 15 deletions.
1 change: 1 addition & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.24219.2" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="[$(MicrosoftCodeAnalysisVersion)]" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.139">
Expand Down
3 changes: 0 additions & 3 deletions src/xunit.analyzers/Utility/CodeAnalysisExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ public static ImmutableArray<AttributeData> GetAttributesWithInheritance(
this IMethodSymbol method,
ITypeSymbol? attributeUsageType)
{
#pragma warning disable RS1024 // This is correct usage
var result = new Dictionary<INamedTypeSymbol, List<AttributeData>>(SymbolEqualityComparer.Default);
#pragma warning restore RS1024

foreach (var attribute in method.GetAttributes())
if (attribute.AttributeClass is not null)
result.Add(attribute.AttributeClass, attribute);
Expand Down
2 changes: 0 additions & 2 deletions src/xunit.analyzers/X1000/DoNotUseBlockingTaskOperations.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#pragma warning disable RS1024 // Incorrectly triggered by Roslyn 3.11

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
Expand Down
2 changes: 0 additions & 2 deletions src/xunit.analyzers/X1000/EnsureFixturesHaveASource.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#pragma warning disable RS1024 // Incorrectly triggered by Roslyn 3.11

using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
Expand Down
2 changes: 0 additions & 2 deletions src/xunit.analyzers/X1000/TestMethodCannotHaveOverloads.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#pragma warning disable RS1024 // Incorrectly triggered by Roslyn 3.11

using System.Collections.Generic;
using System.Linq;
using Microsoft.CodeAnalysis;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#pragma warning disable RS1024 // Incorrectly triggered by Roslyn 3.11

using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#pragma warning disable RS1024 // Incorrectly triggered by Roslyn 3.11

using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
Expand Down
2 changes: 0 additions & 2 deletions src/xunit.analyzers/X2000/SetEqualityAnalyzer.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#pragma warning disable RS1024 // Incorrectly triggered by Roslyn 3.11

using System.Collections.Generic;
using System.Linq;
using Microsoft.CodeAnalysis;
Expand Down

0 comments on commit 70f5c6c

Please sign in to comment.