Skip to content

Commit fea281e

Browse files
committed
Fix swift-format
1 parent 2f3446f commit fea281e

File tree

8 files changed

+69
-26
lines changed

8 files changed

+69
-26
lines changed

Diff for: .swift-format

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"version" : 1,
3+
"indentation" : {
4+
"spaces" : 4
5+
},
6+
"tabWidth" : 4,
7+
"fileScopedDeclarationPrivacy" : {
8+
"accessLevel" : "private"
9+
},
10+
"spacesAroundRangeFormationOperators" : false,
11+
"indentConditionalCompilationBlocks" : false,
12+
"indentSwitchCaseLabels" : false,
13+
"lineBreakAroundMultilineExpressionChainComponents" : false,
14+
"lineBreakBeforeControlFlowKeywords" : false,
15+
"lineBreakBeforeEachArgument" : true,
16+
"lineBreakBeforeEachGenericRequirement" : true,
17+
"lineLength" : 120,
18+
"maximumBlankLines" : 1,
19+
"respectsExistingLineBreaks" : true,
20+
"prioritizeKeepingFunctionOutputTogether" : true,
21+
"rules" : {
22+
"AllPublicDeclarationsHaveDocumentation" : false,
23+
"AlwaysUseLiteralForEmptyCollectionInit" : false,
24+
"AlwaysUseLowerCamelCase" : false,
25+
"AmbiguousTrailingClosureOverload" : true,
26+
"BeginDocumentationCommentWithOneLineSummary" : false,
27+
"DoNotUseSemicolons" : true,
28+
"DontRepeatTypeInStaticProperties" : true,
29+
"FileScopedDeclarationPrivacy" : true,
30+
"FullyIndirectEnum" : true,
31+
"GroupNumericLiterals" : true,
32+
"IdentifiersMustBeASCII" : true,
33+
"NeverForceUnwrap" : false,
34+
"NeverUseForceTry" : false,
35+
"NeverUseImplicitlyUnwrappedOptionals" : false,
36+
"NoAccessLevelOnExtensionDeclaration" : true,
37+
"NoAssignmentInExpressions" : true,
38+
"NoBlockComments" : true,
39+
"NoCasesWithOnlyFallthrough" : true,
40+
"NoEmptyTrailingClosureParentheses" : true,
41+
"NoLabelsInCasePatterns" : true,
42+
"NoLeadingUnderscores" : false,
43+
"NoParensAroundConditions" : true,
44+
"NoVoidReturnOnFunctionSignature" : true,
45+
"OmitExplicitReturns" : true,
46+
"OneCasePerLine" : true,
47+
"OneVariableDeclarationPerLine" : true,
48+
"OnlyOneTrailingClosureArgument" : true,
49+
"OrderedImports" : true,
50+
"ReplaceForEachWithForLoop" : true,
51+
"ReturnVoidInsteadOfEmptyTuple" : true,
52+
"UseEarlyExits" : false,
53+
"UseExplicitNilCheckInConditions" : false,
54+
"UseLetInEveryBoundCaseVariable" : false,
55+
"UseShorthandTypeNames" : true,
56+
"UseSingleLinePropertyGetter" : false,
57+
"UseSynthesizedInitializer" : false,
58+
"UseTripleSlashForDocumentationComments" : true,
59+
"UseWhereClausesInForLoops" : false,
60+
"ValidateDocumentationComments" : false
61+
}
62+
}

Diff for: .swiftformat

-19
This file was deleted.

Diff for: Sources/AWSLambdaRuntimeCore/Documentation.docc/Resources/code/03-02-01-package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
import PackageDescription
55

66
let package = Package(
7-
name: "SquareNumberLambda",
7+
name: "SquareNumberLambda"
88
)

Diff for: Sources/AWSLambdaRuntimeCore/Documentation.docc/Resources/code/03-02-02-package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ let package = Package(
77
name: "SquareNumberLambda",
88
platforms: [
99
.macOS(.v12),
10-
],
10+
]
1111
)

Diff for: Sources/AWSLambdaRuntimeCore/Documentation.docc/Resources/code/03-02-03-package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ let package = Package(
1010
],
1111
dependencies: [
1212
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha"),
13-
],
13+
]
1414
)

Diff for: Sources/AWSLambdaRuntimeCore/Documentation.docc/Resources/code/03-02-04-package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ let package = Package(
1313
],
1414
dependencies: [
1515
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "1.0.0-alpha"),
16-
],
16+
]
1717
)

Diff for: Tests/AWSLambdaRuntimeCoreTests/LambdaRequestIDTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ final class LambdaRequestIDTest: XCTestCase {
214214
_ = requestIDString.removeLast()
215215
let data = #"{"requestID":"\#(requestIDString)"}"#.data(using: .utf8)
216216

217-
XCTAssertThrowsError(_ = try JSONDecoder().decode(Test.self, from: XCTUnwrap(data))) { error in
217+
XCTAssertThrowsError(try JSONDecoder().decode(Test.self, from: XCTUnwrap(data))) { error in
218218
XCTAssertNotNil(error as? DecodingError)
219219
}
220220
}

Diff for: Tests/AWSLambdaRuntimeCoreTests/LambdaRuntimeTest.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class LambdaRuntimeTest: XCTestCase {
3737
XCTAssert($0 is StartupError)
3838
}
3939

40-
XCTAssertThrowsError(_ = try runtime.shutdownFuture.wait()) {
40+
XCTAssertThrowsError(try runtime.shutdownFuture.wait()) {
4141
XCTAssert($0 is StartupError)
4242
}
4343
}
@@ -54,7 +54,7 @@ class LambdaRuntimeTest: XCTestCase {
5454
let runtime = LambdaRuntimeFactory.makeRuntime(EchoHandler.self, eventLoop: eventLoop, logger: logger)
5555

5656
XCTAssertNoThrow(_ = try eventLoop.flatSubmit { runtime.start() }.wait())
57-
XCTAssertThrowsError(_ = try runtime.shutdownFuture.wait()) {
57+
XCTAssertThrowsError(try runtime.shutdownFuture.wait()) {
5858
XCTAssertEqual(.badStatusCode(HTTPResponseStatus.internalServerError), $0 as? LambdaRuntimeError)
5959
}
6060
}

0 commit comments

Comments
 (0)