diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d86e611f..b74c594d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ To file a bug or feature request, use [GitHub issues](https://github.com/apple/c ### Pull Requests -To make a pull request, use [GitHub](https://github.com/apple/containerization/compare). Please give the team a few days to review but it's ok to check in on occassion. We appreciate your contribution! +To make a pull request, use [GitHub](https://github.com/apple/containerization/compare). Please give the team a few days to review but it's ok to check in on occasion. We appreciate your contribution! > [!IMPORTANT] > If you plan to make substantial changes or add new features, we encourage you to first discuss them with the wider containerization developer community. @@ -45,7 +45,7 @@ Before merging, we'll review the pull request title and body to ensure it: The pull request description should be concise and accurately describe the *what* and *why* of your changes. -#### Fomatting Contributions +#### Formatting Contributions Make sure your contributions are consistent with the rest of the project's formatting. You can do this using our Makefile: diff --git a/Sources/Containerization/Kernel.swift b/Sources/Containerization/Kernel.swift index b779eafa..65b78509 100644 --- a/Sources/Containerization/Kernel.swift +++ b/Sources/Containerization/Kernel.swift @@ -40,7 +40,7 @@ public struct Kernel: Sendable, Codable { /// Additional kernel arguments. public var kernelArgs: [String] - /// Additional arguments passsed to the Initial Process / Agent. + /// Additional arguments passed to the Initial Process / Agent. public var initArgs: [String] /// Initializes the kernel commandline using the mix of kernel arguments diff --git a/Sources/Containerization/LinuxContainer.swift b/Sources/Containerization/LinuxContainer.swift index 4489ff1b..98ca37ee 100644 --- a/Sources/Containerization/LinuxContainer.swift +++ b/Sources/Containerization/LinuxContainer.swift @@ -82,7 +82,7 @@ public final class LinuxContainer: Container, Sendable { case stopping(StoppingState) /// The container has ran and fully stopped. case stopped - /// An error occured during the lifetime of this class. + /// An error occurred during the lifetime of this class. case errored(Swift.Error) struct CreatingState: Sendable {} diff --git a/Sources/ContainerizationArchive/ArchiveWriter.swift b/Sources/ContainerizationArchive/ArchiveWriter.swift index f8990798..6e2cd9e0 100644 --- a/Sources/ContainerizationArchive/ArchiveWriter.swift +++ b/Sources/ContainerizationArchive/ArchiveWriter.swift @@ -37,7 +37,7 @@ public final class ArchiveWriter { try setOptions(configuration.options) } - /// Initialize a new `ArchiveWriter` with the given configuration and specifed delegate. + /// Initialize a new `ArchiveWriter` with the given configuration and specified delegate. private convenience init(configuration: ArchiveWriterConfiguration, delegate: FileArchiveWriterDelegate) throws { try self.init(configuration: configuration) self.delegate = delegate diff --git a/Sources/ContainerizationArchive/Reader.swift b/Sources/ContainerizationArchive/Reader.swift index 1c8ddc03..4039d710 100644 --- a/Sources/ContainerizationArchive/Reader.swift +++ b/Sources/ContainerizationArchive/Reader.swift @@ -26,7 +26,7 @@ public final class ArchiveReader { let fileHandle: FileHandle? /// Initializes an `ArchiveReader` to read from a specified file URL with an explicit `Format` and `Filter`. - /// Note: This method must be used when it is known that the archive at the specified URL follows the specifed + /// Note: This method must be used when it is known that the archive at the specified URL follows the specified /// `Format` and `Filter`. public convenience init(format: Format, filter: Filter, file: URL) throws { let fileHandle = try FileHandle(forReadingFrom: file) @@ -34,7 +34,7 @@ public final class ArchiveReader { } /// Initializes an `ArchiveReader` to read from the provided file descriptor with an explicit `Format` and `Filter`. - /// Note: This method must be used when it is known that the archive pointed to by the file descriptor follows the specifed + /// Note: This method must be used when it is known that the archive pointed to by the file descriptor follows the specified /// `Format` and `Filter`. public init(format: Format, filter: Filter, fileHandle: FileHandle) throws { self.underlying = archive_read_new() diff --git a/Sources/ContainerizationEXT4/EXT4+Format.swift b/Sources/ContainerizationEXT4/EXT4+Format.swift index 5ac96508..08925082 100644 --- a/Sources/ContainerizationEXT4/EXT4+Format.swift +++ b/Sources/ContainerizationEXT4/EXT4+Format.swift @@ -262,15 +262,15 @@ extension EXT4 { // // - Parameters: // - path: The FilePath representing the path where the file, directory, or symlink should be created. - // - link: An optional FilePath representing the target path for a symlink. If `nil`, a regular file or directory will be created. Preceeding '/' should be ommitted + // - link: An optional FilePath representing the target path for a symlink. If `nil`, a regular file or directory will be created. Preceding '/' should be omitted // - mode: The permissions to set for the created file, directory, or symlink. // - buf: An `InputStream` object providing the contents for the created file. Ignored when creating directories or symlinks. // // - Note: // - This function recursively creates parent directories if they don't already exist. The `uid` and `gid` of the created parent directories are set to the values of their parent's `uid` and `gid`. - // - It is expected that the user sets the permissions explicity later + // - It is expected that the user sets the permissions explicitly later // - This function only supports creating files, directories, and symlinks. Attempting to create other types of file system objects will result in an error. - // - In case of symlinks, the preceeding '/' should be omitted + // - In case of symlinks, the preceding '/' should be omitted // // - Example usage: // ```swift diff --git a/Sources/ContainerizationEXT4/EXT4+Xattrs.swift b/Sources/ContainerizationEXT4/EXT4+Xattrs.swift index cc4b766a..1237636d 100644 --- a/Sources/ContainerizationEXT4/EXT4+Xattrs.swift +++ b/Sources/ContainerizationEXT4/EXT4+Xattrs.swift @@ -186,8 +186,8 @@ extension EXT4 { try Self.write(buffer: &buffer, attrs: attributes, start: UInt16(idx), delta: UInt16(idx), inline: false) } - /// Writes the specified list of extended atrribute entries and their values to the provided - /// This method does not fill in any headers (Inode inline / block level) that may be requried to parse these attributes + /// Writes the specified list of extended attribute entries and their values to the provided + /// This method does not fill in any headers (Inode inline / block level) that may be required to parse these attributes /// /// - Parameters: /// - buffer: An array of [UInt8] where the data will be written into diff --git a/Sources/ContainerizationOCI/AnnotationKeys.swift b/Sources/ContainerizationOCI/AnnotationKeys.swift index 9239f5aa..cd01dd29 100644 --- a/Sources/ContainerizationOCI/AnnotationKeys.swift +++ b/Sources/ContainerizationOCI/AnnotationKeys.swift @@ -15,7 +15,7 @@ // limitations under the License. //===----------------------------------------------------------------------===// -/// AnnotationKeys contains a subset of "dictionary keys" for commonly used annotaions in an OCI Image Descriptor +/// AnnotationKeys contains a subset of "dictionary keys" for commonly used annotations in an OCI Image Descriptor /// https://github.com/opencontainers/image-spec/blob/main/annotations.md public struct AnnotationKeys: Codable, Sendable { public static let containerizationImageName = "com.apple.containerization.image.name" diff --git a/Sources/ContainerizationOCI/Content/Content.swift b/Sources/ContainerizationOCI/Content/Content.swift index acae9846..7ba2cab4 100644 --- a/Sources/ContainerizationOCI/Content/Content.swift +++ b/Sources/ContainerizationOCI/Content/Content.swift @@ -31,7 +31,7 @@ public protocol Content: Sendable { /// Size of content func size() throws -> UInt64 - /// Data represenatation of entire content + /// Data representation of entire content func data() throws -> Data /// Data representation partial content diff --git a/Sources/ContainerizationOS/AsyncSignalHandler.swift b/Sources/ContainerizationOS/AsyncSignalHandler.swift index 4ddef04b..db1c9965 100644 --- a/Sources/ContainerizationOS/AsyncSignalHandler.swift +++ b/Sources/ContainerizationOS/AsyncSignalHandler.swift @@ -58,8 +58,8 @@ public final class AsyncSignalHandler: Sendable { } // We keep a reference to the continuation object that is created for - // our AsyncStream and tell our singal handler to yield a value to it - // returing a value to the consumer + // our AsyncStream and tell our signal handler to yield a value to it + // returning a value to the consumer private func handler(_ sig: Int32) { self.state.withLock { for cont in $0.conts { diff --git a/Sources/ContainerizationOS/Linux/Binfmt.swift b/Sources/ContainerizationOS/Linux/Binfmt.swift index ab125e5d..e1ceb31d 100644 --- a/Sources/ContainerizationOS/Linux/Binfmt.swift +++ b/Sources/ContainerizationOS/Linux/Binfmt.swift @@ -25,7 +25,7 @@ import Glibc private let _mount = Glibc.mount #endif -/// `Binfmt` is a utlity type that contains static helpers and types for +/// `Binfmt` is a utility type that contains static helpers and types for /// mounting the Linux binfmt_misc filesystem, and creating new binfmt entries. public struct Binfmt: Sendable { /// Default mount path for binfmt_misc. diff --git a/Sources/ContainerizationOS/Linux/Epoll.swift b/Sources/ContainerizationOS/Linux/Epoll.swift index 3619bcb1..40332aa0 100644 --- a/Sources/ContainerizationOS/Linux/Epoll.swift +++ b/Sources/ContainerizationOS/Linux/Epoll.swift @@ -133,7 +133,7 @@ public final class Epoll: Sendable { self.handlers.del(fd) } - // The errno's here are accepable and can happen if the caller + // The errno's here are acceptable and can happen if the caller // closed the underlying fd before calling delete(). private func acceptableDeletionErrno() -> Bool { errno == ENOENT || errno == EBADF || errno == EPERM diff --git a/Tests/ContainerizationOCITests/OCIImageTests.swift b/Tests/ContainerizationOCITests/OCIImageTests.swift index cc6600e9..3a3ece7e 100644 --- a/Tests/ContainerizationOCITests/OCIImageTests.swift +++ b/Tests/ContainerizationOCITests/OCIImageTests.swift @@ -40,26 +40,26 @@ struct OCITests { } @Test func index() { - var desciptors: [ContainerizationOCI.Descriptor] = [] + var descriptors: [ContainerizationOCI.Descriptor] = [] for i in 0..<5 { let descriptor = ContainerizationOCI.Descriptor(mediaType: MediaTypes.descriptor, digest: "\(i)", size: Int64(i)) - desciptors.append(descriptor) + descriptors.append(descriptor) } - let index = ContainerizationOCI.Index(schemaVersion: 1, manifests: desciptors) + let index = ContainerizationOCI.Index(schemaVersion: 1, manifests: descriptors) #expect(index.manifests.count == 5) } @Test func manifests() { - var desciptors: [ContainerizationOCI.Descriptor] = [] + var descriptors: [ContainerizationOCI.Descriptor] = [] for i in 0..<5 { let descriptor = ContainerizationOCI.Descriptor(mediaType: MediaTypes.descriptor, digest: "\(i)", size: Int64(i)) - desciptors.append(descriptor) + descriptors.append(descriptor) } let config = ContainerizationOCI.Descriptor(mediaType: MediaTypes.descriptor, digest: "123", size: 0) - let manifest = ContainerizationOCI.Manifest(schemaVersion: 1, config: config, layers: desciptors) + let manifest = ContainerizationOCI.Manifest(schemaVersion: 1, config: config, layers: descriptors) #expect(manifest.config.digest == "123") #expect(manifest.layers.count == 5) }