Skip to content

Commit

Permalink
Set the excluded files list once when getting lint files (#5330)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladvlasov256 authored Nov 10, 2023
1 parent 17b5880 commit 3a65032
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Source/swiftlint/Extensions/Configuration+CommandLine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,14 @@ extension Configuration {

queuedPrintError("\(visitor.action) Swift files \(filesInfo)")
}
let excludeLintableFilesBy = visitor.useExcludingByPrefix
? Configuration.ExcludeBy.prefix
: .paths(excludedPaths: excludedPaths())
return visitor.paths.flatMap {
self.lintableFiles(
inPath: $0,
forceExclude: visitor.forceExclude,
excludeBy: visitor.useExcludingByPrefix
? .prefix
: .paths(excludedPaths: excludedPaths()))
excludeBy: excludeLintableFilesBy)
}
}

Expand Down

0 comments on commit 3a65032

Please sign in to comment.