diff --git a/Copilot for Xcode.xcodeproj/project.pbxproj b/Copilot for Xcode.xcodeproj/project.pbxproj index ad068512d..bfab23073 100644 --- a/Copilot for Xcode.xcodeproj/project.pbxproj +++ b/Copilot for Xcode.xcodeproj/project.pbxproj @@ -775,7 +775,7 @@ DEVELOPMENT_TEAM = 5YKZ4Y3DAW; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = EditorExtension/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = "$(EXTESNION_BUNDLE_NAME)"; + INFOPLIST_KEY_CFBundleDisplayName = "$(EXTENSION_BUNDLE_NAME)"; INFOPLIST_KEY_NSHumanReadableCopyright = ""; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -803,7 +803,7 @@ DEVELOPMENT_TEAM = 5YKZ4Y3DAW; ENABLE_HARDENED_RUNTIME = YES; INFOPLIST_FILE = EditorExtension/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = "$(EXTESNION_BUNDLE_NAME)"; + INFOPLIST_KEY_CFBundleDisplayName = "$(EXTENSION_BUNDLE_NAME)"; INFOPLIST_KEY_NSHumanReadableCopyright = ""; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/Core/Sources/XcodeThemeController/XcodeThemeParser.swift b/Core/Sources/XcodeThemeController/XcodeThemeParser.swift index 80b13ed52..b2a3cd537 100644 --- a/Core/Sources/XcodeThemeController/XcodeThemeParser.swift +++ b/Core/Sources/XcodeThemeController/XcodeThemeParser.swift @@ -113,7 +113,7 @@ struct XcodeThemeParser { guard let theme = plist else { throw Error.invalidData } /// The source value is an `r g b a` string, for example: `0.5 0.5 0.2 1` - func converColor(source: String) -> XcodeTheme.ThemeColor { + func convertColor(source: String) -> XcodeTheme.ThemeColor { let components = source.split(separator: " ") let red = (components[0] as NSString).doubleValue let green = (components[1] as NSString).doubleValue @@ -136,7 +136,7 @@ struct XcodeThemeParser { currentDict = value } if let value = currentDict[path.last!] as? String { - return converColor(source: value) + return convertColor(source: value) } return defaultValue } diff --git a/Tool/Sources/FileSystem/ByteString.swift b/Tool/Sources/FileSystem/ByteString.swift index af4a3b456..6f974113f 100644 --- a/Tool/Sources/FileSystem/ByteString.swift +++ b/Tool/Sources/FileSystem/ByteString.swift @@ -143,7 +143,7 @@ extension ByteString: ByteStreamable { } } -/// StringLiteralConvertable conformance for a ByteString. +/// StringLiteralConvertible conformance for a ByteString. extension ByteString: ExpressibleByStringLiteral { public typealias UnicodeScalarLiteralType = StringLiteralType public typealias ExtendedGraphemeClusterLiteralType = StringLiteralType diff --git a/Tool/Sources/FileSystem/Lock.swift b/Tool/Sources/FileSystem/Lock.swift index 695494af1..881608220 100644 --- a/Tool/Sources/FileSystem/Lock.swift +++ b/Tool/Sources/FileSystem/Lock.swift @@ -1,7 +1,7 @@ import Foundation public enum ProcessLockError: Error { - case unableToAquireLock(errno: Int32) + case unableToAcquireLock(errno: Int32) } extension ProcessLockError: CustomNSError { @@ -42,7 +42,7 @@ public final class FileLock { self.init(at: cachePath.appending(component: name + ".lock")) } - /// Try to acquire a lock. This method will block until lock the already aquired by other process. + /// Try to acquire a lock. This method will block until lock the already acquired by other process. /// /// Note: This method can throw if underlying POSIX methods fail. public func lock(type: LockType = .exclusive, blocking: Bool = true) throws { @@ -78,7 +78,7 @@ public final class FileLock { } if !LockFileEx(handle, DWORD(dwFlags), 0, UInt32.max, UInt32.max, &overlapped) { - throw ProcessLockError.unableToAquireLock(errno: Int32(GetLastError())) + throw ProcessLockError.unableToAcquireLock(errno: Int32(GetLastError())) } #else // Open the lock file. @@ -97,14 +97,14 @@ public final class FileLock { if !blocking { flags |= LOCK_NB } - // Aquire lock on the file. + // Acquire lock on the file. while true { if flock(fileDescriptor!, flags) == 0 { break } // Retry if interrupted. if errno == EINTR { continue } - throw ProcessLockError.unableToAquireLock(errno: errno) + throw ProcessLockError.unableToAcquireLock(errno: errno) } #endif } diff --git a/Tool/Sources/FileSystem/Path.swift b/Tool/Sources/FileSystem/Path.swift index b65a22b9e..d32c7f32c 100644 --- a/Tool/Sources/FileSystem/Path.swift +++ b/Tool/Sources/FileSystem/Path.swift @@ -898,7 +898,7 @@ extension AbsolutePath { public func relative(to base: AbsolutePath) -> RelativePath { let result: RelativePath // Split the two paths into their components. - // FIXME: The is needs to be optimized to avoid unncessary copying. + // FIXME: The is needs to be optimized to avoid unnecessary copying. let pathComps = self.components let baseComps = base.components diff --git a/Tool/Sources/FileSystem/WritableByteStream.swift b/Tool/Sources/FileSystem/WritableByteStream.swift index 94dd033d1..3dcc4eff8 100644 --- a/Tool/Sources/FileSystem/WritableByteStream.swift +++ b/Tool/Sources/FileSystem/WritableByteStream.swift @@ -9,7 +9,7 @@ */ /// Closable entity is one that manages underlying resources and needs to be closed for cleanup -/// The intent of this method is for the sole owner of the refernece/handle of the resource to close it completely, comapred to releasing a shared resource. +/// The intent of this method is for the sole owner of the refernece/handle of the resource to close it completely, compared to releasing a shared resource. public protocol Closable { func close() throws } @@ -156,7 +156,7 @@ extension WritableByteStream { // MARK: helpers that return `self` - // FIXME: This override shouldn't be necesary but removing it causes a 30% performance regression. This problem is + // FIXME: This override shouldn't be necessary but removing it causes a 30% performance regression. This problem is // tracked by the following bug: https://bugs.swift.org/browse/SR-8535 @discardableResult public func send(_ value: ArraySlice) -> WritableByteStream { @@ -408,7 +408,7 @@ precedencegroup StreamingPrecedence { // MARK: Output Operator Implementations -// FIXME: This override shouldn't be necesary but removing it causes a 30% performance regression. This problem is +// FIXME: This override shouldn't be necessary but removing it causes a 30% performance regression. This problem is // tracked by the following bug: https://bugs.swift.org/browse/SR-8535 @available(*, deprecated, message: "use send(_:) function on WritableByteStream instead") diff --git a/Tool/Sources/FocusedCodeFinder/ObjectiveC/ObjectiveCSyntax.swift b/Tool/Sources/FocusedCodeFinder/ObjectiveC/ObjectiveCSyntax.swift index 98f5307ae..f49c3280c 100644 --- a/Tool/Sources/FocusedCodeFinder/ObjectiveC/ObjectiveCSyntax.swift +++ b/Tool/Sources/FocusedCodeFinder/ObjectiveC/ObjectiveCSyntax.swift @@ -75,7 +75,7 @@ enum ObjectiveCNodeType: String { /// `__GENERICS` in category interface and implementation. case genericsTypeReference = "generics_type_reference" /// `IB_DESIGNABLE`, etc. The typo is from the original source. - case classInterfaceAttributeSpecifier = "class_interface_attribute_sepcifier" + case classInterfaceAttributeSpecifier = "class_interface_attribute_specifier" } extension ObjectiveCNodeType { diff --git a/Tool/Sources/SuggestionInjector/SuggestionInjector.swift b/Tool/Sources/SuggestionInjector/SuggestionInjector.swift index 00b817d09..6a6af8a27 100644 --- a/Tool/Sources/SuggestionInjector/SuggestionInjector.swift +++ b/Tool/Sources/SuggestionInjector/SuggestionInjector.swift @@ -216,12 +216,12 @@ public struct SuggestionInjector { public struct SuggestionAnalyzer { struct Result { - enum InsertPostion { + enum InsertPosition { case currentLine case nextLine } - var insertPosition: InsertPostion + var insertPosition: InsertPosition var commonPrefix: String? } diff --git a/Tool/Tests/FocusedCodeFinderTests/SwiftFocusedCodeFinderTests.swift b/Tool/Tests/FocusedCodeFinderTests/SwiftFocusedCodeFinderTests.swift index 666b614c6..c8c2d1daf 100644 --- a/Tool/Tests/FocusedCodeFinderTests/SwiftFocusedCodeFinderTests.swift +++ b/Tool/Tests/FocusedCodeFinderTests/SwiftFocusedCodeFinderTests.swift @@ -220,7 +220,7 @@ final class SwiftFocusedCodeFinder_Selection_Tests: XCTestCase { func test_selecting_a_static_function_from_an_actor_the_scope_should_be_the_actor() { let code = """ - @gloablActor + @globalActor public actor A { static func f() {} static func g() {} @@ -240,7 +240,7 @@ final class SwiftFocusedCodeFinder_Selection_Tests: XCTestCase { XCTAssertEqual(context, .init( scope: .scope(signature: [ .init( - signature: "@gloablActor public actor A", + signature: "@globalActor public actor A", name: "A", range: .init(startPair: (0, 0), endPair: (7, 1)) ), diff --git a/Tool/Tests/SuggestionBasicTests/TextExtrationFromCodeTests.swift b/Tool/Tests/SuggestionBasicTests/TextExtrationFromCodeTests.swift index 7b1fa0071..451ea274d 100644 --- a/Tool/Tests/SuggestionBasicTests/TextExtrationFromCodeTests.swift +++ b/Tool/Tests/SuggestionBasicTests/TextExtrationFromCodeTests.swift @@ -2,7 +2,7 @@ import Foundation import XCTest @testable import SuggestionBasic -final class TextExtrationFromCodeTests: XCTestCase { +final class TextExtractionFromCodeTests: XCTestCase { func test_empty_selection() { let selection = CursorRange( start: CursorPosition(line: 0, character: 0), diff --git a/Tool/Tests/SuggestionInjectorTests/ProposeSuggestionTests.swift b/Tool/Tests/SuggestionInjectorTests/ProposeSuggestionTests.swift index 62d744e38..5a2173cf1 100644 --- a/Tool/Tests/SuggestionInjectorTests/ProposeSuggestionTests.swift +++ b/Tool/Tests/SuggestionInjectorTests/ProposeSuggestionTests.swift @@ -47,7 +47,7 @@ // *///======== End of Copilot Suggestion // } // """, -// "The user may want to keep typing on the empty line, so suggestion is addded to the next line" +// "The user may want to keep typing on the empty line, so suggestion is added to the next line" // ) // } //