Skip to content

Commit 48227e6

Browse files
committed
Update to Microsoft.CodeAnalysis.Analyzers 3.3.5-beta1.23205.2
1 parent ef1f91c commit 48227e6

File tree

19 files changed

+57
-39
lines changed

19 files changed

+57
-39
lines changed

NuGet.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
66
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
77
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
8+
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />
89

910
<!-- Uncomment this to test unpublished builds from the AppVeyor feed. -->
1011
<!--<add key="appveyor-stylecop" value="https://ci.appveyor.com/nuget/stylecopanalyzers" />-->

StyleCop.Analyzers/Directory.Build.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<LangVersion>10</LangVersion>
1414
<Nullable>enable</Nullable>
1515
<WarningLevel>99</WarningLevel>
16+
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
1617
</PropertyGroup>
1718

1819
<PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true'">
@@ -47,7 +48,7 @@
4748
<PackageReference Include="AsyncUsageAnalyzers" Version="1.0.0-alpha003" PrivateAssets="all" />
4849
<PackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.46" PrivateAssets="all" />
4950
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" PrivateAssets="all" />
50-
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" PrivateAssets="all" />
51+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.5-beta1.23205.2" PrivateAssets="all" />
5152
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.0.1" PrivateAssets="all" />
5253
</ItemGroup>
5354

StyleCop.Analyzers/StyleCop.Analyzers.CodeGeneration/GeneratorSyntaxExtensions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
namespace StyleCop.Analyzers.CodeGeneration
55
{
6-
using System;
76
using Microsoft.CodeAnalysis;
87
using Microsoft.CodeAnalysis.CSharp;
98

@@ -13,7 +12,7 @@ public static TSyntax WithLeadingBlankLine<TSyntax>(this TSyntax syntax)
1312
where TSyntax : SyntaxNode
1413
{
1514
return syntax.WithLeadingTrivia(SyntaxFactory.TriviaList(
16-
SyntaxFactory.PreprocessingMessage(Environment.NewLine)));
15+
SyntaxFactory.PreprocessingMessage(XmlSyntaxFactory.CrLf)));
1716
}
1817
}
1918
}

StyleCop.Analyzers/StyleCop.Analyzers.CodeGeneration/OperationLightupGenerator.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ namespace StyleCop.Analyzers.CodeGeneration
1616
using Microsoft.CodeAnalysis;
1717
using Microsoft.CodeAnalysis.CSharp;
1818
using Microsoft.CodeAnalysis.CSharp.Syntax;
19-
using Microsoft.CodeAnalysis.Text;
2019

2120
[Generator]
2221
internal sealed class OperationLightupGenerator : IIncrementalGenerator
@@ -740,20 +739,20 @@ private void GenerateOperationWrapperHelper(in SourceProductionContext context,
740739
SyntaxFactory.Trivia(SyntaxFactory.DocumentationComment(
741740
SyntaxFactory.XmlText(" "),
742741
SyntaxFactory.XmlSummaryElement(
743-
SyntaxFactory.XmlNewLine(Environment.NewLine),
742+
SyntaxFactory.XmlText(XmlSyntaxFactory.XmlCarriageReturnLineFeedWithContinuation),
744743
SyntaxFactory.XmlText(" Gets the type that is wrapped by the given wrapper."),
745-
SyntaxFactory.XmlNewLine(Environment.NewLine),
744+
SyntaxFactory.XmlText(XmlSyntaxFactory.XmlCarriageReturnLineFeedWithContinuation),
746745
SyntaxFactory.XmlText(" ")),
747-
SyntaxFactory.XmlNewLine(Environment.NewLine),
746+
SyntaxFactory.XmlText(XmlSyntaxFactory.XmlCarriageReturnLineFeedWithContinuation),
748747
SyntaxFactory.XmlText(" "),
749748
SyntaxFactory.XmlParamElement(
750749
"wrapperType",
751750
SyntaxFactory.XmlText("Type of the wrapper for which the wrapped type should be retrieved.")),
752-
SyntaxFactory.XmlNewLine(Environment.NewLine),
751+
SyntaxFactory.XmlText(XmlSyntaxFactory.XmlCarriageReturnLineFeedWithContinuation),
753752
SyntaxFactory.XmlText(" "),
754753
SyntaxFactory.XmlReturnsElement(
755754
SyntaxFactory.XmlText("The wrapped type, or null if there is no info.")),
756-
SyntaxFactory.XmlNewLine(Environment.NewLine).WithoutTrailingTrivia()))));
755+
SyntaxFactory.XmlText(XmlSyntaxFactory.XmlCarriageReturnLineFeedWithContinuation).WithoutTrailingTrivia()))));
757756

758757
var wrapperHelperClass = SyntaxFactory.ClassDeclaration(
759758
attributeLists: default,

StyleCop.Analyzers/StyleCop.Analyzers.CodeGeneration/SyntaxLightupGenerator.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
namespace StyleCop.Analyzers.CodeGeneration
55
{
66
using System;
7-
using System.Collections;
87
using System.Collections.Generic;
98
using System.Collections.Immutable;
109
using System.Diagnostics;
@@ -18,7 +17,6 @@ namespace StyleCop.Analyzers.CodeGeneration
1817
using Microsoft.CodeAnalysis;
1918
using Microsoft.CodeAnalysis.CSharp;
2019
using Microsoft.CodeAnalysis.CSharp.Syntax;
21-
using Microsoft.CodeAnalysis.Text;
2220

2321
[Generator]
2422
internal sealed class SyntaxLightupGenerator : IIncrementalGenerator
@@ -1198,20 +1196,20 @@ private void GenerateSyntaxWrapperHelper(in SourceProductionContext context, Imm
11981196
SyntaxFactory.Trivia(SyntaxFactory.DocumentationComment(
11991197
SyntaxFactory.XmlText(" "),
12001198
SyntaxFactory.XmlSummaryElement(
1201-
SyntaxFactory.XmlNewLine(Environment.NewLine),
1199+
SyntaxFactory.XmlText(XmlSyntaxFactory.XmlCarriageReturnLineFeedWithContinuation),
12021200
SyntaxFactory.XmlText(" Gets the type that is wrapped by the given wrapper."),
1203-
SyntaxFactory.XmlNewLine(Environment.NewLine),
1201+
SyntaxFactory.XmlText(XmlSyntaxFactory.XmlCarriageReturnLineFeedWithContinuation),
12041202
SyntaxFactory.XmlText(" ")),
1205-
SyntaxFactory.XmlNewLine(Environment.NewLine),
1203+
SyntaxFactory.XmlText(XmlSyntaxFactory.XmlCarriageReturnLineFeedWithContinuation),
12061204
SyntaxFactory.XmlText(" "),
12071205
SyntaxFactory.XmlParamElement(
12081206
"wrapperType",
12091207
SyntaxFactory.XmlText("Type of the wrapper for which the wrapped type should be retrieved.")),
1210-
SyntaxFactory.XmlNewLine(Environment.NewLine),
1208+
SyntaxFactory.XmlText(XmlSyntaxFactory.XmlCarriageReturnLineFeedWithContinuation),
12111209
SyntaxFactory.XmlText(" "),
12121210
SyntaxFactory.XmlReturnsElement(
12131211
SyntaxFactory.XmlText("The wrapped type, or null if there is no info.")),
1214-
SyntaxFactory.XmlNewLine(Environment.NewLine).WithoutTrailingTrivia()))));
1212+
SyntaxFactory.XmlText(XmlSyntaxFactory.XmlCarriageReturnLineFeedWithContinuation).WithoutTrailingTrivia()))));
12151213

12161214
var wrapperHelperClass = SyntaxFactory.ClassDeclaration(
12171215
attributeLists: default,
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
2+
// Licensed under the MIT License. See LICENSE in the project root for license information.
3+
4+
namespace StyleCop.Analyzers.CodeGeneration
5+
{
6+
using Microsoft.CodeAnalysis;
7+
using Microsoft.CodeAnalysis.CSharp;
8+
9+
internal static class XmlSyntaxFactory
10+
{
11+
public const string CrLf = "\r\n";
12+
13+
public static SyntaxToken XmlCarriageReturnLineFeedWithContinuation { get; } = SyntaxFactory.XmlTextNewLine(CrLf, continueXmlDocumentationComment: true);
14+
}
15+
}

StyleCop.Analyzers/StyleCop.Analyzers.Status.Generator/StyleCop.Analyzers.Status.Generator.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<PropertyGroup>
55
<TargetFramework>net472</TargetFramework>
66
<OutputType>Exe</OutputType>
7+
<EnforceExtendedAnalyzerRules>false</EnforceExtendedAnalyzerRules>
78

89
<!-- Automatically generate the necessary assembly binding redirects -->
910
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp10/StyleCop.Analyzers.Test.CSharp10.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
<PropertyGroup>
55
<TargetFramework>net472</TargetFramework>
6+
<EnforceExtendedAnalyzerRules>false</EnforceExtendedAnalyzerRules>
67
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
78
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
89
</PropertyGroup>

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp11/StyleCop.Analyzers.Test.CSharp11.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
<PropertyGroup>
55
<TargetFramework>net472</TargetFramework>
6+
<EnforceExtendedAnalyzerRules>false</EnforceExtendedAnalyzerRules>
67
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
78
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
89
</PropertyGroup>

StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp7/StyleCop.Analyzers.Test.CSharp7.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
<PropertyGroup>
55
<TargetFramework>net46</TargetFramework>
6+
<EnforceExtendedAnalyzerRules>false</EnforceExtendedAnalyzerRules>
67
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
78
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
89
</PropertyGroup>

0 commit comments

Comments
 (0)