Skip to content

feat(apidocs): Show path:line for findings in the report card - #132045

Merged
akhilp117 merged 2 commits into
masterfrom
akhilpindiprolu/eng-9080-path-line
Nov 20, 2026
Merged

akhilp117 merged 2 commits into
masterfrom
akhilpindiprolu/eng-9080-path-line

Conversation

@akhilp117

@akhilp117 akhilp117 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor
image (part 2 of 2 for [issue](https://linear.app/getsentry/issue/ENG-9080/show-fileline-for-findings-in-the-report-card-proper-str-rules) This PR makes it so that cmd+click in the terminal makes `--team` and `--compare` print `path:line`. Line numbers aren't stored in `exceptions.json` (on purpose so code moving up or down doesn't change the file i.e, adding an import, etc), so they're worked out when printing. `find_lines` rescans only the files of the entries being printed and matches each finding back to its entry by signature. The plain table doesn't print entries one per line, so it doesn't rescan anything.

A few things worth knowing:

  • An entry with more than one finding prints a full path:line for each one, so every finding is clickable (i.e S026 src/x.py:103, src/x.py:105 ProjectUsersEndpoint.get query:query (x2))
  • If the rescan can't find an entry it prints the plain path with "(not in current code)"
  • In --compare, new and changed entries get lines. Fixed entries keep the plain path since they're not in the code anymore
  • Lines always come from the current checkout, not from the older file passed to --compare

On the real file like --team issues-feed takes about 0.1 secons and finds a line for all 68 entries

@akhilp117
akhilp117 requested a review from a team as a code owner November 20, 2026 18:56
@linear-code

linear-code Bot commented Nov 20, 2026

Copy link
Copy Markdown

ENG-9080

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 20, 2026
Comment thread tools/api_guidelines/report_card.py Resolved

@DominikB2014 DominikB2014 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lgtm, just one comment on sending some metrics

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 39712ef. Configure here.

Comment thread tools/api_guidelines/report_card.py Resolved
@akhilp117
akhilp117 force-pushed the akhilpindiprolu/eng-9080-path-line branch from 39712ef to 569c094 Compare November 20, 2026 21:04
@akhilp117
akhilp117 force-pushed the akhilpindiprolu/eng-9080-path-line branch from 569c094 to 8140b83 Compare November 20, 2026 21:11
@akhilp117
akhilp117 merged commit 0a0abaf into master Nov 20, 2026
73 checks passed
@akhilp117
akhilp117 deleted the akhilpindiprolu/eng-9080-path-line branch November 20, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants