Skip to content

Conversation

@brendanjryan
Copy link
Contributor

@brendanjryan brendanjryan commented Jan 19, 2026

Problem

PR x shows all lint warnings with line number 1:

/home/runner/work/purl/purl/lib/src/keystore/encrypt.rs:1 [warning] no-unwrap-in-lib: ...

This is happening because issue.range?.start?.line is undefined in the ast-grep JSON output in CI, causing all line numbers to default to 1 (see shared.ts:94).

Solution

This PR adds debug logging to understand what the actual JSON structure looks like when range data is missing.

Next Steps

Once we see the logs, we can:

  1. Fix the JSON parsing to handle the actual format
  2. Or investigate why ast-grep isn't outputting range data in CI

To Test

Use this branch temporarily in a workflow to see the putout

uses: tempoxyz/lints@fix-line-numbers-debug

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.

2 participants