Skip to content

feat(diagnostic): add diagnostic model#5

Merged
ofabiodev merged 3 commits into
mainfrom
add-diagnostic-model
Jul 2, 2026
Merged

feat(diagnostic): add diagnostic model#5
ofabiodev merged 3 commits into
mainfrom
add-diagnostic-model

Conversation

@ofabiodev

Copy link
Copy Markdown
Member

Summary

Adds the initial diagnostic data model for Puff compiler errors and check results.

Changes

  • Added internal/diagnostic types for diagnostic codes, phases, severities, spans, notes, diagnostics, and result payloads.
  • Added unit tests covering JSON shape, errors, warnings, info diagnostics, optional fields, notes, spans, documented codes, phases, and severities.
  • Updated .gitignore to ignore local planning/reference drafts under .specs/ and docs/.

Testing

cd src
go test ./...

Notes

The diagnostic package is data-only for now; human-readable formatting is planned separately. INFO diagnostics are represented as a severity constant but are not placed into the current errors or warnings JSON buckets because the documented check result only defines those two arrays.

@ofabiodev ofabiodev added the kind/feature New behavior or capability. label Jul 2, 2026
@ofabiodev ofabiodev merged commit 00cf11f into main Jul 2, 2026
2 checks passed
@ofabiodev ofabiodev deleted the add-diagnostic-model branch July 2, 2026 21:08
@ofabiodev ofabiodev added kind/test Tests, fixtures, golden files, or test infrastructure. puff/diagnostics Error messages, hints, notes, and source spans. labels Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature New behavior or capability. kind/test Tests, fixtures, golden files, or test infrastructure. puff/diagnostics Error messages, hints, notes, and source spans.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant