Skip to content

Commit 8a19269

Browse files
committed
Remove JetBrains.Annotations dependency
The JetBrains.Annotations package and its reference usage are removed from the code. This changes the AppendLineFormat function in the StringBuilderExtensions class and removes any related package references in the Directory.Packages.props and GitVersion.Core.csproj files.
1 parent 7384185 commit 8a19269

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

src/Directory.Build.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
<PackageReference Include="Microsoft.Extensions.DependencyInjection"/>
6363
<PackageReference Include="Microsoft.NET.Test.Sdk"/>
6464

65-
<PackageReference Include="JetBrains.Annotations" PrivateAssets="All"/>
6665
<PackageReference Include="NSubstitute"/>
6766

6867
<PackageReference Include="NUnit"/>

src/Directory.Packages.props

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<PackageVersion Include="FluentDateTime" Version="2.1.0" />
77
<PackageVersion Include="JsonSchema.Net.Generation" Version="3.5.0" />
88
<PackageVersion Include="LibGit2Sharp" Version="0.28.0" />
9-
<PackageVersion Include="JetBrains.Annotations" Version="2023.3.0" />
109
<PackageVersion Include="Microsoft.Build" Version="17.8.3" />
1110
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.8.3" />
1211
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
@@ -36,4 +35,4 @@
3635
<PackageVersion Include="System.Text.Encodings.Web" Version="8.0.0" />
3736
<PackageVersion Include="YamlDotNet" Version="13.7.1" />
3837
</ItemGroup>
39-
</Project>
38+
</Project>

src/GitVersion.Core/GitVersion.Core.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
<ItemGroup>
1515
<PackageReference Include="Polly" />
1616
<PackageReference Include="System.Net.Requests" />
17-
18-
<PackageReference Include="JetBrains.Annotations" PrivateAssets="All" />
1917
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
2018
<PackageReference Include="Microsoft.Extensions.Options" />
2119
<PackageReference Include="YamlDotNet" />

src/GitVersion.Testing/Helpers/StringBuilderExtensions.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
using JetBrains.Annotations;
1+
#if NET7_0_OR_GREATER
2+
using System.Diagnostics.CodeAnalysis;
3+
#endif
24

35
namespace GitVersion.Testing.Internal;
46

57
internal static class StringBuilderExtensions
68
{
7-
[StringFormatMethod("format")]
8-
public static void AppendLineFormat(this StringBuilder stringBuilder, string format, params object?[] args)
9+
public static void AppendLineFormat(this StringBuilder stringBuilder,
10+
#if NET7_0_OR_GREATER
11+
[StringSyntax(StringSyntaxAttribute.CompositeFormat)]
12+
#endif
13+
string format,
14+
params object?[] args)
915
{
1016
stringBuilder.AppendFormat(format, args);
1117
stringBuilder.AppendLine();

0 commit comments

Comments
 (0)