From 815f405aa0a12223deae4cc1fd87f0114b141da5 Mon Sep 17 00:00:00 2001 From: Wesley de Groot Date: Thu, 14 Sep 2023 20:47:48 +0200 Subject: [PATCH] Fixed Swiftlint errors --- .../Services/Models/Client/Rev-List.swift | 9 +++------ .../Version-Control/Services/Models/Diff/Raw-Diff.swift | 3 +-- .../Version-Control/Utils/Helpers/DefaultBranch.swift | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Sources/Version-Control/Services/Models/Client/Rev-List.swift b/Sources/Version-Control/Services/Models/Client/Rev-List.swift index bdb17f31..e4470820 100644 --- a/Sources/Version-Control/Services/Models/Client/Rev-List.swift +++ b/Sources/Version-Control/Services/Models/Client/Rev-List.swift @@ -15,8 +15,7 @@ import Foundation /// /// Each parameter can be the commit SHA or a ref name, or specify an empty /// string to represent HEAD. -// swiftlint:disable:next identifier_name -private func revRange(from: String, to: String) -> String { +private func revRange(from: String, to: String) -> String { // swiftlint:disable:this identifier_name return "\(from)..\(to)" } @@ -26,8 +25,7 @@ private func revRange(from: String, to: String) -> String { /// /// Each parameter can be the commit SHA or a ref name, or specify an empty /// string to represent HEAD. -// swiftlint:disable:next identifier_name -private func revRangeInclusive(from: String, to: String) -> String { +private func revRangeInclusive(from: String, to: String) -> String { // swiftlint:disable:this identifier_name return "\(from)^...\(to)" } @@ -37,8 +35,7 @@ private func revRangeInclusive(from: String, to: String) -> String { /// /// Each parameter can be the commit SHA or a ref name, or you can use an empty /// string to represent HEAD. -// swiftlint:disable:next identifier_name -private func revSymmetricDifference(from: String, to: String) -> String { +private func revSymmetricDifference(from: String, to: String) -> String { // swiftlint:disable:this identifier_name return "\(from)...\(to)" } diff --git a/Sources/Version-Control/Services/Models/Diff/Raw-Diff.swift b/Sources/Version-Control/Services/Models/Diff/Raw-Diff.swift index 9d54ed6c..24a6c9b3 100644 --- a/Sources/Version-Control/Services/Models/Diff/Raw-Diff.swift +++ b/Sources/Version-Control/Services/Models/Diff/Raw-Diff.swift @@ -14,8 +14,7 @@ public enum DiffHunkExpansionType: String { /// The hunk header can be expanded up exclusively. Only the first hunk can be /// expanded up exclusively. - // swiftlint:disable:next identifier_name - case up = "Up" + case up = "Up" // swiftlint:disable:this identifier_name /// The hunk header can be expanded down exclusively. Only the last hunk (if /// it's the dummy hunk with only one line) can be expanded down exclusively. diff --git a/Sources/Version-Control/Utils/Helpers/DefaultBranch.swift b/Sources/Version-Control/Utils/Helpers/DefaultBranch.swift index 305155cb..3b7723c0 100644 --- a/Sources/Version-Control/Utils/Helpers/DefaultBranch.swift +++ b/Sources/Version-Control/Utils/Helpers/DefaultBranch.swift @@ -24,8 +24,8 @@ public struct DefaultBranch { public let suggestedBranchNames: [String] = ["main, master"] /// Returns the configured default branch when creating new repositories - // TODO: Bug where global config value is not being processed correctly public func getConfiguredDefaultBranch() throws -> String? { + // TODO: Bug where global config value is not being processed correctly return try getGlobalConfigVlaue(name: defaultBranchSettingName) }