Skip to content

Commit fc7c0c9

Browse files
author
bart-degreed
committed
Package updates
1 parent 994768b commit fc7c0c9

File tree

7 files changed

+32
-16
lines changed

7 files changed

+32
-16
lines changed

coverage.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ rd /s /q coverage 2>nul
33
md coverage
44

55
set configuration=Debug
6-
set opencover="%USERPROFILE%\.nuget\packages\OpenCover\4.6.519\tools\OpenCover.Console.exe"
7-
set reportgenerator="%USERPROFILE%\.nuget\packages\ReportGenerator\4.5.6\tools\net47\ReportGenerator.exe"
6+
set opencover="%USERPROFILE%\.nuget\packages\OpenCover\4.7.922\tools\OpenCover.Console.exe"
7+
set reportgenerator="%USERPROFILE%\.nuget\packages\ReportGenerator\4.8.6\tools\net47\ReportGenerator.exe"
88
set testrunner="%USERPROFILE%\.nuget\packages\xunit.runner.console\2.4.1\tools\net472\xunit.console.x86.exe"
9-
set target=".\src\CSharpGuidelinesAnalyzer\CSharpGuidelinesAnalyzer.Test\bin\%configuration%\net472\CSharpGuidelinesAnalyzer.Test.dll -noshadow"
9+
set target=".\src\CSharpGuidelinesAnalyzer\CSharpGuidelinesAnalyzer.Test\bin\%configuration%\net48\CSharpGuidelinesAnalyzer.Test.dll -noshadow"
1010
set filter="+[CSharpGuidelinesAnalyzer*]* -[CSharpGuidelinesAnalyzer.Test*]*"
1111
set coveragefile=".\coverage\CodeCoverage.xml"
1212

src/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer.Test/CSharpGuidelinesAnalyzer.Test.csproj

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net472</TargetFramework>
4+
<TargetFramework>net48</TargetFramework>
55
</PropertyGroup>
66

77
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -22,20 +22,18 @@
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2323
</PackageReference>
2424
<PackageReference Include="FluentAssertions" Version="5.10.3" />
25-
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" PrivateAssets="all" />
26-
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.5.0" />
27-
<PackageReference Include="Microsoft.DiaSymReader" Version="1.3.0" />
28-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
29-
<PackageReference Include="OpenCover" Version="4.6.519" />
30-
<PackageReference Include="ReportGenerator" Version="4.5.6" />
25+
<PackageReference Include="JetBrains.Annotations" Version="2020.3.0" PrivateAssets="all" />
26+
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.8.0" />
27+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
28+
<PackageReference Include="OpenCover" Version="4.7.922" />
29+
<PackageReference Include="ReportGenerator" Version="4.8.6" />
3130
<PackageReference Include="ResharperCodeContractNullability" Version="2.0.0" PrivateAssets="all" />
32-
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
3331
<PackageReference Include="xunit" Version="2.4.1" />
3432
<PackageReference Include="xunit.runner.console" Version="2.4.1">
3533
<PrivateAssets>all</PrivateAssets>
3634
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
3735
</PackageReference>
38-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
36+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
3937
<PrivateAssets>all</PrivateAssets>
4038
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
4139
</PackageReference>

src/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer.Test/TestDataBuilders/EditorConfigSettingsBuilder.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ private sealed class FakeAnalyzerConfigOptionsProvider : AnalyzerConfigOptionsPr
3030
[NotNull]
3131
private readonly FakeAnalyzerConfigOptions options = new FakeAnalyzerConfigOptions();
3232

33+
[NotNull]
34+
public override AnalyzerConfigOptions GlobalOptions => options;
35+
3336
public void Add([NotNull] string key, [CanBeNull] string value)
3437
{
3538
options.Settings.Add(key, value);

src/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
<PrivateAssets>all</PrivateAssets>
4747
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4848
</PackageReference>
49-
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" PrivateAssets="all" />
50-
<PackageReference Include="JetBrains.ExternalAnnotations" Version="10.2.77" PrivateAssets="all" />
49+
<PackageReference Include="JetBrains.Annotations" Version="2020.3.0" PrivateAssets="all" />
50+
<PackageReference Include="JetBrains.ExternalAnnotations" Version="10.2.91" PrivateAssets="all" />
5151
<PackageReference Include="Microsoft.CodeAnalysis" Version="2.6.0" PrivateAssets="all" />
5252
<PackageReference Include="ResharperCodeContractNullability" Version="2.0.0" PrivateAssets="all" />
5353
</ItemGroup>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using JetBrains.Annotations;
2+
using Microsoft.CodeAnalysis;
3+
4+
namespace CSharpGuidelinesAnalyzer.Extensions
5+
{
6+
/// <summary />
7+
internal static class TypeKindExtensions
8+
{
9+
[NotNull]
10+
public static string Format(this TypeKind typeKind)
11+
{
12+
return typeKind == TypeKind.Struct ? "Struct" : typeKind.ToString();
13+
}
14+
}
15+
}

src/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer/Rules/Naming/DoNotUseAbbreviationInIdentifierNameAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private static void AnalyzeNamedType(SymbolAnalysisContext context)
126126

127127
if (IsBlacklistedOrSingleLetter(type.Name))
128128
{
129-
context.ReportDiagnostic(Diagnostic.Create(Rule, type.Locations[0], type.TypeKind, type.Name));
129+
context.ReportDiagnostic(Diagnostic.Create(Rule, type.Locations[0], type.TypeKind.Format(), type.Name));
130130
}
131131
}
132132

src/CSharpGuidelinesAnalyzer/CSharpGuidelinesAnalyzer/Rules/Naming/DoNotUseNumberInIdentifierNameAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private static void AnalyzeNamedType(SymbolAnalysisContext context)
137137

138138
if (ContainsDigitsNonWhitelisted(type.Name))
139139
{
140-
context.ReportDiagnostic(Diagnostic.Create(Rule, type.Locations[0], type.TypeKind, type.Name));
140+
context.ReportDiagnostic(Diagnostic.Create(Rule, type.Locations[0], type.TypeKind.Format(), type.Name));
141141
}
142142
}
143143

0 commit comments

Comments
 (0)