Skip to content

Commit fd66e6c

Browse files
Run swift format
1 parent 6073699 commit fd66e6c

File tree

10 files changed

+16
-17
lines changed

10 files changed

+16
-17
lines changed

Sources/Mocking/Models/MacroArguments/MockSendableConformance.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
/// A `Sendable` conformance that can be applied to a mock declaration.
88
public enum MockSendableConformance {
9-
9+
1010
/// The mock adheres to the `Sendable` conformance of the original
1111
/// implementation.
1212
case checked
13-
13+
1414
/// The mock conforms to `@unchecked Sendable`.
1515
case unchecked
1616
}

Sources/MockingMacros/Extensions/InheritedTypeSyntax/InheritedTypeSyntax+UncheckedSendable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import SwiftSyntax
88

99
extension InheritedTypeSyntax {
10-
10+
1111
/// An `InheritedTypeSyntax` representing unchecked sendable conformance
1212
/// with a trailing comma.
1313
///

Sources/MockingMacros/Macros/MockedMacro/MockedMacro+MacroArguments.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ extension MockedMacro {
1818

1919
/// The compilation condition with which to wrap the generated mock.
2020
let compilationCondition: MockCompilationCondition
21-
21+
2222
/// The sendable conformance to apply to the generated mock.
2323
let sendableConformance: MockSendableConformance
2424

@@ -29,10 +29,10 @@ extension MockedMacro {
2929
/// - Parameter node: The node representing the macro.
3030
init(node: AttributeSyntax) {
3131
let arguments = node.arguments?.as(LabeledExprListSyntax.self)
32-
32+
3333
func argumentValue<A>(
3434
for argumentType: A.Type,
35-
`default`: A
35+
default: A
3636
) -> A where A: MacroArgument {
3737
guard let arguments else {
3838
return `default`
@@ -44,7 +44,7 @@ extension MockedMacro {
4444
}
4545
return `default`
4646
}
47-
47+
4848
self.compilationCondition = argumentValue(
4949
for: MockCompilationCondition.self,
5050
default: .swiftMockingEnabled

Sources/MockingMacros/Macros/MockedMacro/MockedMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ extension MockedMacro {
198198
}
199199
}
200200
}
201-
201+
202202
// MARK: Generic Where Clause
203203

204204
/// Returns the generic `where` clause to apply to the mock declaration,

Sources/MockingMacros/Macros/MockedMethodMacro/MockedMethodMacro+PeerMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ extension MockedMethodMacro: PeerMacro {
248248
inheritanceClause: InheritanceClauseSyntax {
249249
// @unchecked Sendable
250250
.uncheckedSendable
251-
251+
252252
// Implementation
253253
InheritedTypeSyntax(
254254
type: IdentifierTypeSyntax(

Sources/MockingMacros/Models/MacroArguments/MacroArgument.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import SwiftSyntax
99
/// A protocol for arguments that can be parsed from a macro's argument
1010
/// syntax.
1111
protocol MacroArgument {
12-
12+
1313
/// Creates a macro argument from the provided `argument`.
1414
///
1515
/// - Parameter argument: The argument syntax from which to parse the

Sources/MockingMacros/Models/MacroArguments/MockCompilationCondition.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import SwiftSyntax
88

9-
109
/// A compilation condition for an `#if` compiler directive used to wrap a mock
1110
/// declaration.
1211
enum MockCompilationCondition: RawRepresentable, Equatable, MacroArgument {

Sources/MockingMacros/Models/MacroArguments/MockSendableConformance.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import SwiftSyntax
88

99
/// A `Sendable` conformance that can be applied to a mock declaration.
1010
enum MockSendableConformance: String, MacroArgument {
11-
11+
1212
/// The mock adheres to the `Sendable` conformance of the original
1313
/// implementation.
1414
case checked
15-
15+
1616
/// The mock conforms to `@unchecked Sendable`.
1717
case unchecked
1818

Tests/MockingMacrosTests/Macros/MockedMacro/Mocked_SendableConformanceTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Testing
99
@testable import MockingMacros
1010

1111
struct Mocked_SendableConformanceTests {
12-
12+
1313
@Test(
1414
"Default conformance doesn't modify inheritance clause.",
1515
arguments: mockedTestConfigurations
@@ -33,7 +33,7 @@ struct Mocked_SendableConformanceTests {
3333
"""
3434
)
3535
}
36-
36+
3737
@Test(
3838
"Checked conformance doesn't modify inheritance clause.",
3939
arguments: mockedTestConfigurations
@@ -57,7 +57,7 @@ struct Mocked_SendableConformanceTests {
5757
"""
5858
)
5959
}
60-
60+
6161
@Test(
6262
"Unchecked conformance adds @unchecked Sendable to inheritance clause.",
6363
arguments: mockedTestConfigurations

Tests/MockingMacrosTests/Macros/MockedMacro/TestHelpers/AssertMocked.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func assertMocked(
2828
if let compilationCondition {
2929
arguments.append("compilationCondition: \(compilationCondition)")
3030
}
31-
31+
3232
if let sendableConformance {
3333
arguments.append("sendableConformance: .\(sendableConformance.rawValue)")
3434
}

0 commit comments

Comments
 (0)