Describe UnitsNet.Modular numeric format strings - #1716
Conversation
ReviewSmall, well-scoped PR — adds Breaking changes: None. This is purely additive metadata (an attribute on existing parameters), and Scope is well thought through:
Style/conventions: Matches the surrounding Test coverage: Minor observation (optional, not blocking): The main Overall: clean, minimal, and correctly scoped change with a test verifying the actual emitted/declared metadata rather than just the generator's string output. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1716 +/- ##
========================================
- Coverage 98% 98% -1%
========================================
Files 512 514 +2
Lines 22987 24141 +1154
========================================
+ Hits 22715 23748 +1033
- Misses 272 393 +121
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
f4f7d8b to
fb44ad2
Compare
ReviewReviewed the diff ( Breaking changesNone. Adding Scope noteThis only touches Generated code changes
Test coverage
Minor nit
Other
|
Motivation
UnitsNet.Modular forwards quantity format strings such as
F1to the stored numeric value, but its public APIs do not currently identify those parameters as numeric format strings to IDE tooling.Changes
ToString(string)overloads withStringSyntaxAttribute.NumericFormatIQuantityDescriptor.Formatformat parameterThis improves validation and completion for direct format-string arguments where supported by the IDE. Interpolation clauses such as
$"{speed:F1}"continue to work, but their completion behavior remains controlled by the IDE's interpolated-string support.Validation
dotnet test UnitsNet.Modular/UnitsNet.Modular.slnx --no-restore -m:1 -p:UnitsNetModularSampleUpdateLocalPackagesOnBuild=false