Skip to content

Commit 458cd08

Browse files
committed
Fix method documentation broken links
1 parent 96bf2e9 commit 458cd08

26 files changed

+44
-631
lines changed

Sources/InlineSnapshotTesting/AssertInline.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@ import SwiftSyntaxBuilder
2323
/// - serialization: The strategy used to serialize the snapshot data. Defaults to `DataSerialization()`.
2424
/// - closureDescriptor: An optional descriptor describing the inline snapshot’s location. Typically not needed unless implementing custom helpers.
2525
/// - expected: An optional closure that returns a previously generated snapshot value. When omitted, the expected value will be populated inline at the call site.
26+
/// - isolation: Optionally specify an actor for input evaluation, supporting thread/actor isolation. Defaults to current context.
2627
/// - fileID: The file ID in which the assertion was called. Defaults to the file ID of the test case.
27-
/// - file: The file path in which the assertion was called. Defaults to the file path of the test case.
28+
/// - filePath: The file path in which the assertion was called. Defaults to the file path of the test case.
2829
/// - function: The function name in which the assertion was called. Defaults to the test method name.
2930
/// - line: The line number on which the assertion was called. Defaults to the line number of the call site.
3031
/// - column: The column on which the assertion was called. Defaults to the column number of the call site.
3132
/// - Throws: Rethrows any error thrown by the value provider or snapshot strategy.
3233
/// - Important: When using the Swift Testing framework, you must explicitly set the @Suite(.finalizeSnapshots) trait to ensure inline snapshots are written correctly.
3334
/// - SeeAlso: <doc:InlineSnapshotTesting>
3435
public func assertInline<Input: Sendable, Output: BytesRepresentable>(
35-
of value: @autoclosure @Sendable () throws -> Input,
36+
of value: @autoclosure @Sendable () async throws -> Input,
3637
as snapshot: AsyncSnapshot<Input, Output>,
3738
message: @autoclosure @escaping @Sendable () -> String = "",
3839
record: RecordMode? = nil,
@@ -41,6 +42,7 @@ public func assertInline<Input: Sendable, Output: BytesRepresentable>(
4142
serialization: DataSerialization = DataSerialization(),
4243
closureDescriptor: SnapshotClosureDescriptor = SnapshotClosureDescriptor(),
4344
matches expected: (@Sendable () -> Output.RawValue)? = nil,
45+
isolation: isolated Actor? = #isolation,
4446
fileID: StaticString = #fileID,
4547
file filePath: StaticString = #filePath,
4648
function: StaticString = #function,
@@ -108,7 +110,7 @@ public func assertInline<Input: Sendable, Output: BytesRepresentable>(
108110
/// - closureDescriptor: An optional descriptor for the inline snapshot’s location. Typically not needed unless implementing custom helpers.
109111
/// - expected: An optional closure that returns a previously generated snapshot value. When omitted, the expected value will be populated inline at the call site.
110112
/// - fileID: The file ID in which the assertion was called. Defaults to the file ID of the test case.
111-
/// - file: The file path in which the assertion was called. Defaults to the file path of the test case.
113+
/// - filePath: The file path in which the assertion was called. Defaults to the file path of the test case.
112114
/// - function: The function name in which the assertion was called. Defaults to the test method name.
113115
/// - line: The line number on which the assertion was called. Defaults to the line number of the call site.
114116
/// - column: The column on which the assertion was called. Defaults to the column number of the call site.

Sources/InlineSnapshotTesting/Documentation.docc/InlineSnapshotTesting.md

Lines changed: 0 additions & 78 deletions
This file was deleted.

Sources/InlineSnapshotTesting/SwiftSyntax/SnapshotClosureDescriptor.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
/// A structure that describes the location of an inline snapshot.
44
///
55
/// Provide this structure when defining custom snapshot functions that call
6-
/// ``assertInline(of:as:message:record:timeout:name:serialization:closureDescriptor:matches:fileID:file:function:line:column:)-(_,AsyncSnapshot<Input, Output>,_,_,_,_,_,_,_,_,_,_,_,_)``
6+
/// ``InlineSnapshotTesting/assertInline(of:as:message:record:timeout:name:serialization:closureDescriptor:matches:fileID:file:function:line:column:)``
77
/// under the hood.
88
/// A descriptor for the trailing closure used to supply an inline snapshot in a custom snapshot assertion.
99
///
1010
/// Use this type when implementing custom snapshot assertion utilities that ultimately delegate to
11-
/// ``assertInline(of:as:message:record:timeout:name:serialization:closureDescriptor:matches:fileID:file:function:line:column:)``.
11+
/// ``InlineSnapshotTesting/assertInline(of:as:message:record:timeout:name:serialization:closureDescriptor:matches:fileID:file:function:line:column:)``.
1212
/// It describes the structure of the inline snapshot trailing closure, supporting both current and deprecated closure labels,
1313
/// as well as more advanced cases where multiple trailing closures may exist.
1414
///
@@ -88,7 +88,7 @@ public struct SnapshotClosureDescriptor: Sendable, Hashable {
8888
/// - message: An optional description of the assertion, for inclusion in test results.
8989
/// - fileID: The file ID in which failure occurred. Defaults to the file ID of the test case
9090
/// in which this function was called.
91-
/// - file: The file in which failure occurred. Defaults to the file path of the test case in
91+
/// - filePath: The file in which failure occurred. Defaults to the file path of the test case in
9292
/// which this function was called.
9393
/// - line: The line number on which failure occurred. Defaults to the line number on which
9494
/// this function was called.

Sources/SnapshotTesting/Documentation.docc/Documentation.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

Sources/SnapshotTesting/Documentation.docc/SnapshotsTrait.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

Sources/XCSnapshotTesting/Assert/Assert.swift

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import Foundation
1919
/// - timeout: Time in seconds before the assertion fails for taking too long. Defaults to zero (no timeout).
2020
/// - isolation: Optionally specify an actor for input evaluation, supporting thread/actor isolation. Defaults to current context.
2121
/// - fileID: The unique identifier for the file in which the assertion appears. Supplied automatically by the compiler.
22-
/// - file: The file path where the assertion is called. Supplied automatically by the compiler.
22+
/// - filePath: The file path where the assertion is called. Supplied automatically by the compiler.
2323
/// - testName: The name of the test function calling the assertion. Supplied automatically by the compiler.
2424
/// - line: The source line number where the assertion is called. Supplied automatically by the compiler.
2525
/// - column: The source column where the assertion is called. Supplied automatically by the compiler.
@@ -30,7 +30,8 @@ import Foundation
3030
/// avoid snapshot counting issues. Automatic snapshot naming relies on the call site position.
3131
///
3232
/// - Note: The recording mode falls back to session-level or environment settings if not provided.
33-
/// Use testing traits, or ``withTestingEnvironment(record:operation:)`` to control globally.
33+
/// Use testing traits, or ``withTestingEnvironment(record:diffTool:maxConcurrentTests:platform:operation:file:line:)``
34+
/// to control globally.
3435
///
3536
/// - Example:
3637
/// ```swift
@@ -98,7 +99,7 @@ public func assert<Input: Sendable, Output: BytesRepresentable>(
9899
/// - timeout: Maximum seconds to wait for input evaluation per assertion. Defaults to `.zero`.
99100
/// - isolation: Optionally specify an actor context for input evaluation, supporting actor/thread isolation. Defaults to current context.
100101
/// - fileID: The unique identifier of the source file. Provided automatically by the compiler.
101-
/// - file: The path to the source file. Provided automatically.
102+
/// - filePath: The path to the source file. Provided automatically.
102103
/// - testName: The name of the test function. Provided automatically.
103104
/// - line: The line number of the assertion in the source file. Provided automatically.
104105
/// - column: The column number of the assertion in the source file. Provided automatically.
@@ -166,7 +167,7 @@ public func assert<Input: Sendable, Output: BytesRepresentable>(
166167
/// - timeout: Maximum seconds to wait for input evaluation per assertion. Defaults to `.zero`.
167168
/// - isolation: Optionally specify an actor context for input evaluation, supporting actor/thread isolation. Defaults to current context.
168169
/// - fileID: The unique identifier of the source file. Provided automatically by the compiler.
169-
/// - file: The path to the source file. Provided automatically.
170+
/// - filePath: The path to the source file. Provided automatically.
170171
/// - testName: The name of the test function. Provided automatically.
171172
/// - line: The line number of the assertion in the source file. Provided automatically.
172173
/// - column: The column number of the assertion in the source file. Provided automatically.
@@ -245,7 +246,7 @@ public func assert<Input: Sendable, Output: BytesRepresentable>(
245246
/// - snapshotDirectory: Optionally specify a custom directory for stored snapshots, overriding the default.
246247
/// - timeout: Time in seconds before the assertion fails if too long. Defaults to 5 seconds.
247248
/// - fileID: The unique identifier of the source file. Provided automatically by the compiler.
248-
/// - file: The path to the source file. Provided automatically.
249+
/// - filePath: The path to the source file. Provided automatically.
249250
/// - testName: The name of the test function. Provided automatically.
250251
/// - line: The line number of the assertion call. Provided automatically.
251252
/// - column: The column number of the assertion call. Provided automatically.
@@ -318,7 +319,7 @@ public func assert<Input, Output: BytesRepresentable>(
318319
/// - snapshotDirectory: Optionally specify a custom directory for storing or comparing snapshots, overriding the default.
319320
/// - timeout: Maximum seconds to wait for each assertion. Defaults to 5.
320321
/// - fileID: The unique identifier of the source file. Provided automatically by the compiler.
321-
/// - file: The path to the source file. Provided automatically.
322+
/// - filePath: The path to the source file. Provided automatically.
322323
/// - testName: The name of the test function. Provided automatically.
323324
/// - line: The line number of the assertion in the source file. Provided automatically.
324325
/// - column: The column number of the assertion in the source file. Provided automatically.
@@ -382,7 +383,7 @@ public func assert<Input, Output: BytesRepresentable>(
382383
/// - snapshotDirectory: Optionally specify a custom directory for storing or comparing snapshots, overriding the default.
383384
/// - timeout: Maximum seconds to wait for each assertion. Defaults to 5.
384385
/// - fileID: The unique identifier of the source file. Provided automatically by the compiler.
385-
/// - file: The path to the source file. Provided automatically.
386+
/// - filePath: The path to the source file. Provided automatically.
386387
/// - testName: The name of the test function. Provided automatically.
387388
/// - line: The line number of the assertion in the source file. Provided automatically.
388389
/// - column: The column number of the assertion in the source file. Provided automatically.
@@ -448,7 +449,7 @@ public func assert<Input, Output: BytesRepresentable>(
448449
/// - timeout: Maximum seconds to wait for input evaluation or snapshotting. Defaults to `.zero`.
449450
/// - isolation: Optionally specify an actor for input evaluation, supporting thread/actor isolation. Defaults to current context.
450451
/// - fileID: The unique identifier of the source file. Provided automatically by the compiler.
451-
/// - file: The path to the source file. Provided automatically.
452+
/// - filePath: The path to the source file. Provided automatically.
452453
/// - testName: The name of the test function. Provided automatically.
453454
/// - line: The line number of the assertion in the source file. Provided automatically.
454455
/// - column: The column number of the assertion in the source file. Provided automatically.
@@ -511,7 +512,7 @@ public func verify<Input: Sendable, Output: BytesRepresentable>(
511512
/// - snapshotDirectory: Optionally specify a directory for storing or comparing snapshots, overriding the default.
512513
/// - timeout: Maximum seconds to wait for input evaluation or snapshotting. Defaults to 5 seconds.
513514
/// - fileID: The unique identifier of the source file. Provided automatically by the compiler.
514-
/// - file: The path to the source file. Provided automatically.
515+
/// - filePath: The path to the source file. Provided automatically.
515516
/// - testName: The name of the test function. Provided automatically.
516517
/// - line: The line number of the assertion in the source file. Provided automatically.
517518
/// - column: The column number of the assertion in the source file. Provided automatically.

Sources/XCSnapshotTesting/Assert/SnapshotAttachment.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public struct SnapshotAttachment: Sendable {
3030
/// Initializes a `SnapshotAttachment` with a custom uniform type identifier, name, and payload.
3131
///
3232
/// - Parameters:
33-
/// - uniformTypeIdentifier: The uniform type identifier for the attachment. Defaults to `"public.data"` if `nil`.
33+
/// - identifier: The uniform type identifier for the attachment. Defaults to `"public.data"` if `nil`.
3434
/// - name: An optional name for the attachment.
3535
/// - payload: The binary data payload. Defaults to `nil` if not provided.
3636
public init(uniformTypeIdentifier identifier: String?, name: String?, payload: Data?) {
@@ -42,7 +42,7 @@ public struct SnapshotAttachment: Sendable {
4242
/// Initializes a `SnapshotAttachment` with raw data, using a default uniform type identifier.
4343
///
4444
/// - Parameters:
45-
/// - data: The binary data to use as the payload.
45+
/// - payload: The binary data to use as the payload.
4646
///
4747
/// - SeeAlso: Uses `"public.data"` as the uniform type identifier.
4848
public init(data payload: Data) {
@@ -56,7 +56,7 @@ public struct SnapshotAttachment: Sendable {
5656
///
5757
/// - Parameters:
5858
/// - payload: The binary data to use as the payload.
59-
/// - uniformTypeIdentifier: The uniform type identifier for the attachment.
59+
/// - identifier: The uniform type identifier for the attachment.
6060
public init(data payload: Data, uniformTypeIdentifier identifier: String) {
6161
self.init(
6262
uniformTypeIdentifier: identifier,

Sources/XCSnapshotTesting/Diff/DiffTool.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import Foundation
3232
/// without modifying individual test files.
3333
///
3434
/// ## See Also
35-
/// - ``withTestingEnvironment(diffTool:_:)``
35+
/// - ``withTestingEnvironment(record:diffTool:maxConcurrentTests:platform:operation:file:line:)``
3636
/// - ``DiffTool/ksdiff``
3737
/// - ``DiffTool/default``
3838
///
@@ -79,7 +79,7 @@ public struct DiffTool: Sendable, ExpressibleByStringLiteral {
7979
/// - Use Cases:
8080
/// - Suitable for CI environments or when no external diff tool is available.
8181
/// - Provides clear next steps for developers to configure more advanced comparison tools.
82-
/// - SeeAlso: ``DiffTool/ksdiff``, ``withTestingEnvironment(diffTool:_:)``
82+
/// - SeeAlso: ``DiffTool/ksdiff``, ``withTestingEnvironment(record:diffTool:maxConcurrentTests:platform:operation:file:line:)``
8383
public static let `default` = Self {
8484
"""
8585
@−

0 commit comments

Comments
 (0)