From d1833e8384976143706321c99f6b7312e8fe219f Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Sat, 7 Dec 2024 13:42:36 +0900 Subject: [PATCH] Remove unused ProcessOutputParser type (#507) --- .../Parsers/ProcessOutputParser.swift | 33 ------------------- .../TestRunners/TestsParser.swift | 2 -- 2 files changed, 35 deletions(-) delete mode 100644 Sources/CartonHelpers/Parsers/ProcessOutputParser.swift diff --git a/Sources/CartonHelpers/Parsers/ProcessOutputParser.swift b/Sources/CartonHelpers/Parsers/ProcessOutputParser.swift deleted file mode 100644 index a95df399..00000000 --- a/Sources/CartonHelpers/Parsers/ProcessOutputParser.swift +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020 Carton contributors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import CartonCore - -public protocol ProcessOutputParser { - /// Parse the output of a `Process`, format it, then output in the `InteractiveWriter`. - func parse(_ output: String, _ terminal: InteractiveWriter) - /// Under what conditions should the output be parsed? - var parsingConditions: ParsingCondition { get } - init() -} - -public struct ParsingCondition: OptionSet { - public let rawValue: Int - public init(rawValue: Int) { - self.rawValue = rawValue - } - - public static let success: Self = .init(rawValue: 1 << 0) - public static let failure: Self = .init(rawValue: 1 << 1) -} diff --git a/Sources/carton-frontend-slim/TestRunners/TestsParser.swift b/Sources/carton-frontend-slim/TestRunners/TestsParser.swift index c695ee1a..554fd3be 100644 --- a/Sources/carton-frontend-slim/TestRunners/TestsParser.swift +++ b/Sources/carton-frontend-slim/TestRunners/TestsParser.swift @@ -100,8 +100,6 @@ extension StringProtocol { public struct FancyTestsParser: TestsParser { public init() {} - public let parsingConditions: ParsingCondition = [.success, .failure] - // swiftlint:disable force_try // swiftlint:disable line_length enum Regex {