Skip to content

better support for sourcePath - #1

Merged
jetmore merged 1 commit into
main-gffrom
support-sourcePath
Oct 19, 2026
Merged

jetmore merged 1 commit into
main-gffrom
support-sourcePath

Conversation

@jetmore

@jetmore jetmore commented Oct 19, 2026

Copy link
Copy Markdown

sourcePath in the original is strange. It kind of looks like it's designed to be mutually exclusive with analyzeModifiedFilesOnly (as I type this, I see that's documented under analyzeModifiedFilesOnly, but not under sourcePath)

This change allows sourcePath and analyzeModifiedFilesOnly to work together. It might be brittle but it works for our use case

sourcePath in the original is strange.  It kind of looks like it's designed to be mutually exclusive with analyzeModifiedFilesOnly (as I type this, I see that's documented under analyzeModifiedFilesOnly, but not under sourcePath)

This change allows sourcePath and analyzeModifiedFilesOnly to work together.  It might be brittle but it works for our use case
Copilot AI lite review requested due to automatic review settings October 19, 2026 20:34
@jetmore
jetmore merged commit 312de63 into main-gf Oct 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Path prefixing and default sourcePath handling cause incorrect file filtering.

2 open issues
What changed in this PR

Updates modified-file handling to support sourcePath with analyzeModifiedFilesOnly.

Changes:

  • Normalizes source paths.
  • Prefixes and filters modified filenames.
File Summary
src/​util.ts Adjusts modified-file extraction and source-path filtering.

Review effort: Lite

Comment thread src/util.ts
// add trailing slash
sourcePath =
sourcePath !== '.' ? path.normalize(`${sourcePath}/`) : sourcePath
sourcePath = path.normalize(`${sourcePath}/`)
Comment thread src/util.ts
Comment on lines +366 to 367
.map(f => sourcePath + f)
.filter(f => sourcePath === '.' || f.startsWith(sourcePath))
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.

2 participants