Skip to content

fix: secret span offsets use line number not find()#311

Open
Chessing234 wants to merge 1 commit into
allenai:mainfrom
Chessing234:fix/code-secrets-line-offset
Open

fix: secret span offsets use line number not find()#311
Chessing234 wants to merge 1 commit into
allenai:mainfrom
Chessing234:fix/code-secrets-line-offset

Conversation

@Chessing234

Copy link
Copy Markdown

Summary

  • CodeSecretsTagger used text.find(line), which maps duplicate lines to the first occurrence.
  • Compute line start from the reported line index.

Test plan

  • Repeated identical lines: secret on line 2 gets the later offset

Made with Cursor

Duplicate line content made text.find() attribute secrets to the wrong offset.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant