Skip to content

Commit 85b04d9

Browse files
authored
Merge pull request #102 from feO2x/dev
v12.0.0
2 parents 9d994da + cb87ede commit 85b04d9

38 files changed

+2753
-369
lines changed

Code/Light.GuardClauses.AllProjects.sln.DotSettings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@
249249
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
250250
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean>
251251
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
252+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002EMemberReordering_002EMigrations_002ECSharpFileLayoutPatternRemoveIsAttributeUpgrade/@EntryIndexedValue">True</s:Boolean>
252253
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
253254
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
254255
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>

Code/Light.GuardClauses.InternalRoslynAnalyzers.Tests/Light.GuardClauses.InternalRoslynAnalyzers.Tests.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>
88
<ProjectReference Include="..\Light.GuardClauses.InternalRoslynAnalyzers\Light.GuardClauses.InternalRoslynAnalyzers.csproj" />
9-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
10-
<PackageReference Include="xunit" Version="2.4.1" />
11-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
12-
<PackageReference Include="FluentAssertions" Version="6.2.0" />
9+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
10+
<PackageReference Include="xunit" Version="2.9.2" />
11+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
12+
<PackageReference Include="FluentAssertions" Version="6.12.1" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

Code/Light.GuardClauses.InternalRoslynAnalyzers/Light.GuardClauses.InternalRoslynAnalyzers.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5+
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
56
</PropertyGroup>
67

78
<ItemGroup>
8-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.0.1" />
9+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.11.0" />
910
</ItemGroup>
1011

1112
</Project>

Code/Light.GuardClauses.InternalRoslynAnalyzers/XmlCommentAnalyzer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private static void AnalyzeXmlCommentsForParameterNameAndMessage(SymbolAnalysisC
3737
if (methodSymbol.DeclaringSyntaxReferences.Length != 1 ||
3838
!(methodSymbol.DeclaringSyntaxReferences[0].GetSyntax() is MethodDeclarationSyntax methodDeclarationSyntax) ||
3939
!(methodDeclarationSyntax.DescendantTrivia()
40-
.SingleOrDefault(trivia => trivia.Kind() == SyntaxKind.SingleLineDocumentationCommentTrivia)
40+
.SingleOrDefault(trivia => trivia.IsKind(SyntaxKind.SingleLineDocumentationCommentTrivia))
4141
.GetStructure() is DocumentationCommentTriviaSyntax documentationSyntax))
4242
return;
4343

Code/Light.GuardClauses.Performance/StringAssertions/MustBeBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ public string ImperativeVersion()
2222

2323
[Benchmark]
2424
public string LightGuardClausesCustomException() =>
25-
X.MustBe(Y, StringComparisonType.OrdinalIgnoreWhiteSpace, (x, y) => new Exception("The strings are not equal."));
25+
X.MustBe(Y, StringComparisonType.OrdinalIgnoreWhiteSpace, (_, _, _) => new Exception("The strings are not equal."));
2626
}
2727
}

Code/Light.GuardClauses.Performance/StringAssertions/MustNotBeBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ public string ImperativeVersion()
2525

2626
[Benchmark]
2727
public string LightGuardClausesCustomException() =>
28-
X.MustNotBe(Y, StringComparisonType.OrdinalIgnoreCaseIgnoreWhiteSpace, (x, y) => new Exception("The strings are equal."));
28+
X.MustNotBe(Y, StringComparisonType.OrdinalIgnoreCaseIgnoreWhiteSpace, (_, _, _) => new Exception("The strings are equal."));
2929
}
3030
}

Code/Light.GuardClauses.Source/Light.GuardClauses.Source.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0</TargetFrameworks>
5-
<LangVersion>10.0</LangVersion>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
<LangVersion>12.0</LangVersion>
66
<Authors>Kenny Pflug</Authors>
77
<Company>Kenny Pflug</Company>
88
<Copyright>Copyright © Kenny Pflug 2016 - 2023</Copyright>

Code/Light.GuardClauses.SourceCodeTransformation.Tests/Light.GuardClauses.SourceCodeTransformation.Tests.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.0" />
10-
<PackageReference Include="xunit" Version="2.4.2" />
11-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
12-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.6.0" />
13-
<PackageReference Include="FluentAssertions" Version="6.11.0" />
9+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
10+
<PackageReference Include="xunit" Version="2.9.2" />
11+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
12+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.11.0" />
13+
<PackageReference Include="FluentAssertions" Version="6.12.1" />
1414
</ItemGroup>
1515

1616
</Project>

Code/Light.GuardClauses.SourceCodeTransformation/Light.GuardClauses.SourceCodeTransformation.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
<PropertyGroup>
66
<OutputType>Exe</OutputType>
7-
<TargetFramework>net7.0</TargetFramework>
7+
<TargetFramework>net8.0</TargetFramework>
88
<Nullable>enable</Nullable>
99
</PropertyGroup>
1010

1111
<ItemGroup>
1212
<ProjectReference Include="..\Light.GuardClauses\Light.GuardClauses.csproj" />
13-
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="7.0.0" />
14-
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.0" />
15-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
16-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.6.0" />
13+
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
14+
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
15+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
16+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.11.0" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

Code/Light.GuardClauses.SourceCodeTransformation/SourceFileMerger.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static void CreateSingleSourceFile(SourceFileMergeOptions options)
3434
.AppendLine($@"License information for Light.GuardClauses
3535
3636
The MIT License (MIT)
37-
Copyright (c) 2016, 2023 Kenny Pflug mailto:kenny.pflug@live.de
37+
Copyright (c) 2016, 2024 Kenny Pflug mailto:kenny.pflug@live.de
3838
3939
Permission is hereby granted, free of charge, to any person obtaining a copy
4040
of this software and associated documentation files (the ""Software""), to deal
@@ -69,6 +69,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
6969
using System.Text.RegularExpressions;
7070
{(options.IncludeJetBrainsAnnotationsUsing ? "using JetBrains.Annotations;" + Environment.NewLine : string.Empty)}using {options.BaseNamespace}.Exceptions;
7171
using {options.BaseNamespace}.FrameworkExtensions;
72+
{(options.IncludeJetBrainsAnnotationsUsing ? "using NotNullAttribute = System.Diagnostics.CodeAnalysis.NotNullAttribute;" : "")}
7273
7374
#nullable enable annotations
7475

0 commit comments

Comments
 (0)