Repository navigation
path / impact: a file:line outside the file is refused with the file's length - #1734
Merged
Merged
Conversation
…s length (#1601) Line 0, or a line past the last, spans no callable and fell through to the module node, so it was answered as the file's top-level code as if that line existed. Both verbs resolve file:line in G._resolve; it now refuses a line below 1 and, reading the file on disk, a line past its end. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com> Co-Authored-By: Claude <noreply@anthropic.com>
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 29, 2026 01:08
This was referenced Sep 29, 2026
Merged
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.
A
file:lineat line 0 or past the file's last line fell through to the module node and was answered as the file's top-level code.impactandpathboth resolvefile:lineinG._resolve, which now refuses such a line and gives the file's length:src/services/userService.js has 4 lines; line 99 is not in it.tests/cases/javascript/fileline-line-outside-file: line 0, past-end, partial path, no trailing newline; controls: last line still answers as top-level code, a line in a function answers for it, an unindexed file is refused as before.no_symlink.py2/2; on a real Express app:0/:999refused, last line unchanged, 2041 edges before and after (query-only). Fulltests/run.py: the only failures (7) also fail on a clean 0.1.7 checkout, in cases this change does not touch.Closes #1601