Skip to content

feat: explain dimensional mismatches with diagnostics - #32

Merged
ScottishTapWater merged 1 commit into
mainfrom
feat/dimension-diagnostics
Oct 24, 2026
Merged

ScottishTapWater merged 1 commit into
mainfrom
feat/dimension-diagnostics

Conversation

@ScottishTapWater

Copy link
Copy Markdown
Contributor

Summary

First of three analyser PRs.

  • DQ0001 explains incompatible addition, subtraction, comparison and compound-assignment operands using readable quantity names.
  • DQ0002 explains mismatches in assignments, initializers, returns and arguments (including constructors and numerical helpers).
  • Preserve valid user operators, nullable semantics and existing compiler diagnostics; no speculative fixes to physics.
  • Keep registration, operand checks, destination checks and dimension naming separated.

Verification

  • Tests written before implementation; 34 focused analyser cases pass.
  • Full suite: 963 passed, including packaged-consumer integration tests.
  • Independent production and test reviews, followed by review of fixes, passed.
  • Build and scoped formatting checks passed; git diff --check clean.

@ScottishTapWater
ScottishTapWater merged commit 9d41d3b into main Oct 24, 2026
2 checks passed
@ScottishTapWater
ScottishTapWater deleted the feat/dimension-diagnostics branch October 24, 2026 20:38
ScottishTapWater added a commit that referenced this pull request Oct 24, 2026
## Stack

Second of three; based on #32 (`feat/dimension-diagnostics`).

## Summary

- DQ0003 suggests readable quantity aliases, DQ0004 identifies
noncanonical encodings, and DQ0005 identifies invalid closed encodings.
- Allow deliberate aliases and open generics; ignore unresolved types
while editing.
- Add a separate IDE code-fix assembly using the approved
Workspaces/Composition dependencies.
- Apply aliases only when they bind to the same type; preserve trivia
and nullable syntax, and withhold fixes inside nameof.
- Discover raw generic quantity declarations so non-catalogued aliases
are available for replacement.
- Extend package checks and treat analyzer-load/generator-crash warnings
as errors in packaged-consumer tests.

## Verification

- Tests written before implementation, including real CodeAction
application and recompilation of fixed source.
- Full suite: 981 passed before final nameof guard; all 30 focused
encoding/code-fix/discovery checks passed after that guard.
- Independent production and test reviews, plus review of the safety
fix, passed.
- Clean build, formatting verification, Release pack/layout check and
both packaged-consumer tests passed.
- IDE code actions tested through Roslyn AdhocWorkspace; not manually
exercised in Rider.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant