[AZ-372] Apply dotnet format whitespace cleanup; archive batch 22
ci/woodpecker/push/01-test Pipeline was successful
ci/woodpecker/push/02-build-push Pipeline was successful

Pure whitespace-only cleanup uncovered by the new format gate from the
previous commit. Verified via `git diff -w --stat`: only 4 files differ
when whitespace is ignored, and those differ only by the BOM byte.

Cleanup kinds applied across 22 source files:
- BOM removal (MapConfig.cs, SatTile.cs, GeoUtils.cs,
  IntegrationTests/Program.cs)
- CRLF -> LF (IntegrationTests/Program.cs)
- Trailing whitespace on blank lines (Common, Api, DataAccess,
  IntegrationTests, Services.RegionProcessing,
  Services.TileDownloader)
- Final newline added (RoutePoint.cs, GeoPoint.cs, others)

After this commit `dotnet format whitespace SatelliteProvider.sln
--verify-no-changes` exits 0; AC-1 is enforceable from `scripts/
run-tests.sh` going forward.

Also lands the batch 22 report, code-review report
(PASS_WITH_WARNINGS, 2 Low findings — both deferred per spec),
dependency-table status update (AZ-372 -> Done (In Testing)), task
archive (todo/ -> done/), and autodev state update.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-05-11 04:43:08 +03:00
parent 68359350fc
commit 534ab41b8e
28 changed files with 519 additions and 279 deletions
@@ -1,70 +0,0 @@
# Refactor: add dotnet format, NetAnalyzers, Coverlet tooling
**Task**: AZ-372_refactor_format_analyzers_coverage
**Name**: Wire formatter, analyzer ruleset, and coverage runner
**Description**: Add `Microsoft.CodeAnalysis.NetAnalyzers` and `coverlet.collector`; add a root `.editorconfig` if absent; wire `dotnet format --verify-no-changes` into the test script.
**Complexity**: 3 points
**Dependencies**: None (sequenced last in the run so analyzer noise lands on the post-refactor code)
**Component**: Tooling (solution root, all `*.csproj`)
**Tracker**: AZ-372
**Epic**: AZ-350
## Problem
The repository has no `dotnet format` gate, no Roslyn analyzers beyond defaults, and no Coverlet for coverage. Style drift and easy-to-miss bugs slip through.
## Outcome
- `dotnet format --verify-no-changes` succeeds against the post-refactor codebase.
- Test runs emit a coverage report via Coverlet.
- An initial NetAnalyzers ruleset (warning severity) is active across all projects.
- 37 unit + 5 smoke tests stay green.
## Scope
### Included
- Add `Microsoft.CodeAnalysis.NetAnalyzers` package reference to all `*.csproj` (or via `Directory.Build.props`).
- Add `coverlet.collector` to the test projects.
- Add a root `.editorconfig` (only if absent) with conservative defaults matching existing code style.
- Pick an initial analyzer ruleset (CA1001, CA1051, CA2007, CA2227, etc.) at warning severity.
- Wire `dotnet format --verify-no-changes` into `scripts/run-tests.sh` (non-blocking warning if it fails to run, blocking if format violations exist).
- Run formatter once and commit any whitespace cleanup as a separate batch.
### Excluded
- Promoting any analyzer warning to error severity in this run.
- Adopting a third-party style guide.
## Acceptance Criteria
**AC-1: Formatter is clean**
Given the post-refactor codebase
When `dotnet format --verify-no-changes` runs
Then it exits 0.
**AC-2: Coverage runs**
Given the test projects
When `dotnet test --collect:"XPlat Code Coverage"` runs
Then a coverage report is produced.
**AC-3: Analyzers active but non-blocking**
Given the build output
When inspected
Then NetAnalyzers warnings are visible; no warnings have been promoted to errors; build succeeds.
**AC-4: Tests stay green**
Given the post-refactor build
When `scripts/run-tests.sh --smoke` runs
Then all 37 unit + 5 smoke scenarios pass.
## Constraints
- No analyzer warning becomes an error in this run.
- `.editorconfig` defaults must not force whitespace churn beyond what one initial format pass produces.
## Risks & Mitigation
**Risk 1: analyzer flood**
- *Risk*: a strict ruleset will surface hundreds of warnings on a 3700-LOC codebase.
- *Mitigation*: start with a small named ruleset and expand later.
Full change entry: `_docs/04_refactoring/03-code-quality-refactoring/list-of-changes.md` (C19).