From 629372aff54e96ad744f583a927edb5468196bba Mon Sep 17 00:00:00 2001 From: Takumi Muraishi Date: Wed, 27 Mar 2024 22:15:24 +0900 Subject: [PATCH 1/4] fix typo in Configuration+Testing.swift --- Sources/_SwiftFormatTestSupport/Configuration+Testing.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/_SwiftFormatTestSupport/Configuration+Testing.swift b/Sources/_SwiftFormatTestSupport/Configuration+Testing.swift index e9ab39c3..8d095767 100644 --- a/Sources/_SwiftFormatTestSupport/Configuration+Testing.swift +++ b/Sources/_SwiftFormatTestSupport/Configuration+Testing.swift @@ -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() From 1967bf7fe7bd76138bb3fe0d26ed584d10e02a93 Mon Sep 17 00:00:00 2001 From: Takumi Muraishi Date: Wed, 27 Mar 2024 22:15:55 +0900 Subject: [PATCH 2/4] fix typo in FileIterator.swift --- Sources/swift-format/Utilities/FileIterator.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/swift-format/Utilities/FileIterator.swift b/Sources/swift-format/Utilities/FileIterator.swift index 6f88cc90..a3b2a698 100644 --- a/Sources/swift-format/Utilities/FileIterator.swift +++ b/Sources/swift-format/Utilities/FileIterator.swift @@ -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 = From d4bbe76a186c437a0a74667dfb053c2d0424d541 Mon Sep 17 00:00:00 2001 From: Takumi Muraishi Date: Wed, 27 Mar 2024 22:28:49 +0900 Subject: [PATCH 3/4] fix typo in Trivia+Convenience.swift --- Sources/SwiftFormat/Core/Trivia+Convenience.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SwiftFormat/Core/Trivia+Convenience.swift b/Sources/SwiftFormat/Core/Trivia+Convenience.swift index 612cd423..c1906ab6 100644 --- a/Sources/SwiftFormat/Core/Trivia+Convenience.swift +++ b/Sources/SwiftFormat/Core/Trivia+Convenience.swift @@ -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( From af841655447f4fe16ec95c347d16ef89e49733d9 Mon Sep 17 00:00:00 2001 From: Takumi Muraishi Date: Thu, 28 Mar 2024 15:10:52 +0900 Subject: [PATCH 4/4] fix annotation --- .../Rules/AlwaysUseLiteralForEmptyCollectionInit.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/SwiftFormat/Rules/AlwaysUseLiteralForEmptyCollectionInit.swift b/Sources/SwiftFormat/Rules/AlwaysUseLiteralForEmptyCollectionInit.swift index b73e0ba4..973e2277 100644 --- a/Sources/SwiftFormat/Rules/AlwaysUseLiteralForEmptyCollectionInit.swift +++ b/Sources/SwiftFormat/Rules/AlwaysUseLiteralForEmptyCollectionInit.swift @@ -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: ': []` + // Add explicit type annotation: ': []` replacement.typeAnnotation = .init(type: type.with(\.leadingTrivia, .space) .with(\.trailingTrivia, .space)) } @@ -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: ': []` + // Add explicit type annotation: ': []` replacement.typeAnnotation = .init(type: type.with(\.leadingTrivia, .space) .with(\.trailingTrivia, .space)) }