Skip to content

Conversation

@HHobeck
Copy link
Contributor

@HHobeck HHobeck commented Mar 18, 2023

Changing the following classes and define the properties as immutable SemanticVersion, SemanticVersionPreReleaseTag and SemanticVersionBuildMetaData

Close #3443

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

var label = configuration.GetBranchSpecificLabel(semanticVersion.BuildMetaData.Branch, null);
semanticVersion.PreReleaseTag.Name = label ?? string.Empty;
if (semanticVersion.PreReleaseTag.Name.IsNullOrEmpty())
// TODO: Why do we manipulating the semantic version here in the VariableProvider? The method name is GET not MANIPULATE.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if these TODOs are still relevant taking in consideration we compute the semantic version and return it. We could rename the method to describe the 'Compute' logic

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay no problem I have removed the comment.

// What is about the separation of concern and single-responsibility principle?
semanticVersion.PreReleaseTag.Name += numberGroup.Value;
}
// TODO: Why do we manipulating the semantic version here in the VariableProvider? The method name is GET not MANIPULATE.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if these TODOs are still relevant taking in consideration we compute the semantic version and return it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay no problem I have removed the comment.

HHobeck added 2 commits March 18, 2023 14:26
…: SemanticVersion, SemanticVersionPreReleaseTag and SemanticVersionBuildMetaData
@HHobeck HHobeck force-pushed the feature/3443_change-to-immutable-class-type branch from b36fe33 to 2ae2c3c Compare March 18, 2023 13:26
@arturcic arturcic enabled auto-merge March 18, 2023 13:32
@arturcic arturcic merged commit f3b7c36 into GitTools:main Mar 18, 2023
@mergify
Copy link
Contributor

mergify bot commented Mar 18, 2023

Thank you @HHobeck for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants