From 67973cb41930f1ab9dd706e104f48c30904db920 Mon Sep 17 00:00:00 2001 From: Roman Lavrov Date: Mon, 8 Dec 2025 10:59:51 -0500 Subject: [PATCH] join / -> reduce append --- Source/SwiftLintCore/Models/Location.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/SwiftLintCore/Models/Location.swift b/Source/SwiftLintCore/Models/Location.swift index 1c600ac98..b17368a38 100644 --- a/Source/SwiftLintCore/Models/Location.swift +++ b/Source/SwiftLintCore/Models/Location.swift @@ -32,7 +32,9 @@ public struct Location: CustomStringConvertible, Comparable, Codable, Sendable { return file } - return fileComponents.dropFirst(baseComponents.count).joined(separator: "/") + return fileComponents.dropFirst(baseComponents.count).reduce(into: URL(filePath: "")) { + $0.append(component: $1) + }.relativePath } /// Creates a `Location` by specifying its properties directly.