Skip to content

fix: avoid backtracking in diagnostic and package-name parsing - #16

Merged
phtn merged 1 commit into
mainfrom
fix/code-scanning-alerts
Oct 4, 2026
Merged

phtn merged 1 commit into
mainfrom
fix/code-scanning-alerts

Conversation

@phtn

@phtn phtn commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

Replace the backtracking regexes in diagnostic suffix removal and scaffold package-name trimming with bounded suffix parsing and linear scans. Long runs of whitespace or punctuation now finish in linear time while preserving the existing formatting and normalization behavior.

Addresses code-scanning alerts #1 and #3.

Validation: the full bun run check passed (268 tests); after adding a long-input regression test and tightening location parsing, 117 compiler tests and all package typechecks passed. git diff --check passed.

@phtn
phtn merged commit 41c6d3c into main Oct 4, 2026
5 checks passed
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