Skip to content

Commit 2ae2c3c

Browse files
committed
Rename unit test method name and remove unnecessary comments in variable provider
1 parent 1017450 commit 2ae2c3c

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/GitVersion.Core.Tests/IntegrationTests/OtherBranchScenarios.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ namespace GitVersion.Core.Tests.IntegrationTests;
77
[TestFixture]
88
public class OtherBranchScenarios : TestBase
99
{
10+
/// <summary>
11+
/// https://github.com/GitTools/GitVersion/issues/2340
12+
/// </summary>
1013
[Test]
11-
public void __Just_A_Test__()
14+
public void ShouldOnlyConsiderTagsMatchingOfCurrentBranch()
1215
{
1316
var configuration = GitFlowConfigurationBuilder.New
1417
.WithBranch("develop", builder => builder.WithLabel("snapshot"))

src/GitVersion.Core/VersionCalculation/VariableProvider.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ public VersionVariables GetVariablesFor(
2525
// Continuous Deployment always requires a pre-release tag unless the commit is tagged
2626
if (!semanticVersion.PreReleaseTag.HasTag())
2727
{
28-
// TODO: Why do we manipulating the semantic version here in the VariableProvider? The method name is GET not MANIPULATE.
29-
// What is about the separation of concern and single-responsibility principle?
3028
preReleaseTagName = configuration.GetBranchSpecificLabel(semanticVersion.BuildMetaData.Branch, null);
3129
if (preReleaseTagName.IsNullOrEmpty())
3230
{
@@ -43,16 +41,12 @@ public VersionVariables GetVariablesFor(
4341
var numberGroup = match.Groups["number"];
4442
if (numberGroup.Success)
4543
{
46-
// TODO: Why do we manipulating the semantic version here in the VariableProvider? The method name is GET not MANIPULATE.
47-
// What is about the separation of concern and single-responsibility principle?
4844
preReleaseTagName += numberGroup.Value;
4945
}
5046
}
5147

5248
if (isContinuousDeploymentMode || appendTagNumberPattern || configuration.VersioningMode == VersioningMode.Mainline)
5349
{
54-
// TODO: Why do we manipulating the semantic version here in the VariableProvider? The method name is GET not MANIPULATE.
55-
// What is about the separation of concern and single-responsibility principle?
5650
semanticVersion = PromoteNumberOfCommitsToTagNumber(semanticVersion, preReleaseTagName);
5751
}
5852
else

0 commit comments

Comments
 (0)