From 8d14d415558b3425f427b974319dc19fdd09268a Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sun, 28 Jan 2024 07:30:52 -0500 Subject: [PATCH] Run codespell on code Signed-off-by: Daniel J Walsh --- Makefile | 2 +- contrib/cirrus/CIModes.md | 2 +- contrib/cirrus/mac_env.sh | 2 +- libpod/container_config.go | 2 +- libpod/sqlite_state.go | 2 +- pkg/bindings/errors.go | 2 +- pkg/domain/entities/containers.go | 2 +- pkg/domain/entities/manifest.go | 2 +- pkg/domain/entities/pods.go | 2 +- pkg/domain/infra/abi/play.go | 2 +- pkg/domain/infra/abi/pods.go | 2 +- pkg/domain/infra/tunnel/pods.go | 2 +- pkg/k8s.io/api/core/v1/types.go | 2 +- pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go | 2 +- pkg/machine/ignition/ignition.go | 2 +- test/system/300-cli-parsing.bats | 2 +- test/system/500-networking.bats | 2 +- test/system/800-config.bats | 2 +- utils/utils.go | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index ec2c50975b..68fb105ed4 100644 --- a/Makefile +++ b/Makefile @@ -304,7 +304,7 @@ test/version/version: version/version.go .PHONY: codespell codespell: - codespell -S bin,vendor,.git,go.sum,.cirrus.yml,"*.fish,RELEASE_NOTES.md,*.xz,*.gz,*.ps1,*.tar,swagger.yaml,*.tgz,bin2img,*ico,*.png,*.1,*.5,copyimg,*.orig,apidoc.go" -L passt,bu,hastable,te,clos,ans,pullrequest,uint,iff,od,seeked,splitted,marge,erro,hist,ether,specif -w + codespell -S bin,vendor,.git,go.sum,.cirrus.yml,"*.fish,RELEASE_NOTES.md,*.xz,*.gz,*.ps1,*.tar,swagger.yaml,*.tgz,bin2img,*ico,*.png,*.1,*.5,copyimg,*.orig,apidoc.go" -L secon,passt,bu,hastable,te,clos,ans,pullrequest,uint,iff,od,seeked,splitted,marge,erro,hist,ether,specif -w .PHONY: validate validate: lint .gitvalidation validate.completions man-page-check swagger-check tests-included tests-expect-exit pr-removes-fixed-skips diff --git a/contrib/cirrus/CIModes.md b/contrib/cirrus/CIModes.md index 93dafb904f..409334ab73 100644 --- a/contrib/cirrus/CIModes.md +++ b/contrib/cirrus/CIModes.md @@ -19,7 +19,7 @@ outdated) example of it's output can be seen below: While it's arguably easier to read that `only_if`, it leads to a cluttered status output that's harder to page through when reviewing PRs. As opposed to `only_if` which will bypass creation of the task (at runtime) completely. - Also, by sticking to one conditional style, it's easier to re-use the YAML + Also, by sticking to one conditional style, it's easier to reuse the YAML statements across multiple tasks. + The only variables which can be used as part of conditions are defined by diff --git a/contrib/cirrus/mac_env.sh b/contrib/cirrus/mac_env.sh index 35431de5ff..ce9eed793c 100755 --- a/contrib/cirrus/mac_env.sh +++ b/contrib/cirrus/mac_env.sh @@ -4,7 +4,7 @@ set -euo pipefail # This script is intended to be called by Cirrus-CI on a Mac M1 persistent worker. # It runs /after/ `mac_setup.sh` to help developers debug any environment -# related issues. It must not make any actualy changes to the environment. +# related issues. It must not make any actually changes to the environment. # Many variables can affect operations, make them all known to assist debugging. echo "Selection of current env. vars:" diff --git a/libpod/container_config.go b/libpod/container_config.go index 00fac9f3ed..f3f9b000a9 100644 --- a/libpod/container_config.go +++ b/libpod/container_config.go @@ -160,7 +160,7 @@ type ContainerRootFSConfig struct { // pre-1.8, which was used in very old Podman versions to determine how // image volumes were handled in Libpod (support for these eventually // moved out of Libpod into pkg/specgen). - // Please DO NOT re-use the `imageVolumes` name in container JSON again. + // Please DO NOT reuse the `imageVolumes` name in container JSON again. ImageVolumes []*ContainerImageVolume `json:"ctrImageVolumes,omitempty"` // CreateWorkingDir indicates that Libpod should create the container's // working directory if it does not exist. Some OCI runtimes do this by diff --git a/libpod/sqlite_state.go b/libpod/sqlite_state.go index e3d8b9dad6..4a59a141ef 100644 --- a/libpod/sqlite_state.go +++ b/libpod/sqlite_state.go @@ -40,7 +40,7 @@ const ( sqliteOptionForeignKeys = "&_foreign_keys=1" // Make sure that transactions happen exclusively. sqliteOptionTXLock = "&_txlock=exclusive" - // Make sure busy timeout is set to high value to keep retying when the db is locked. + // Make sure busy timeout is set to high value to keep retrying when the db is locked. // Timeout is in ms, so set it to 100s to have enough time to retry the operations. sqliteOptionBusyTimeout = "&_busy_timeout=100000" diff --git a/pkg/bindings/errors.go b/pkg/bindings/errors.go index a7cbeb30ae..46d3a70244 100644 --- a/pkg/bindings/errors.go +++ b/pkg/bindings/errors.go @@ -71,7 +71,7 @@ type APIVersionError struct { // NewAPIVersionError create bindings error when the endpoint on the server is not supported // because the version is to old. -// - endpoint is the name fo the endpoint (e.g. /containers/json) +// - endpoint is the name for the endpoint (e.g. /containers/json) // - version is the server API version // - requiredVersion is the server version need to use said endpoint func NewAPIVersionError(endpoint string, version *semver.Version, requiredVersion string) *APIVersionError { diff --git a/pkg/domain/entities/containers.go b/pkg/domain/entities/containers.go index 0231c8c990..1a05588623 100644 --- a/pkg/domain/entities/containers.go +++ b/pkg/domain/entities/containers.go @@ -481,7 +481,7 @@ type ContainerRenameOptions struct { NewName string } -// ContainerCloneOptions contains options for cloning an existing continer +// ContainerCloneOptions contains options for cloning an existing container type ContainerCloneOptions struct { ID string Destroy bool diff --git a/pkg/domain/entities/manifest.go b/pkg/domain/entities/manifest.go index 22d83a80c0..943a29e054 100644 --- a/pkg/domain/entities/manifest.go +++ b/pkg/domain/entities/manifest.go @@ -48,7 +48,7 @@ type ManifestAddOptions struct { type ManifestAnnotateOptions struct { // Annotation to add to manifest list Annotation []string `json:"annotation" schema:"annotation"` - // Annotations to add to manifest list by a map which is prefferred over Annotation + // Annotations to add to manifest list by a map which is preferred over Annotation Annotations map[string]string `json:"annotations" schema:"annotations"` // Arch overrides the architecture for the image Arch string `json:"arch" schema:"arch"` diff --git a/pkg/domain/entities/pods.go b/pkg/domain/entities/pods.go index 2d26b08260..32b6b2f2ee 100644 --- a/pkg/domain/entities/pods.go +++ b/pkg/domain/entities/pods.go @@ -464,7 +464,7 @@ func ValidatePodStatsOptions(args []string, options *PodStatsOptions) error { // PodLogsOptionsToContainerLogsOptions converts PodLogOptions to ContainerLogOptions func PodLogsOptionsToContainerLogsOptions(options PodLogsOptions) ContainerLogsOptions { // PodLogsOptions are similar but contains few extra fields like ctrName - // So cast other values as is so we can re-use the code + // So cast other values as is so we can reuse the code containerLogsOpts := ContainerLogsOptions{ Details: options.Details, Latest: options.Latest, diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go index eacaf09953..3ca8f18a5d 100644 --- a/pkg/domain/infra/abi/play.go +++ b/pkg/domain/infra/abi/play.go @@ -630,7 +630,7 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY // error out instead reuse the current volume. vol, err = ic.Libpod.GetVolume(v.Source) if err != nil { - return nil, nil, fmt.Errorf("cannot re-use local volume for volume from configmap %q: %w", v.Source, err) + return nil, nil, fmt.Errorf("cannot reuse local volume for volume from configmap %q: %w", v.Source, err) } } else { return nil, nil, fmt.Errorf("cannot create a local volume for volume from configmap %q: %w", v.Source, err) diff --git a/pkg/domain/infra/abi/pods.go b/pkg/domain/infra/abi/pods.go index 65c16afa21..b3e8714a56 100644 --- a/pkg/domain/infra/abi/pods.go +++ b/pkg/domain/infra/abi/pods.go @@ -121,7 +121,7 @@ func (ic *ContainerEngine) PodLogs(ctx context.Context, nameOrID string, options } // PodLogsOptions are similar but contains few extra fields like ctrName - // So cast other values as is so we can re-use the code + // So cast other values as is so we can reuse the code containerLogsOpts := entities.PodLogsOptionsToContainerLogsOptions(options) return ic.ContainerLogs(ctx, ctrNames, containerLogsOpts) diff --git a/pkg/domain/infra/tunnel/pods.go b/pkg/domain/infra/tunnel/pods.go index f9314dcfee..76526181e6 100644 --- a/pkg/domain/infra/tunnel/pods.go +++ b/pkg/domain/infra/tunnel/pods.go @@ -46,7 +46,7 @@ func (ic *ContainerEngine) PodKill(ctx context.Context, namesOrIds []string, opt func (ic *ContainerEngine) PodLogs(ctx context.Context, nameOrIDs string, options entities.PodLogsOptions) error { // PodLogsOptions are similar but contains few extra fields like ctrName - // So cast other values as is so we can re-use the code + // So cast other values as is so we can reuse the code containerLogsOpts := entities.PodLogsOptionsToContainerLogsOptions(options) // interface only accepts slice, keep everything consistent diff --git a/pkg/k8s.io/api/core/v1/types.go b/pkg/k8s.io/api/core/v1/types.go index 904e50f18b..e5bfbebf92 100644 --- a/pkg/k8s.io/api/core/v1/types.go +++ b/pkg/k8s.io/api/core/v1/types.go @@ -5013,7 +5013,7 @@ type RollingUpdateDaemonSet struct { // pod is available (Ready for at least minReadySeconds) the old DaemonSet pod // on that node is marked deleted. If the old pod becomes unavailable for any // reason (Ready transitions to false, is evicted, or is drained) an updated - // pod is immediatedly created on that node without considering surge limits. + // pod is immediately created on that node without considering surge limits. // Allowing surge implies the possibility that the resources consumed by the // daemonset on any given node can double if the readiness check fails, and // so resource intensive daemonsets should take into account that they may diff --git a/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go b/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go index 32ef1af089..164febc53e 100644 --- a/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go +++ b/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go @@ -87,7 +87,7 @@ import ( // // This format is intended to make it difficult to use these numbers without // writing some sort of special handling code in the hopes that that will -// cause implementors to also use a fixed point implementation. +// cause implementers to also use a fixed point implementation. // // +protobuf=true // +protobuf.embed=string diff --git a/pkg/machine/ignition/ignition.go b/pkg/machine/ignition/ignition.go index 2f63aa5c12..94a1ebd0cf 100644 --- a/pkg/machine/ignition/ignition.go +++ b/pkg/machine/ignition/ignition.go @@ -781,7 +781,7 @@ func GetPodmanDockerTmpConfig(uid int, rootful bool, newline bool) string { } // SetIgnitionFile creates a new Machine File for the machine's ignition file -// and assignes the handle to `loc` +// and assigns the handle to `loc` func SetIgnitionFile(loc *define.VMFile, vmtype define.VMType, vmName, vmConfigDir string) error { ignitionFile, err := define.NewMachineFile(filepath.Join(vmConfigDir, vmName+".ign"), nil) if err != nil { diff --git a/test/system/300-cli-parsing.bats b/test/system/300-cli-parsing.bats index 16110e60ef..a83118276c 100644 --- a/test/system/300-cli-parsing.bats +++ b/test/system/300-cli-parsing.bats @@ -146,7 +146,7 @@ EOF echo "-----------------" cat -vET $envfile2 - # See above for resoning behind 'env -0' and a results file + # See above for reasoning behind 'env -0' and a results file local resultsfile="$PODMAN_TMPDIR/envresults" touch $resultsfile run_podman run --rm -v "$resultsfile:/envresults:Z" \ diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats index 6f2fa72571..f774c3e86c 100644 --- a/test/system/500-networking.bats +++ b/test/system/500-networking.bats @@ -880,7 +880,7 @@ EOF fi local net1=a-$(random_string 10) - # use /29 subnet to limt available ip space, a 29 gives 5 usable addresses (6 - 1 for the gw) + # use /29 subnet to limit available ip space, a 29 gives 5 usable addresses (6 - 1 for the gw) local subnet="$(random_rfc1918_subnet).0/29" run_podman network create --subnet $subnet $net1 local cname=con-$(random_string 10) diff --git a/test/system/800-config.bats b/test/system/800-config.bats index 13b56a0e92..1efde8d4d4 100644 --- a/test/system/800-config.bats +++ b/test/system/800-config.bats @@ -244,7 +244,7 @@ EOF run_podman container exec $cname grep CapBnd /proc/self/status non_privileged_caps="$output" run_podman --module=$conf_tmp container exec $cname grep CapBnd /proc/self/status - assert "$output" != "$non_privileged_caps" "--module should enable a prvileged exec session" + assert "$output" != "$non_privileged_caps" "--module should enable a privileged exec session" run_podman rm -f -t0 $cname } diff --git a/utils/utils.go b/utils/utils.go index f06c256e98..bfca839140 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -56,7 +56,7 @@ func UntarToFileSystem(dest string, tarball *os.File, options *archive.TarOption return archive.Untar(tarball, dest, options) } -// Creates a new tar file and wrties bytes from io.ReadCloser +// Creates a new tar file and writes bytes from io.ReadCloser func CreateTarFromSrc(source string, dest string) error { file, err := os.Create(dest) if err != nil {