diff --git a/Sources/Commands/VersionCommand.swift b/Sources/Commands/VersionCommand.swift index 22e7aa881..4de1cdaeb 100644 --- a/Sources/Commands/VersionCommand.swift +++ b/Sources/Commands/VersionCommand.swift @@ -8,7 +8,7 @@ public struct VersionCommand: FrontendCommand { abstract: "Display the version of Periphery" ) - public init() { } + public init() { } public func run() throws { print(PeripheryVersion) diff --git a/Tests/FrontendTests/ScanTests.swift b/Tests/FrontendTests/ScanTests.swift index f4ca3f749..0bd56a153 100644 --- a/Tests/FrontendTests/ScanTests.swift +++ b/Tests/FrontendTests/ScanTests.swift @@ -6,35 +6,35 @@ import Commands import Shared final class ScanTests: XCTestCase { - fileprivate let packageRootPath = URL(fileURLWithPath: #file).pathComponents - .prefix(while: { $0 != "Tests" }).joined(separator: "/").dropFirst() - - func testScanWorkspaceWithPath() async throws { - var file = FilePath(String(packageRootPath)) - - file.append(FilePath.Component("fixtures")) - file.append(FilePath.Component("DefaultiOSProject")) - file.append(FilePath.Component("DefaultiOSProject.xcodeproj")) + fileprivate let packageRootPath = URL(fileURLWithPath: #file).pathComponents + .prefix(while: { $0 != "Tests" }).joined(separator: "/").dropFirst() - let command = try ScanCommand.parse( - [ - "--project", "\(file.url.path())", - "--schemes", "DefaultiOSProject" - ] - ) - try command.run() - - XCTAssertTrue(LoggerStorage.collectedLogs.contains( - [ - "* Inspecting project...", - "* Building DefaultiOSProject...", - "* Indexing...", - "* Analyzing...", - "", - "* No unused code detected." - ] - ) - ) - } + func testScanWorkspaceWithPath() async throws { + var file = FilePath(String(packageRootPath)) + + file.append(FilePath.Component("fixtures")) + file.append(FilePath.Component("DefaultiOSProject")) + file.append(FilePath.Component("DefaultiOSProject.xcodeproj")) + + let command = try ScanCommand.parse( + [ + "--project", "\(file.url.path())", + "--schemes", "DefaultiOSProject" + ] + ) + try command.run() + + XCTAssertTrue(LoggerStorage.collectedLogs.contains( + [ + "* Inspecting project...", + "* Building DefaultiOSProject...", + "* Indexing...", + "* Analyzing...", + "", + "* No unused code detected." + ] + ) + ) + } } - + diff --git a/fixtures/DefaultiOSProject/DefaultiOSProject/ContentView.swift b/fixtures/DefaultiOSProject/DefaultiOSProject/ContentView.swift index 99a0b15ef..b000a7e46 100644 --- a/fixtures/DefaultiOSProject/DefaultiOSProject/ContentView.swift +++ b/fixtures/DefaultiOSProject/DefaultiOSProject/ContentView.swift @@ -1,10 +1,3 @@ -// -// ContentView.swift -// DefaultiOSProject -// -// Created by Roman Gorbenko on 15.08.2024. -// - import SwiftUI struct ContentView: View { diff --git a/fixtures/DefaultiOSProject/DefaultiOSProject/DefaultiOSProjectApp.swift b/fixtures/DefaultiOSProject/DefaultiOSProject/DefaultiOSProjectApp.swift index 70a26feda..39276d078 100644 --- a/fixtures/DefaultiOSProject/DefaultiOSProject/DefaultiOSProjectApp.swift +++ b/fixtures/DefaultiOSProject/DefaultiOSProject/DefaultiOSProjectApp.swift @@ -1,10 +1,3 @@ -// -// DefaultiOSProjectApp.swift -// DefaultiOSProject -// -// Created by Roman Gorbenko on 15.08.2024. -// - import SwiftUI @main