-
Notifications
You must be signed in to change notification settings - Fork 664
Improve SemanticVersion.ToString implementation #2880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve SemanticVersion.ToString implementation #2880
Conversation
- Correct the SemanticVersion XML comment for the default SemVer ("s") format.
- Align the IFormattable.ToString method signature with the .NET Standard 2.0 implementation.
- Throw FormatException exceptions from ToString instead of ArgumentException.
- Refactor all the ToString tests to use NUnit TestCase attributes.
- Align SemanticVersion.ToString implementation of IFormattable.ToString with .NET Standard 2.0 definition.
asbjornu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a decent improvement, thanks! Can you please fix the failing tests?
|
@asbjornu . The DotNet Format failure is failing on projects in the build folder which I have not changed in my PR, so I suspect the same failures occurred in the last PR. |
|
@chris-codeflow I will have a look and fix the build formatting, then you should be able to rebase |
…eTag.ToString - Align SemanticVersion.ToString implementation of IFormattable.ToString with .NET Standard 2.0 definition.
|
@asbjornu seems like the dotnet format that is part of the .net sdk has changed from .net 6.- rc1 to rc2 |
|
@chris-codeflow you can now rebase on top of |
- Correct the SemanticVersion XML comment for the default SemVer ("s") format.
- Align the IFormattable.ToString method signature with the .NET Standard 2.0 implementation.
- Throw FormatException exceptions from ToString instead of ArgumentException.
- Refactor all the ToString tests to use NUnit TestCase attributes.
- Align SemanticVersion.ToString implementation of IFormattable.ToString with .NET Standard 2.0 definition.
…eTag.ToString - Align SemanticVersion.ToString implementation of IFormattable.ToString with .NET Standard 2.0 definition.
…odeflow/GitVersion into feature/Improve-ToString
|
@arturcic . The rebase onto main has added duplicate commits, as expected. Please do a squash merge for this PR, so we don't pollute the main branch's commit history. I broke the golden rule of rebasing which is never to rebase a branch that has been published! |
|
Thank you @chris-codeflow for your contribution! |
Description
Related Issue
Fixes #2879
Motivation and Context
The motivation for this PR was to correct the XML documentation for SemanticVersion.ToString (specifically the IFormattable.ToString implementation) and then implement a series of improvements in the general ToString implementation.
How Has This Been Tested?
Checklist: