Skip to content

Commit

Permalink
Updated Microsoft.CodeAnalysis.Analyzers to version 3.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornhellander committed Apr 30, 2022
1 parent 0912548 commit d09a2e2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion StyleCop.Analyzers/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<PackageReference Include="AsyncUsageAnalyzers" Version="1.0.0-alpha003" PrivateAssets="all" />
<PackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.46" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.304" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.0.1" PrivateAssets="all" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,12 +449,12 @@ private static SyntaxTriviaList RemoveHeaderDecorationLines(SyntaxTriviaList tri
for (int i = 0; i < trivia.Count; i++)
{
var triviaLine = trivia[i];
if (triviaLine.Kind() == SyntaxKind.SingleLineCommentTrivia && triviaLine.ToFullString().Contains(settings.DocumentationRules.HeaderDecoration))
if (triviaLine.IsKind(SyntaxKind.SingleLineCommentTrivia) && triviaLine.ToFullString().Contains(settings.DocumentationRules.HeaderDecoration))
{
decorationRemovalList.Add(i);

// also remove the line break
if (i + 1 < trivia.Count && trivia[i + 1].Kind() == SyntaxKind.EndOfLineTrivia)
if (i + 1 < trivia.Count && trivia[i + 1].IsKind(SyntaxKind.EndOfLineTrivia))
{
decorationRemovalList.Add(i + 1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private static void ProcessUsingsAndReportDiagnostic(SyntaxList<UsingDirectiveSy

if (!previousUsing.IsSystemUsingDirective()
|| previousUsing.HasNamespaceAliasQualifier()
|| previousUsing.StaticKeyword.Kind() != SyntaxKind.None)
|| !previousUsing.StaticKeyword.IsKind(SyntaxKind.None))
{
systemUsingDirectivesShouldBeBeforeThisName = previousUsing.Name.ToNormalizedString();
context.ReportDiagnostic(Diagnostic.Create(Descriptor, usingDirective.GetLocation(), usingDirective.Name.ToNormalizedString(), systemUsingDirectivesShouldBeBeforeThisName));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private static void HandleSyntaxTree(SyntaxTreeAnalysisContext context)
SyntaxNode root = context.Tree.GetCompilationUnitRoot(context.CancellationToken);
foreach (var token in root.DescendantTokens())
{
if (token.Kind() == SyntaxKind.ColonToken)
if (token.IsKind(SyntaxKind.ColonToken))
{
HandleColonToken(context, token);
}
Expand Down

0 comments on commit d09a2e2

Please sign in to comment.