Skip to content

Commit 110de34

Browse files
authored
Bump swift-format to 5.9 (#340)
Bump swift-format to 5.9 ### Motivation As per #175. ### Modifications Updated to swift-format 5.9, updated code to pass soundness. ### Result Using swift-format 5.9. ### Test Plan Soundness passed. Reviewed by: dnadoba Builds: ✔︎ pull request validation (5.10) - Build finished. ✔︎ pull request validation (5.8) - Build finished. ✔︎ pull request validation (5.9) - Build finished. ✔︎ pull request validation (compatibility test) - Build finished. ✔︎ pull request validation (docc test) - Build finished. ✔︎ pull request validation (integration test) - Build finished. ✔︎ pull request validation (nightly) - Build finished. ✔︎ pull request validation (soundness) - Build finished. #340
1 parent 4ebe476 commit 110de34

File tree

10 files changed

+16
-2
lines changed

10 files changed

+16
-2
lines changed

Sources/_OpenAPIGeneratorCore/PlatformChecks.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
// Emit a compiler error if this library is linked with a target in an adopter
1616
// project.
1717
#if !(os(macOS) || os(Linux))
18-
#error("_OpenAPIGeneratorCore is only to be used by swift-openapi-generator itself—your target should not link this library or the command line tool directly.")
18+
#error(
19+
"_OpenAPIGeneratorCore is only to be used by swift-openapi-generator itself—your target should not link this library or the command line tool directly."
20+
)
1921
#endif
2022

2123
#if SWIFT_OPENAPI_STRICT_CONCURRENCY

Tests/OpenAPIGeneratorCoreTests/TestUtilities.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import OpenAPIKit
1818
@testable import _OpenAPIGeneratorCore
1919

2020
class Test_Core: XCTestCase {
21+
22+
/// Setup method called before the invocation of each test method in the class.
2123
override func setUp() async throws {
2224
try await super.setUp()
2325
continueAfterFailure = false

Tests/OpenAPIGeneratorCoreTests/Translator/TypeAssignment/Test_TypeMatcher.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import OpenAPIKit
1717

1818
final class Test_TypeMatcher: Test_Core {
1919

20+
/// Setup method called before the invocation of each test method in the class.
2021
override func setUp() async throws {
2122
try await super.setUp()
2223
continueAfterFailure = false

Tests/OpenAPIGeneratorReferenceTests/CompatabilityTest.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ final class CompatibilityTest: XCTestCase {
2828
let compatibilityTestParallelCodegen = getBoolEnv("SWIFT_OPENAPI_COMPATIBILITY_TEST_PARALLEL_CODEGEN") ?? false
2929
let compatibilityTestNumBuildJobs = getIntEnv("SWIFT_OPENAPI_COMPATIBILITY_TEST_NUM_BUILD_JOBS")
3030

31+
/// Setup method called before the invocation of each test method in the class.
3132
override func setUp() async throws {
3233
continueAfterFailure = false
3334
try XCTSkipUnless(compatibilityTestEnabled)

Tests/OpenAPIGeneratorReferenceTests/FileBasedReferenceTests.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ extension TestConfig {
3636

3737
/// Tests that the generator produces Swift files that match a reference.
3838
class FileBasedReferenceTests: XCTestCase {
39+
40+
/// Setup method called before the invocation of each test method in the class.
3941
override func setUp() {
4042
super.setUp()
4143
continueAfterFailure = false
@@ -56,6 +58,7 @@ class FileBasedReferenceTests: XCTestCase {
5658

5759
var referenceTestResourcesDirectory: URL! = nil
5860

61+
/// Setup method called before the invocation of each test method in the class.
5962
override func setUpWithError() throws {
6063
self.referenceTestResourcesDirectory = try XCTUnwrap(
6164
Bundle.module.url(forResource: "Resources", withExtension: nil),

Tests/PetstoreConsumerTests/Test_Client.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ final class Test_Client: XCTestCase {
2828
}
2929
}
3030

31+
/// Setup method called before the invocation of each test method in the class.
3132
override func setUp() async throws {
3233
try await super.setUp()
3334
continueAfterFailure = false

Tests/PetstoreConsumerTests/Test_Playground.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import OpenAPIRuntime
1616
import PetstoreConsumerTestCore
1717

1818
final class Test_Playground: XCTestCase {
19+
20+
/// Setup method called before the invocation of each test method in the class.
1921
override func setUp() async throws {
2022
try await super.setUp()
2123
continueAfterFailure = false

Tests/PetstoreConsumerTests/Test_Server.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ final class Test_Server: XCTestCase {
2525
}
2626
}
2727

28+
/// Setup method called before the invocation of each test method in the class.
2829
override func setUp() async throws {
2930
try await super.setUp()
3031
continueAfterFailure = false

Tests/PetstoreConsumerTests/Test_Types.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import PetstoreConsumerTestCore
1717

1818
final class Test_Types: XCTestCase {
1919

20+
/// Setup method called before the invocation of each test method in the class.
2021
override func setUp() async throws {
2122
try await super.setUp()
2223
continueAfterFailure = false

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RUN mkdir -p $HOME/.tools
1717
RUN echo 'export PATH="$HOME/.tools:$PATH"' >> $HOME/.profile
1818

1919
# swift-format
20-
ARG swiftformat_version=508.0.0
20+
ARG swiftformat_version=509.0.0
2121
RUN git clone --branch $swiftformat_version --depth 1 https://github.com/apple/swift-format $HOME/.tools/swift-format-source
2222
RUN cd $HOME/.tools/swift-format-source && swift build -c release
2323
RUN ln -s $HOME/.tools/swift-format-source/.build/release/swift-format $HOME/.tools/swift-format

0 commit comments

Comments
 (0)