Skip to content

Commit

Permalink
Merge pull request #3698 from GitTools/dependabot/nuget/NUnit.Analyze…
Browse files Browse the repository at this point in the history
…rs-3.8.0

(deps): Bump NUnit.Analyzers from 3.6.1 to 3.8.0
  • Loading branch information
mergify[bot] authored Sep 25, 2023
2 parents 5e8efaf + 5b0f81d commit 1db2828
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
dotnet_style_prefer_simplified_interpolation = true:suggestion

# Dispose rules (CA2000 and CA2213) ported to IDE analyzers. We already execute the CA rules on the repo, so disable the IDE ones.
dotnet_diagnostic.IDE0005.severity = none
dotnet_diagnostic.IDE0067.severity = none
dotnet_diagnostic.IDE0068.severity = none
dotnet_diagnostic.IDE0069.severity = none
dotnet_diagnostic.CA1016.severity = none

#### C# Coding Conventions ####

# Prefer "var" everywhere
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<PackageVersion Include="MSBuild.ProjectCreation" Version="10.0.0" />
<PackageVersion Include="NSubstitute" Version="5.1.0" />
<PackageVersion Include="NUnit" Version="3.13.3" />
<PackageVersion Include="NUnit.Analyzers" Version="3.6.1" />
<PackageVersion Include="NUnit.Analyzers" Version="3.8.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="JunitXml.TestLogger" Version="3.0.134" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.5.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersion.Core.Tests/MergeMessageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void EmptyMessageString(string message)
[TestCase("")]
[TestCase("\t\t ")]
[TestCase(null)]
public void EmptyTagPrefix(string prefix)
public void EmptyTagPrefix(string? prefix)
{
// Arrange
const string message = "Updated some code.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void ToStringWithInvalidFormatTest()
[TestCase(1, 2, 3, "beta", 4, null, null, null, null, ExpectedResult = "1.2.3-beta.4")]
[TestCase(1, 2, 3, "beta", 4, 5, "theBranch", "theSha", "theOtherMetaData", ExpectedResult = "1.2.3-beta.4")]
[TestCase(1, 2, 3, "", 4, 5, "theBranch", "theSha", "theOtherMetaData", ExpectedResult = "1.2.3-4")]
public string ToStringTests(int major, int minor, int patch, string preReleaseName, int? preReleaseVersion, int? buildCount, string branchName, string sha, string otherMetadata)
public string ToStringTests(int major, int minor, int patch, string? preReleaseName, int? preReleaseVersion, int? buildCount, string? branchName, string? sha, string? otherMetadata)
{
var semVer = BuildSemVer(major, minor, patch, preReleaseName, preReleaseVersion, buildCount, branchName, sha, otherMetadata);
return semVer.ToString();
Expand All @@ -96,7 +96,7 @@ public string ToStringTests(int major, int minor, int patch, string preReleaseNa
[TestCase(1, 2, 3, "beta", 4, null, null, null, null, ExpectedResult = "1.2.3-beta.4")]
[TestCase(1, 2, 3, "beta", 4, 5, "theBranch", "theSha", "theOtherMetaData", ExpectedResult = "1.2.3-beta.4")]
[TestCase(1, 2, 3, "", 4, 10, "theBranch", "theSha", "theOtherMetaData", ExpectedResult = "1.2.3-4")]
public string ToStringWithSFormatTests(int major, int minor, int patch, string preReleaseName, int? preReleaseVersion, int? buildCount, string branchName, string sha, string otherMetadata)
public string ToStringWithSFormatTests(int major, int minor, int patch, string? preReleaseName, int? preReleaseVersion, int? buildCount, string? branchName, string? sha, string? otherMetadata)
{
var semVer = BuildSemVer(major, minor, patch, preReleaseName, preReleaseVersion, buildCount, branchName, sha, otherMetadata);
return semVer.ToString("s");
Expand All @@ -105,7 +105,7 @@ public string ToStringWithSFormatTests(int major, int minor, int patch, string p
[TestCase(1, 2, 3, null, null, null, null, null, null, ExpectedResult = "1.2.3")]
[TestCase(1, 2, 3, "beta", 4, null, null, null, null, ExpectedResult = "1.2.3")]
[TestCase(1, 2, 3, "beta", 4, 5, "theBranch", "theSha", "theOtherMetaData", ExpectedResult = "1.2.3")]
public string ToStringWithFormatJTests(int major, int minor, int patch, string preReleaseName, int? preReleaseVersion, int? buildCount, string branchName, string sha, string otherMetadata)
public string ToStringWithFormatJTests(int major, int minor, int patch, string? preReleaseName, int? preReleaseVersion, int? buildCount, string? branchName, string? sha, string? otherMetadata)
{
var semVer = BuildSemVer(major, minor, patch, preReleaseName, preReleaseVersion, buildCount, branchName, sha, otherMetadata);
return semVer.ToString("j");
Expand All @@ -115,7 +115,7 @@ public string ToStringWithFormatJTests(int major, int minor, int patch, string p
[TestCase(1, 2, 3, "beta", 4, null, null, null, null, ExpectedResult = "1.2.3-beta.4")]
[TestCase(1, 2, 3, "beta", 4, 5, null, null, null, ExpectedResult = "1.2.3-beta.4+5")]
[TestCase(1, 2, 3, "", 4, 5, "theBranch", "theSha", "theOtherMetaData", ExpectedResult = "1.2.3-4+5")]
public string ToStringWithFormatFTests(int major, int minor, int patch, string preReleaseName, int? preReleaseVersion, int? buildCount, string branchName, string sha, string otherMetadata)
public string ToStringWithFormatFTests(int major, int minor, int patch, string? preReleaseName, int? preReleaseVersion, int? buildCount, string? branchName, string? sha, string? otherMetadata)
{
var semVer = BuildSemVer(major, minor, patch, preReleaseName, preReleaseVersion, buildCount, branchName, sha, otherMetadata);
return semVer.ToString("f");
Expand All @@ -125,7 +125,7 @@ public string ToStringWithFormatFTests(int major, int minor, int patch, string p
[TestCase(1, 2, 3, "beta", 4, null, null, null, null, ExpectedResult = "1.2.3-beta.4")]
[TestCase(1, 2, 3, "beta", 4, 5, null, null, null, ExpectedResult = "1.2.3-beta.4+5")]
[TestCase(1, 2, 3, "beta", 4, 5, "theBranch", "theSha", "theOtherMetaData", ExpectedResult = "1.2.3-beta.4+5.Branch.theBranch.Sha.theSha.theOtherMetaData")]
public string ToStringWithFormatITests(int major, int minor, int patch, string preReleaseName, int? preReleaseVersion, int? buildCount, string branchName, string sha, string otherMetadata)
public string ToStringWithFormatITests(int major, int minor, int patch, string? preReleaseName, int? preReleaseVersion, int? buildCount, string? branchName, string? sha, string? otherMetadata)
{
var semVer = BuildSemVer(major, minor, patch, preReleaseName, preReleaseVersion, buildCount, branchName, sha, otherMetadata);
return semVer.ToString("i");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void ShouldNotTakeVersionFromUnrelatedMerge(string commitMessage)
[TestCase("Merge branch 'support/0.2.0'", "support", "0.2.0")]
[TestCase("Merge branch 'support/0.2.0'", null, null)]
[TestCase("Merge branch 'release/2.0.0'", null, "2.0.0")]
public void TakesVersionFromMergeOfConfiguredReleaseBranch(string message, string? releaseBranch, string expectedVersion)
public void TakesVersionFromMergeOfConfiguredReleaseBranch(string message, string? releaseBranch, string? expectedVersion)
{
var configurationBuilder = GitFlowConfigurationBuilder.New;
if (releaseBranch != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class AssemblyFileVersionTests : TestBase
[TestCase(AssemblyFileVersioningScheme.MajorMinorPatch, 1, 2, 3, 4, "1.2.3.0")]
[TestCase(AssemblyFileVersioningScheme.MajorMinorPatchTag, 1, 2, 3, 4, "1.2.3.4")]
public void ValidateAssemblyFileVersionBuilder(AssemblyFileVersioningScheme assemblyFileVersioningScheme, int major, int minor, int patch,
int tag, string versionString)
int tag, string? versionString)
{
var semVer = new SemanticVersion(major, minor, patch)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class InformationalVersionBuilderTests : TestBase
[TestCase("release/1.2", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 0, "beta2", null, null, "1.2.0-beta.2+Branch.release-1.2.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
[TestCase("release/1.2", "a682956dc1a2752aa24597a0f5cd939f93614509", "a682956d", 1, 2, 0, "alpha2", null, null, "1.2.0-alpha.2+Branch.release-1.2.Sha.a682956dc1a2752aa24597a0f5cd939f93614509")]
public void ValidateInformationalVersionBuilder(string branchName, string sha, string shortSha, int major, int minor, int patch,
string tag, string versionSourceSha, int? commitsSinceTag, string versionString)
string? tag, string? versionSourceSha, int? commitsSinceTag, string versionString)
{
var semanticVersion = new SemanticVersion
{
Expand Down
3 changes: 3 additions & 0 deletions src/GitVersion.Output.Tests/Output/ProjectFileUpdaterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public void Setup()
this.projectFileUpdater = new ProjectFileUpdater(this.log, this.fileSystem);
}

[TearDown]
public void Teardown() => this.projectFileUpdater.Dispose();

[TestCase("Microsoft.NET.Sdk")]
[TestCase("Microsoft.NET.Sdk.Worker")]
[TestCase("Microsoft.NET.Sdk.Web")]
Expand Down

0 comments on commit 1db2828

Please sign in to comment.