Skip to content

Commit

Permalink
Merge pull request #711 from mrs1669/fix/typos
Browse files Browse the repository at this point in the history
Fix some typos
  • Loading branch information
allevato authored Mar 28, 2024
2 parents 07c5509 + af84165 commit 5eb3d20
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/SwiftFormat/Core/Trivia+Convenience.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ extension Trivia {
})
}

/// Returns `true` if this trivia contains any backslahes (used for multiline string newline
/// Returns `true` if this trivia contains any backslashes (used for multiline string newline
/// suppression).
var containsBackslashes: Bool {
return contains(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public final class AlwaysUseLiteralForEmptyCollectionInit : SyntaxFormatRule {
if replacement.typeAnnotation == nil {
// Drop trailing trivia after pattern because ':' has to appear connected to it.
replacement.pattern = node.pattern.with(\.trailingTrivia, [])
// Add explicit type annotiation: ': [<Type>]`
// Add explicit type annotation: ': [<Type>]`
replacement.typeAnnotation = .init(type: type.with(\.leadingTrivia, .space)
.with(\.trailingTrivia, .space))
}
Expand All @@ -109,7 +109,7 @@ public final class AlwaysUseLiteralForEmptyCollectionInit : SyntaxFormatRule {
if replacement.typeAnnotation == nil {
// Drop trailing trivia after pattern because ':' has to appear connected to it.
replacement.pattern = node.pattern.with(\.trailingTrivia, [])
// Add explicit type annotiation: ': [<Type>]`
// Add explicit type annotation: ': [<Type>]`
replacement.typeAnnotation = .init(type: type.with(\.leadingTrivia, .space)
.with(\.trailingTrivia, .space))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extension Configuration {
/// different module than where `Configuration` is defined, we can't make this an initializer that
/// would enforce that every field of `Configuration` is initialized here (we're forced to
/// delegate to another initializer first, which defeats the purpose). So, users adding new
/// configuration settings shouls be sure to supply a default here for testing, otherwise they
/// configuration settings should be sure to supply a default here for testing, otherwise they
/// will be implicitly relying on the real default.
public static var forTesting: Configuration {
var config = Configuration()
Expand Down
2 changes: 1 addition & 1 deletion Sources/swift-format/Utilities/FileIterator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public struct FileIterator: Sequence, IteratorProtocol {
case .typeRegular:
// We attempt to relativize the URLs based on the current working directory, not the
// directory being iterated over, so that they can be displayed better in diagnostics. Thus,
// if the user passes paths that are relative to the current working diectory, they will
// if the user passes paths that are relative to the current working directory, they will
// be displayed as relative paths. Otherwise, they will still be displayed as absolute
// paths.
let relativePath =
Expand Down

0 comments on commit 5eb3d20

Please sign in to comment.