@@ -54,10 +54,10 @@ extension ExtendedTypesFormatTransformation {
54
54
///
55
55
/// The extended type symbol format provides a more concise and hierarchical structure:
56
56
/// - a member symbol of the according kind for all added members
57
- /// - an **extended type symbol** _for each external type that was extended_ (and its anchestors , if the extended
57
+ /// - an **extended type symbol** _for each external type that was extended_ (and its ancestors , if the extended
58
58
/// type is a nested type):
59
59
/// - ``SymbolKit/SymbolGraph/Symbol/KindIdentifier/extendedStruct``
60
- /// - ``SymbolKit/SymbolGraph/Symbol/KindIdentifier/extemdedClass ``
60
+ /// - ``SymbolKit/SymbolGraph/Symbol/KindIdentifier/extendedClass ``
61
61
/// - ``SymbolKit/SymbolGraph/Symbol/KindIdentifier/extendedEnum``
62
62
/// - ``SymbolKit/SymbolGraph/Symbol/KindIdentifier/extendedProtocol``
63
63
/// - ``SymbolKit/SymbolGraph/Symbol/KindIdentifier/unknownExtendedType``
@@ -83,7 +83,7 @@ extension ExtendedTypesFormatTransformation {
83
83
/// └────────────┘ 0..1 n└─────────────┘ 1 n └────────────────┘
84
84
/// ```
85
85
///
86
- /// - Parameter symbolGraph: An (extension) symbol graph that should use the extensoin block symbol format.
86
+ /// - Parameter symbolGraph: An (extension) symbol graph that should use the extension block symbol format.
87
87
/// - Parameter moduleName: The name of the extended module all top-level symbols in this symbol graph belong to.
88
88
/// - Returns: Returns whether the transformation was applied (the `symbolGraph` was an extension graph
89
89
/// in the extended type symbol format) or not
@@ -117,7 +117,7 @@ extension ExtendedTypesFormatTransformation {
117
117
}
118
118
119
119
// we sort the symbols here because their order is not guaranteed to stay the same
120
- // accross compilation processes and we always want to choose the same doc comment
120
+ // across compilation processes and we always want to choose the same doc comment
121
121
// in case there are multiple candidates with maximum number of lines
122
122
if let winner = relevantExtensionBlockSymbols. sorted ( by: \. identifier. precise) . max ( by: { a, b in ( a. docComment? . lines. count ?? 0 ) < ( b. docComment? . lines. count ?? 0 ) } ) {
123
123
return [ winner]
@@ -138,7 +138,7 @@ extension ExtendedTypesFormatTransformation {
138
138
return true
139
139
}
140
140
141
- /// Tries to obtain `docComment`s for all `targets` and copies the documentaiton from sources to the target.
141
+ /// Tries to obtain `docComment`s for all `targets` and copies the documentation from sources to the target.
142
142
///
143
143
/// Iterates over all `targets` calling the `source` method to obtain a list of symbols that should serve as sources for the target's `docComment`.
144
144
/// If there is more than one symbol containing a `docComment` in the compound list of target and the list returned by `source`, `onConflict` is
@@ -196,9 +196,9 @@ extension ExtendedTypesFormatTransformation {
196
196
197
197
/// Collects all relationships that touch any of the given extension symbols, removes them from the `symbolGraph`, and returns them separately.
198
198
///
199
- /// The relevant relationships in this context are of the follwing kinds:
199
+ /// The relevant relationships in this context are of the following kinds:
200
200
///
201
- /// - `.extenisonTo `: the `source` must be of kind `.extension`
201
+ /// - `.extensionTo `: the `source` must be of kind `.extension`
202
202
/// - `.conformsTo`: the `source` may be of kind `.extension`
203
203
/// - `.memberOf`: the `target` may be of kind `.extension`
204
204
///
@@ -241,11 +241,11 @@ extension ExtendedTypesFormatTransformation {
241
241
return ( extensionToRelationships, memberOfRelationships, conformsToRelationships)
242
242
}
243
243
244
- /// Synthesizes extended type symbols from the given `extensionBlockSymbols` and `extensoinToRelationships `.
244
+ /// Synthesizes extended type symbols from the given `extensionBlockSymbols` and `extensionToRelationships `.
245
245
///
246
246
/// Creates symbols of the following kinds:
247
247
/// - ``SymbolKit/SymbolGraph/Symbol/KindIdentifier/extendedStruct``
248
- /// - ``SymbolKit/SymbolGraph/Symbol/KindIdentifier/extemdedClass ``
248
+ /// - ``SymbolKit/SymbolGraph/Symbol/KindIdentifier/extendedClass ``
249
249
/// - ``SymbolKit/SymbolGraph/Symbol/KindIdentifier/extendedEnum``
250
250
/// - ``SymbolKit/SymbolGraph/Symbol/KindIdentifier/extendedProtocol``
251
251
///
@@ -279,12 +279,12 @@ extension ExtendedTypesFormatTransformation {
279
279
if let declarationFragments = extensionBlockSymbol [ mixin: SymbolGraph . Symbol. DeclarationFragments. self] ? . declarationFragments {
280
280
var prefixWithoutWhereClause : [ SymbolGraph . Symbol . DeclarationFragments . Fragment ] = Array ( declarationFragments [ ..< 3 ] )
281
281
282
- outer: for fragement in declarationFragments [ 3 ... ] {
283
- switch ( fragement . kind, fragement . spelling) {
282
+ outer: for fragment in declarationFragments [ 3 ... ] {
283
+ switch ( fragment . kind, fragment . spelling) {
284
284
case ( . typeIdentifier, _) ,
285
285
( . identifier, _) ,
286
286
( . text, " . " ) :
287
- prefixWithoutWhereClause. append ( fragement )
287
+ prefixWithoutWhereClause. append ( fragment )
288
288
default :
289
289
break outer
290
290
}
@@ -307,7 +307,7 @@ extension ExtendedTypesFormatTransformation {
307
307
var extendedTypeSymbolIdentifiers : [ String : String ] = [ : ]
308
308
309
309
// we sort the relationships here because their order is not guaranteed to stay the same
310
- // accross compilation processes and choosing the same base symbol (and its USR) is important
310
+ // across compilation processes and choosing the same base symbol (and its USR) is important
311
311
// to keeping (colliding) links stable
312
312
for extensionTo in extensionToRelationships. sorted ( by: \. source) {
313
313
guard let extensionBlockSymbol = extensionBlockSymbols [ extensionTo. source] else {
@@ -332,15 +332,15 @@ extension ExtendedTypesFormatTransformation {
332
332
return ( extendedTypeSymbols, extensionBlockToExtendedTypeMapping, extendedTypeToExtensionBlockMapping)
333
333
}
334
334
335
- /// Synthesizes missing anchestor extended type symbols for any nested types among the `extendedTypeSymbols` and
335
+ /// Synthesizes missing ancestor extended type symbols for any nested types among the `extendedTypeSymbols` and
336
336
/// creates the relevant ``SymbolKit/SymbolGraph/Relationship/inContextOf`` relationships.
337
337
///
338
338
/// Creates symbols of the following kinds:
339
339
/// - ``SymbolKit/SymbolGraph/Symbol/KindIdentifier/unknownExtendedType``
340
340
///
341
- /// If a nested type is extended, but its parent (or another anchestor ) is not, this anchestor is not part of the
341
+ /// If a nested type is extended, but its parent (or another ancestor ) is not, this ancestor is not part of the
342
342
/// extension block symbol format. In that case, a extended type symbol of unknown kind is synthesized by
343
- /// this function. However, if the anchestor symbol is extended, the `extendedTypeSymbols` should
343
+ /// this function. However, if the ancestor symbol is extended, the `extendedTypeSymbols` should
344
344
/// already contain the respective symbol. In that case, the ``SymbolKit/SymbolGraph/Relationship/inContextOf``
345
345
/// is attached to the existing symbol.
346
346
///
@@ -444,7 +444,7 @@ extension ExtendedTypesFormatTransformation {
444
444
var extendedModuleId : String ?
445
445
446
446
// we sort the symbols here because their order is not guaranteed to stay the same
447
- // accross compilation processes and choosing the same base symbol (and its USR) is important
447
+ // across compilation processes and choosing the same base symbol (and its USR) is important
448
448
// to keeping (colliding) links stable
449
449
for extendedTypeSymbolId in extendedTypeSymbolIds. sorted ( ) {
450
450
guard let extendedTypeSymbol = symbolGraph. symbols [ extendedTypeSymbolId] else {
@@ -496,9 +496,9 @@ private extension SymbolGraph.Symbol {
496
496
return new
497
497
}
498
498
499
- func replacing< V> ( _ keyPath: WritableKeyPath < Self , V > , with closue : ( Self ) -> V ) -> Self {
499
+ func replacing< V> ( _ keyPath: WritableKeyPath < Self , V > , with closure : ( Self ) -> V ) -> Self {
500
500
var new = self
501
- new [ keyPath: keyPath] = closue ( self )
501
+ new [ keyPath: keyPath] = closure ( self )
502
502
return new
503
503
}
504
504
}
0 commit comments