Compare
Sorry, something went wrong.
No results found
Release 0.5.2
ZeroAlloc 0.5.2 migrates repository quality gates from **CSharpStyleValidator** / **CoverageGap.Tool** to **CSharpStyleChecker** / **ExitPointGaps** 1.0.0, modernizes MSBuild layout, restores idiomatic C# (`switch` expressions, `??`, `?:`) under the relaxed CSC006 rule (multi-line arms allowed), and ships minor library and generator fixes.
## Requirements
- .NET 10.0 or later
- C# 14.0 or later
- `dotnet tool restore` (installs `exitpointgaps` 1.0.0)
## Quality gates
### Replaced tooling
| Deprecated | Replacement |
|------------|-------------|
| `CSharpStyleValidator` 2.x | **CSharpStyleChecker** 1.x (CSC001–CSC008) |
| `coveragegap.tool` 2.x | **ExitPointGaps** 1.0.0 |
| `dotnet tool run coveragegap` | `dotnet tool run exitpointgaps` |
### Build & analysis
- `AnalysisLevel` set to **10-recommended** (central + per-project).
- `EnforceCodeStyleInBuild` enabled solution-wide.
- **Release** and **CI** builds set `ContinuousIntegrationBuild=true`; `PathMap` remains pack-only (`GeneratePackageOnBuild`) to keep coverage PDB paths stable.
- `DebugType` set to **embedded** solution-wide.
- XML documentation generation scoped to packable assemblies only (tests, executables, and non-packable projects opt out).
- Documented `NoWarn` suppressions for intentional API/test conventions: **CA1720** (type names in public API), **CA1304** (invariant culture by design), **CA1707** (test naming).
- `EmitCompilerGeneratedFiles` output redirected to `obj/Generated/` to avoid SDK globbing duplicates (CS0102/CS0111).
### CSC006 / style
- CSharpStyleChecker allows `switch`, `?:`, `??`, and `??=` when arms/operands are on **separate lines** (no more CSV006-style single-line bans).
- Production code keeps idiomatic expressions; single-line `??` uses multi-line form where needed.
- `#region` structuring and intent-focused comments aligned across library, generator, tests, benchmarks, and demo.
## Library & generator changes
### Public API
- **`LazyString`**: added comparison operators `<`, `<=`, `>`, `>=` (delegate to `CompareTo`).
- **`SpanStringBuilder`**: all numeric/date `TryFormat` calls now pass `CultureInfo.InvariantCulture` explicitly (consistent output regardless of thread culture).
### Generator
- Parameter XML docs for constructed generic types (e.g. `Formatted<double>`) use escaped `<c>` literals via `BinaryGeneratorHelpers.ToXmlDocCode` instead of invalid `<see cref="...">` tags — prevents CS1570/CS1584/CS1658 when consumers compile generated code with XML docs enabled.
- Signature deduplication simplified (`HashSet.Add` return value).
### Internal / non-breaking
- `BinaryParseValidator` type-name checks use `StringComparison.Ordinal`.
- `TryFormat` destination parameters renamed to `utf8Destination` in UTF-8 wrapper types (CA1720; no signature change).
- XML doc wording cleanup (`byte[]` references) in `ZeroAllocBase` and `TempBytes`.
## MSBuild modernization
- Consolidated shared settings in `Directory.Build.props` / `Directory.Build.targets`.
- Slimmed `.csproj` files (merged `ItemGroup`s, removed duplicate properties).
- `Directory.Build.targets`: `ApplyCSharpStyleChecker` + simple `PackageReference` (ExitPoints bundled in checker).
- `build/ZeroAlloc.Pack.targets`: PathMap gated on `GeneratePackageOnBuild`.
## NuGet package
- Version **0.5.2**.
- Package layout, generator inclusion, `buildTransitive/ZeroAlloc.props`, README, icon, symbols — unchanged (consumer-friendly single-package experience preserved).
- Consumer-visible additions: `LazyString` comparison operators; invariant-culture formatting in `SpanStringBuilder`; corrected generator XML docs for generic parameter types.
## Repository / contributor notes
```bash
dotnet build ZeroAlloc.slnx -c Release
dotnet test ZeroAlloc.slnx -c Release
dotnet tool run exitpointgaps run solution ZeroAlloc.slnx --repo-root . --configuration Release --format agent
# Expect: exitGapCount == 0
```
- Run `dotnet tool restore` after pulling to pick up ExitPointGaps 1.0.0.
- Maintainer docs (`.github/`) updated for CSharpStyleChecker, ExitPointGaps, relaxed CSC006, `#region`/comment guidance, and invariant-culture requirements.
- **1949** tests pass; full exit-point coverage retained on `ZeroAlloc` and `ZeroAlloc.Generator`.