feat: provide involved node-id for most linters!#2206
Merged
EagleoutIce merged 2 commits intomainfrom Jan 5, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an involvedId field to linting results to track which AST node is associated with each linting issue, enabling better traceability and tooling support.
- Adds
involvedId: NodeId | undefinedfield to theLintingResultinterface - Updates 8 linter rules to populate the
involvedIdfield from the relevant AST nodes - Modifies test infrastructure to exclude
involvedIdfrom test assertions for easier test maintenance - Implements
flattenInvolvedNodesin the linter query to extract involved node IDs
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/linter/linter-format.ts |
Adds the involvedId field to the LintingResult interface with documentation |
test/functionality/_helper/linter.ts |
Introduces cleanUpLintingResult helper to strip involvedId from test comparisons |
test/functionality/linter/lint-dataframe-access-validation.test.ts |
Updates test type to exclude involvedId from expected results |
src/queries/catalog/linter-query/linter-query-format.ts |
Implements flattenInvolvedNodes to collect node IDs from linting results |
src/linter/rules/useless-loop.ts |
Populates involvedId from loop node |
src/linter/rules/unused-definition.ts |
Populates involvedId from definition node |
src/linter/rules/seeded-randomness.ts |
Populates involvedId from consumer call node |
src/linter/rules/naming-convention.ts |
Populates involvedId from identifier node |
src/linter/rules/function-finder-util.ts |
Populates involvedId from function call node |
src/linter/rules/file-path-validity.ts |
Populates involvedId from file read node |
src/linter/rules/dead-code.ts |
Sets involvedId to undefined for combined dead code ranges |
src/linter/rules/dataframe-access-validation.ts |
Populates involvedId from data frame access node |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Author
|
This pull request is included in v2.8.5 (see Release v2.8.5 (Provide IDs in linting rules)). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.