Improve performance of excluded files filter#6342
Merged
SimplyDanny merged 6 commits intomainfrom Dec 7, 2025
Merged
Conversation
a8c9eee to
bf134fe
Compare
Generated by 🚫 Danger |
Merged
884c016 to
0fcf778
Compare
0fcf778 to
3eb86d4
Compare
dc556ac to
1bb433c
Compare
The current algorithm is like "collect all included files and subtract all excluded files". Collecting all included and all excluded files relies on the file system. This can become slow when the patterns used to exclude files resolve to a large number of files. The new approach only collects all lintable files and checks them against the exclude patterns. This can be done by in-memory string-regex-match and does therefore not require file system accesses. The new implementation also no longer traverses directories that already match an exclude pattern. (cherry picked from commit 152355e) # Conflicts: # Source/SwiftLintFramework/Configuration/Configuration+LintableFiles.swift
1bb433c to
7d9b5fb
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.
This is another try to address