-
Notifications
You must be signed in to change notification settings - Fork 656
Support C# format strings in config #4605
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
Conversation
f192c56
to
92fa63f
Compare
please rebase and resolve the conflicts |
92fa63f
to
9a18634
Compare
e7652ec
to
16f557c
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.
Awesome work! ❤️
3e5bf0e
to
65a39f5
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.
Besides the build failure, this is looking really good! The only missing part is documentation.
c7fbede
to
646a634
Compare
53547ee
to
625c32f
Compare
@9swampy if you don't mind I'll have a review of this in 2 weeks time as I'm on vacation. I need to understand it a bit in detail the changes as there is a chance we will need to maintain these changes. |
Can I also suggest adding some tests that use the zero-suppression syntax so that we can get versions without a commits number e.g.
|
0c3e0c0
to
f0e2983
Compare
@9swampy could you please rebase your branch onto latest |
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.
Having now spun up the documentation and read through it, there's one thing I don't quite understand. In what looks like code examples, we find stuff like this:
# GitVersion.yml
template: "{Major}.{Minor}.{Patch:F2}-{PreReleaseLabel}"
This gives the impression that template
is a supported configuration key in GitVersion.yml
. Afaik, it is not? Fixing the examples so they only provide code that actually works in GitVersion.yml
and removing the test cases and I think we're good!
No worries, it was AI generated. The way I read it was:
It didn't mean to imply there was a configuration key called template, but I see where you're coming from. This and the test verified examples: gone. Really wasn't comfortable with the docs, that's why I marked them "draft". would be nice to make it in to the imminent release so if there's more tweaks don't be shy. |
@asbjornu if you find all these changes good, please merge this PR |
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.
Only one final question about backwards compatibility and we're good to go!
hey @9swampy I recently introduced sonarcloud quality checks, mind to check the new issues (they should be easy to fix), and please rebase the branch |
Have had to dance with that devil in several workplaces: no problem. Prevention's better than cure though IMHO, and there's very little that code analysers can't get in front of. Editorconfig's are fairly well respected now too. |
@9swampy you have now the approvals, so please rebase and fix the sonar cloud issues and we are good to merge |
Renames `PascalCase` to `ToPascalCase` and moves `TextInfo` parameter to improve clarity and usability. Refactors related calls to align with the updated method signature.
Co-authored-by: Asbjørn Ulsberg <[email protected]>
Uses `CultureInfo.InvariantCulture` for date parsing in tests to avoid locale-specific issues.
be3d7d7
to
27ef709
Compare
530e243
to
5f509d8
Compare
|
Thank you @9swampy for your contribution! |
Support C# format strings in config
Merge pull request #4605 from 9swampy/SupportFormatStringsInConfig Support C# format strings in config
Description
Support C# format strings in config
Related Issue
Fixes #4156
Motivation and Context
#4156
How Has This Been Tested?
I've implemented a number of formatters and added scenario coverage for implementation but a 4-eyes verification and feedback on appropriateness of scenarios included (or not) would be welcome. The specific scenrio noted on the wish-issue tested here and here.
I've an aversion to Helper classes but that's where I've dropped all this as an extension of the original StringFormatWith but please redirect if it should live elsewhere (or just needs some structure).
Screenshots (if appropriate):
Checklist: