Skip to content

Commit

Permalink
Run swift-format
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalonunez authored and github-actions[bot] committed Mar 31, 2023
1 parent 84e6426 commit 1037173
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
32 changes: 16 additions & 16 deletions Sources/ross/RossRunner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ struct RossRunner {
- Parameter directoryURL: The URL of the directory to clean.
*/
private func cleanFiles(in directoryURL: URL) async throws {
// try await withThrowingTaskGroup(of: Void.self) { group in
guard let enumerator = fileManager.enumerator(atPath: directoryURL.path) else {
throw RossRunnerError.failedToCreateEnumerator
// try await withThrowingTaskGroup(of: Void.self) { group in
guard let enumerator = fileManager.enumerator(atPath: directoryURL.path) else {
throw RossRunnerError.failedToCreateEnumerator
}

while let file = enumerator.nextObject() as? String {
guard file.hasSuffix(".swift") else {
continue
}

while let file = enumerator.nextObject() as? String {
guard file.hasSuffix(".swift") else {
continue
}
// group.addTask {
let fileURL = directoryURL.appendingPathComponent(file)
try await cleanFile(at: fileURL)
// }
}

// try await group.waitForAll()
// }
// group.addTask {
let fileURL = directoryURL.appendingPathComponent(file)
try await cleanFile(at: fileURL)
// }
}

// try await group.waitForAll()
// }
}

/**
Expand Down
5 changes: 2 additions & 3 deletions Tests/RossTests/RossTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ final class RossTests: XCTestCase {
XCTAssertEqual(actual, expected)
}


func testEnum() async throws {
let fileURL = examplesDirectory.appendingPathComponent("Test.swift")

Expand Down Expand Up @@ -262,7 +261,7 @@ final class RossTests: XCTestCase {

let expected = """
class Foo {
init() { }
}
"""
Expand Down Expand Up @@ -348,7 +347,7 @@ final class RossTests: XCTestCase {
try await cli.run()

let expected = #"""
Expand Down

0 comments on commit 1037173

Please sign in to comment.