From 84edaa20dbc3dde400640ca8e72e568af279b0c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20St=C3=B6ckle?= Date: Fri, 13 Jun 2025 20:07:07 +0200 Subject: [PATCH] Fix typos (#122) Hi there, some small typos I fixed using [`typos`](https://github.com/crate-ci/typos). Cheers, Patrick --- Sources/CLI/Image/ImageList.swift | 4 ++-- Sources/ContainerClient/XPC+.swift | 2 +- Sources/ContainerXPC/XPCMessage.swift | 2 +- Sources/Services/ContainerSandboxService/SandboxService.swift | 2 +- Sources/TerminalProgress/ProgressBar.swift | 2 +- Sources/TerminalProgress/ProgressConfig.swift | 4 ++-- Tests/ContainerBuildTests/GlobberTests.swift | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Sources/CLI/Image/ImageList.swift b/Sources/CLI/Image/ImageList.swift index 8b7bec57..e666feca 100644 --- a/Sources/CLI/Image/ImageList.swift +++ b/Sources/CLI/Image/ImageList.swift @@ -144,8 +144,8 @@ extension Application { if options.quiet && options.verbose { throw ContainerizationError(.invalidArgument, message: "Cannot use flag --quite and --verbose together") } - let modifer = options.quiet || options.verbose - if modifer && options.format == .json { + let modifier = options.quiet || options.verbose + if modifier && options.format == .json { throw ContainerizationError(.invalidArgument, message: "Cannot use flag --quite or --verbose along with --format json") } } diff --git a/Sources/ContainerClient/XPC+.swift b/Sources/ContainerClient/XPC+.swift index cbf977d4..183a239f 100644 --- a/Sources/ContainerClient/XPC+.swift +++ b/Sources/ContainerClient/XPC+.swift @@ -36,7 +36,7 @@ public enum XPCKeys: String { case port /// Exit code for a process case exitCode - /// An event that occured in a container + /// An event that occurred in a container case containerEvent /// Error key. case error diff --git a/Sources/ContainerXPC/XPCMessage.swift b/Sources/ContainerXPC/XPCMessage.swift index 5b81cabd..eb1f6737 100644 --- a/Sources/ContainerXPC/XPCMessage.swift +++ b/Sources/ContainerXPC/XPCMessage.swift @@ -18,7 +18,7 @@ import ContainerizationError import Foundation -/// A message that can be pass across application boundries via XPC. +/// A message that can be pass across application boundaries via XPC. public struct XPCMessage: Sendable { /// Defined message key storing the route value. public static let routeKey = "com.apple.container.xpc.route" diff --git a/Sources/Services/ContainerSandboxService/SandboxService.swift b/Sources/Services/ContainerSandboxService/SandboxService.swift index 17c1b3f2..6e901e71 100644 --- a/Sources/Services/ContainerSandboxService/SandboxService.swift +++ b/Sources/Services/ContainerSandboxService/SandboxService.swift @@ -399,7 +399,7 @@ public actor SandboxService { return message.reply() } - // TODO: fix underying signal value to int64 + // TODO: fix underlying signal value to int64 try await ctr.container.kill(Int32(try message.signal())) return message.reply() } diff --git a/Sources/TerminalProgress/ProgressBar.swift b/Sources/TerminalProgress/ProgressBar.swift index a4952965..5fc3b742 100644 --- a/Sources/TerminalProgress/ProgressBar.swift +++ b/Sources/TerminalProgress/ProgressBar.swift @@ -190,7 +190,7 @@ extension ProgressBar { if config.showProgressBar, total > 0, allowProgress { let usedWidth = components.joined(separator: " ").count + 45 /* the maximum number of characters we may need */ - let remainingWidth = max(config.width - usedWidth, 1 /* the minumum width of a progress bar */) + let remainingWidth = max(config.width - usedWidth, 1 /* the minimum width of a progress bar */) let barLength = state.finished ? remainingWidth : Int(Int64(remainingWidth) * value / total) let barPaddingLength = remainingWidth - barLength let bar = "\(String(repeating: config.theme.bar, count: barLength))\(String(repeating: " ", count: barPaddingLength))" diff --git a/Sources/TerminalProgress/ProgressConfig.swift b/Sources/TerminalProgress/ProgressConfig.swift index 544604f1..88b4b749 100644 --- a/Sources/TerminalProgress/ProgressConfig.swift +++ b/Sources/TerminalProgress/ProgressConfig.swift @@ -61,7 +61,7 @@ public struct ProgressConfig: Sendable { public let width: Int /// The theme of the progress bar. public let theme: ProgressTheme - /// The flag indicating whether to clear the progress bar before reseting the cursor. + /// The flag indicating whether to clear the progress bar before resetting the cursor. public let clearOnFinish: Bool /// The flag indicating whether to update the progress bar. public let disableProgressUpdates: Bool @@ -86,7 +86,7 @@ public struct ProgressConfig: Sendable { /// - totalSize: The initial total size of the progress bar. The default value is `nil`. /// - width: The width of the progress bar in characters. The default value is `120`. /// - theme: The theme of the progress bar. The default value is `nil`. - /// - clearOnFinish: The flag indicating whether to clear the progress bar before reseting the cursor. The default is `true`. + /// - clearOnFinish: The flag indicating whether to clear the progress bar before resetting the cursor. The default is `true`. /// - disableProgressUpdates: The flag indicating whether to update the progress bar. The default is `false`. public init( terminal: FileHandle = .standardError, diff --git a/Tests/ContainerBuildTests/GlobberTests.swift b/Tests/ContainerBuildTests/GlobberTests.swift index 24850382..9ddcc111 100644 --- a/Tests/ContainerBuildTests/GlobberTests.swift +++ b/Tests/ContainerBuildTests/GlobberTests.swift @@ -129,7 +129,7 @@ let testCases = [ func testGlobMatching(_ test: TestCase) throws { let globber = Globber(URL(fileURLWithPath: "/")) let found = try globber.glob(test.fileName, test.pattern) - #expect(found == test.expectSuccess, "expected found to be \(test.expectSuccess), instaed got \(found)") + #expect(found == test.expectSuccess, "expected found to be \(test.expectSuccess), instead got \(found)") } @Test("Invalid computed regex patterns throw error", arguments: errorGlobTestCases)