feat: apply .projectile ignore/ensure patterns to file listing#1970
Open
takeokunn wants to merge 1 commit intobbatsov:masterfrom
Open
feat: apply .projectile ignore/ensure patterns to file listing#1970takeokunn wants to merge 1 commit intobbatsov:masterfrom
takeokunn wants to merge 1 commit intobbatsov:masterfrom
Conversation
- Apply .projectile ignore and ensure patterns to file listing, not just grep - Respect patterns prefixed with - in projectile-remove-ignored - Filter out path traversal patterns (containing ..) in projectile-normalise-patterns for security - Update and expand tests for ignore/ensure pattern handling - Update documentation and changelog for new ignore behavior
85e4991 to
b967c39
Compare
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.
Summary
Fix #1771 - Apply
.projectileignore/ensure patterns to file listing using regex matching for recursive glob support.Changes
file-expand-wildcardswithwildcard-to-regexpfor pattern matchingprojectile--pattern-to-regex: Convert glob pattern to regexprojectile--file-matches-patterns-p: Match patterns against file paths/(e.g.,*.text) match against basename (recursive)/(e.g.,src/*.c) match against full relative pathprojectile-remove-ignoredto use new pattern matching..) inprojectile-normalise-patternsRationale
The original implementation used
file-expand-wildcardswhich only searches the current directory and requires files to exist on the filesystem.By using
wildcard-to-regexp, patterns are converted to regular expressions that can match against any file path string, enabling recursive matching across all subdirectories.Test Coverage
*.text,*.log)!)..)