Skip to content

fix(analyze): apply diagnostic offsets to raw diagnostics as well as rule diagnostics#9060

Merged
dyc3 merged 1 commit intonextfrom
dyc3/fix-raw-diagnostics-in-embedded
Feb 14, 2026
Merged

fix(analyze): apply diagnostic offsets to raw diagnostics as well as rule diagnostics#9060
dyc3 merged 1 commit intonextfrom
dyc3/fix-raw-diagnostics-in-embedded

Conversation

@dyc3
Copy link
Contributor

@dyc3 dyc3 commented Feb 13, 2026

Summary

The primary reason for this fix is to the diagnostic locations as outlined in #9057, but other snapshots would indicate that other diagnostics were slightly off as well. I went and checked the diffs for the snapshots that were affected, and this does appear to also fix an off-by-one error with how we were reporting line numbers in embedded snippets.

Changeset included this time because i think it could affect things that have already released, but I haven't bothered to check yet. Can backport the fix if we think it's necessary.

Tbh, I'm not confident that this is the correct fix, but it does fix the issue.

Generated with kimi k2.5, and then i ran out of free quota on opencode so i switched to big pickle.

fixes #9057

Test Plan

added a cli test, snapshots.

Docs

@changeset-bot
Copy link

changeset-bot bot commented Feb 13, 2026

🦋 Changeset detected

Latest commit: f26b1da

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added A-CLI Area: CLI A-Linter Area: linter A-LSP Area: language server protocol labels Feb 13, 2026
@dyc3 dyc3 marked this pull request as ready for review February 14, 2026 00:15
Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit unfortunate we need to resort to a visitor, but I think it's the correct solution with what we have.

The other solution would be to remove the Raw variant for typed diagnostics, but it would require some refactor

@dyc3 dyc3 merged commit 0e47f5a into next Feb 14, 2026
17 checks passed
@dyc3 dyc3 deleted the dyc3/fix-raw-diagnostics-in-embedded branch February 14, 2026 13:47
@github-actions github-actions bot mentioned this pull request Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI A-Linter Area: linter A-LSP Area: language server protocol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants