[WIP] Fix ignore patterns for files in node_modules paths#242
Draft
Copilot wants to merge 1 commit into
Draft
Conversation
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.
Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.
Original prompt
This section details on the original issue you should resolve
<issue_title>Ignore patterns fail for files containing
node_modulesin git submodule paths</issue_title><issue_description>## Bug Description
When ignoring a git submodule directory (e.g.,
TypeScript/**), files that containnode_modules,nodeModules, orNodeModulesSearchin their path are incorrectly included in the output despite matching the ignore pattern.Environment
Reproduction Steps
Expected Behavior
All files under
TypeScript/should be ignored.Actual Behavior
While 74,742 TypeScript submodule files are correctly skipped, 45 files leak through. All 45 files contain
node_modules,nodeModules, orNodeModulesSearchin their path:Debug Evidence
Running with
--debugshows inconsistent behavior for similar paths:File correctly skipped:
File incorrectly included:
Both paths match
TypeScript/**pattern identically, but one is skipped and one is not. The only difference is the presence ofnodeModulesin the directory name.Analysis
There appears to be special handling for
node_modulespaths that is incorrectly un-ignoring these files even when they match explicit ignore patterns. This may be related to:node_modules/**ignore pattern interaction with user patternsnode_modulessubstringFull List of Leaked Files
All 45 files incorrectly included (click to expand)