Skip to content

Commit 0888ff1

Browse files
committed
Use relative display path in output for duplicated files
1 parent b09d84c commit 0888ff1

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Source/SwiftLintFramework/Configuration+CommandLine.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,7 @@ extension Configuration {
137137
if !duplicateFileNames.contains(basename) {
138138
return basename
139139
}
140-
141-
var pathComponents = path.pathComponents
142-
for component in rootDirectory.pathComponents where pathComponents.first == component {
143-
pathComponents.removeFirst()
144-
}
145-
146-
return pathComponents.reduce(URL(filePath: "/")) { $0.appending(path: $1) }.filepath
140+
return path.relativeDisplayPath
147141
}
148142

149143
private func linters(for filesPerConfiguration: [Configuration: [SwiftLintFile]],

0 commit comments

Comments
 (0)