Skip to content

Embed the sumtype analyzer - #36

Merged
nnutter merged 1 commit into
analysis-laser-powerwallfrom
analysis-loop-probe
Nov 5, 2026
Merged

nnutter merged 1 commit into
analysis-laser-powerwallfrom
analysis-loop-probe

Conversation

@nnutter

@nnutter nnutter commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

No description provided.

A type switch over a sum type must cover every variant, and Go reports
no error when one is missing. go-check-sumtype finds the omission, and
its upstream analyzer is a plain go/analysis analyzer.

The analyzer exports a package fact, and the analysistest driver checks
a fact against a want comment, so the testdata names the fact that the
package exports as well as the diagnostic that each omission produces.

Change-Id: If942120589f01e42925d43b37ff6f6e9e902dcd1
@nnutter
nnutter added this pull request to stack #41 November 5, 2026 07:46
@nnutter nnutter changed the title Integrate the sumtype analyzer Embed the sumtype analyzer Nov 5, 2026
@nnutter
nnutter merged commit 30a547d into master Nov 5, 2026
3 checks passed
@nnutter
nnutter deleted the analysis-loop-probe branch November 5, 2026 07:55
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