-
Couldn't load subscription status.
- Fork 659
Format no format #4657
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
Format no format #4657
Conversation
7048ae1 to
5e1c165
Compare
3510bed to
8a331e5
Compare
8a331e5 to
3629aef
Compare
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.
RCA
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.
RCA?
Quality Gate Passed Quality Gate passed
Issues
3 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Apologies. Two passes is already more time than I had. The first pass was comfortable, the second's expanded in to assumptions that likely warrant a review & retrospect on regression pack coverage? Rollback & regroup the wise call?
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.
Fantastic work! 🎉 Thank you so much for jumping on this so quickly, @9swampy! ❤️
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.
Could these last two examples be modified to be more practical and real-world relevant, with a line showing the result, as in the first code example?
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.
How would ;; and ?? be combined? Can we give a code example for this as well?
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.
I love the added tests! 🤩 Could we please have a test for the combination of ;; and ?? as well?
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.
GitVersion.Core should not be a namespace. :)
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.
I think it's a good practice to test the returned ArgumentException to ensure that the right guard clause is throwing it. This just ensures that an ArgumentException is being thrown anywhere by the code path, not necessarily by our own code.
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.
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.
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.
RCA?
@9swampy You mention "modern ?? fallback syntax" - what do you mean by that, AFAIK ?? is just the null coalescing operation and nothing to do with string formatting?
Honestly I'm embarrassed I've not got back to fixing this. It's been maniac at my day job and I've maxed the AI tooling out repeatedly so haven't had capacity to revisit.
The reason to call that out now is to answer the question; don't get hung up on the modern quip. AIism.
I will get a poke at the fix as soon as I can.
@9swampy No worries - reason I was asking was to see if I could do the same idea of suppressing the commit number when it's zero via a different syntax
@9swampy any updates on this one?
Uh oh!
There was an error while loading. Please reload this page.
Fix legacy .NET composite format syntax
Description
Fixes legacy .NET format syntax
{CommitsSinceVersionSource:0000;;''}that was outputting literal text instead of formatted values.LegacyCompositeFormatterfor semicolon-separated format sectionsValueFormatterandRegexPatternsto support semicolons??syntaxBefore:
6.13.54-gv6-CommitsSinceVersionSource-0000-----After:
6.13.54-gv60002Related Issue
Fixes #4654
Motivation and Context
Legacy .NET semicolon format syntax stopped working, breaking existing GitVersion configurations.
How Has This Been Tested?
Added comprehensive test suites:
BackwardCompatibilityTests.cs- 8 tests covering legacy format scenariosIssue4654Tests.cs- 4 tests for the specific issueAll 12 new tests pass. No regression in existing tests.
Screenshots (if appropriate):
N/A
Checklist: