Skip to content

impact / path: --in chooses among the files a partial file:line path matches - #1735

Merged
swapnilpaliwal-sd merged 1 commit into
0.1.7from
loop/ja-is1666
Sep 29, 2026
Merged

swapnilpaliwal-sd merged 1 commit into
0.1.7from
loop/ja-is1666

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

--in now chooses among the files a partial file:line path matches, for impact and path.

  • G.line_files narrows the matches by the scope: one file under it is the answer, labelled with its full path (runA (at packages/a/src/index.js:2)); two or more are refused, listing only those; none keeps the full list and says so.
  • The same shape broke impact's field lookup: test.js:6 among 17 test.js answered for one file's const without refusing. It now uses the same file resolution.
  • New golden case javascript/fileline-partial-path-in-scope (5 index.js, 2 config.js) with controls: no --in, full path, a single-match partial path, a scope holding two files, a scope holding none.

Checked: fixture 20/20 checks (both file:line cases); a real Express app (17 test.js, 798 call edges, graph unchanged): impact test.js:6 --in blog now answers blog/test.js:6 (0.28s, was 0.25s); the csrf/test.js:6 control is unchanged. The full case suite was still running locally when this PR opened.

Closes #1666

…matches

A file:line whose partial path (a basename, or dir/file) matches several
indexed files was refused before --in was applied, so the scope could not
pick among them. G.line_files now narrows the matches by --in: one file
under the scope is the answer, labelled with its full path; two or more are
the refusal's list; none keeps the whole list and says so.

impact's field lookup for file:line matched the line in every file the path
ends, so test.js:6 among 17 test.js answered for one file's const; it now
resolves the file the same way and refuses when the path is ambiguous.

Closes #1666

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit ebcc41d into 0.1.7 Sep 29, 2026
8 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the loop/ja-is1666 branch September 29, 2026 01:23
@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor Author

Rebased onto 0.1.7 (after #1734; kept both the line-outside-file check and the scope choice). file:line cases 45/45 incl. fileline-line-outside-file; script_tests ok. Full local case suite before the rebase: 749/761, and the 11 failing checks fail identically with the 0.1.7 scripts.

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor Author

Correction: the merged commit already carried the same rebase onto #1734; my later push was rejected and nothing further went in. The check results above hold for that same resolution.

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