Skip to content

Commit 5eb3d20

Browse files
authored
Merge pull request #711 from mrs1669/fix/typos
Fix some typos
2 parents 07c5509 + af84165 commit 5eb3d20

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Sources/SwiftFormat/Core/Trivia+Convenience.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ extension Trivia {
8080
})
8181
}
8282

83-
/// Returns `true` if this trivia contains any backslahes (used for multiline string newline
83+
/// Returns `true` if this trivia contains any backslashes (used for multiline string newline
8484
/// suppression).
8585
var containsBackslashes: Bool {
8686
return contains(

Sources/SwiftFormat/Rules/AlwaysUseLiteralForEmptyCollectionInit.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public final class AlwaysUseLiteralForEmptyCollectionInit : SyntaxFormatRule {
8686
if replacement.typeAnnotation == nil {
8787
// Drop trailing trivia after pattern because ':' has to appear connected to it.
8888
replacement.pattern = node.pattern.with(\.trailingTrivia, [])
89-
// Add explicit type annotiation: ': [<Type>]`
89+
// Add explicit type annotation: ': [<Type>]`
9090
replacement.typeAnnotation = .init(type: type.with(\.leadingTrivia, .space)
9191
.with(\.trailingTrivia, .space))
9292
}
@@ -109,7 +109,7 @@ public final class AlwaysUseLiteralForEmptyCollectionInit : SyntaxFormatRule {
109109
if replacement.typeAnnotation == nil {
110110
// Drop trailing trivia after pattern because ':' has to appear connected to it.
111111
replacement.pattern = node.pattern.with(\.trailingTrivia, [])
112-
// Add explicit type annotiation: ': [<Type>]`
112+
// Add explicit type annotation: ': [<Type>]`
113113
replacement.typeAnnotation = .init(type: type.with(\.leadingTrivia, .space)
114114
.with(\.trailingTrivia, .space))
115115
}

Sources/_SwiftFormatTestSupport/Configuration+Testing.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extension Configuration {
2020
/// different module than where `Configuration` is defined, we can't make this an initializer that
2121
/// would enforce that every field of `Configuration` is initialized here (we're forced to
2222
/// delegate to another initializer first, which defeats the purpose). So, users adding new
23-
/// configuration settings shouls be sure to supply a default here for testing, otherwise they
23+
/// configuration settings should be sure to supply a default here for testing, otherwise they
2424
/// will be implicitly relying on the real default.
2525
public static var forTesting: Configuration {
2626
var config = Configuration()

Sources/swift-format/Utilities/FileIterator.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public struct FileIterator: Sequence, IteratorProtocol {
132132
case .typeRegular:
133133
// We attempt to relativize the URLs based on the current working directory, not the
134134
// directory being iterated over, so that they can be displayed better in diagnostics. Thus,
135-
// if the user passes paths that are relative to the current working diectory, they will
135+
// if the user passes paths that are relative to the current working directory, they will
136136
// be displayed as relative paths. Otherwise, they will still be displayed as absolute
137137
// paths.
138138
let relativePath =

0 commit comments

Comments
 (0)