Format no format
Fix legacy .NET composite format syntax
Description
Fixes legacy .NET format syntax {CommitsSinceVersionSource:0000;;''} that was outputting literal text instead of formatted values.
- Added
LegacyCompositeFormatterfor semicolon-separated format sections - Updated
ValueFormatterandRegexPatternsto support semicolons - Maintains compatibility with existing
??syntax
Before: 6.13.54-gv6-CommitsSinceVersionSource-0000-----
After: 6.13.54-gv60002
Related 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 scenarios -
Issue4654Tests.cs- 4 tests for the specific issue
All 12 new tests pass. No regression in existing tests.
Screenshots (if appropriate):
N/A
Checklist:
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [x] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
@phatcher #4654
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?
@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?
Sorry, not yet. I will.
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