From 4700b5a58a7e27af48121f3d74fda4075f902b45 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 24 Jul 2024 10:29:12 -1000 Subject: [PATCH 1/3] Add codespell config, pre-commit definition, and move options from Makefile Signed-off-by: Yaroslav Halchenko --- .codespellrc | 6 ++++++ .pre-commit-config.yaml | 5 +++++ Makefile | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000000..d701e173c4 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,6 @@ +[codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = 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 +check-hidden = true +ignore-regex = \b(Not|assert)In\b +ignore-words-list = ddress,secon,passt,bu,hastable,te,clos,ans,pullrequest,uint,iff,od,seeked,splitted,marge,erro,hist,ether,specif,whit diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 936b0b14d0..ec9b202ece 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,3 +20,8 @@ repos: - id: check-executables-have-shebangs - id: check-merge-conflict - id: check-yaml + - repo: https://github.com/codespell-project/codespell + # Configuration for codespell is in .codespellrc + rev: v2.2.6 + hooks: + - id: codespell diff --git a/Makefile b/Makefile index db73caae6e..217e4cfbc8 100644 --- a/Makefile +++ b/Makefile @@ -307,7 +307,8 @@ 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 ddress,secon,passt,bu,hastable,te,clos,ans,pullrequest,uint,iff,od,seeked,splitted,marge,erro,hist,ether,specif -w + # Configuration for codespell is in .codespellrc + codespell -w # Code validation target that **DOES NOT** require building podman binaries .PHONY: validate-source From 12b3d014385c213f09c54a57c865d1c19ddcbab1 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 24 Jul 2024 10:41:30 -1000 Subject: [PATCH 2/3] Fix typo: replace buildin with built-in Signed-off-by: Yaroslav Halchenko --- pkg/specgen/specgen.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/specgen/specgen.go b/pkg/specgen/specgen.go index 1299daf3de..ab4aeb7aec 100644 --- a/pkg/specgen/specgen.go +++ b/pkg/specgen/specgen.go @@ -213,11 +213,11 @@ type ContainerBasicConfig struct { // container. // Optional. EnvMerge []string `json:"envmerge,omitempty"` - // UnsetEnv unsets the specified default environment variables from the image or from buildin or containers.conf + // UnsetEnv unsets the specified default environment variables from the image or from built-in or containers.conf // Optional. UnsetEnv []string `json:"unsetenv,omitempty"` - // UnsetEnvAll unsetall default environment variables from the image or from buildin or containers.conf - // UnsetEnvAll unsets all default environment variables from the image or from buildin + // UnsetEnvAll unsetall default environment variables from the image or from built-in or containers.conf + // UnsetEnvAll unsets all default environment variables from the image or from built-in // Optional. UnsetEnvAll *bool `json:"unsetenvall,omitempty"` // Passwd is a container run option that determines if we are validating users/groups before running the container From c203c48c7025df01d85e4b5d2176c45c6be2d9b2 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 24 Jul 2024 10:41:36 -1000 Subject: [PATCH 3/3] Detect and fix typos using codespell Signed-off-by: Yaroslav Halchenko --- .github/renovate.json5 | 4 ++-- .github/workflows/check_cirrus_cron.yml | 2 +- .github/workflows/issue_pr_lock.yml | 2 +- .github/workflows/rerun_cirrus_cron.yml | 2 +- .github/workflows/update-podmanio.yml | 2 +- RELEASE_PROCESS.md | 2 +- docs/source/markdown/podman-manifest-add.1.md.in | 2 +- test/apiv2/25-containersMore.at | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index d34fb7a6e1..f9edf48a9a 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,6 +1,6 @@ /* -Validate this file before commiting with (from repository root): +Validate this file before committing with (from repository root): podman run -it \ -v ./.github/renovate.json5:/usr/src/app/renovate.json5:z \ @@ -17,7 +17,7 @@ and/or use the pre-commit hook: https://github.com/renovatebot/pre-commit-hooks ****** Global/general configuration options ***** *************************************************/ - // Re-use predefined sets of configuration options to DRY + // Reuse predefined sets of configuration options to DRY "extends": [ // https://github.com/containers/automation/blob/main/renovate/defaults.json5 "github>containers/automation//renovate/defaults.json5" diff --git a/.github/workflows/check_cirrus_cron.yml b/.github/workflows/check_cirrus_cron.yml index 8b8dfe78b3..527b8a14b2 100644 --- a/.github/workflows/check_cirrus_cron.yml +++ b/.github/workflows/check_cirrus_cron.yml @@ -14,7 +14,7 @@ on: - cron: '03 03 * * 1-5' # Debug: Allow triggering job manually in github-actions WebUI workflow_dispatch: {} - # Allow re-use of this workflow by other repositories + # Allow reuse of this workflow by other repositories # Ref: https://docs.github.com/en/actions/using-workflows/reusing-workflows workflow_call: secrets: diff --git a/.github/workflows/issue_pr_lock.yml b/.github/workflows/issue_pr_lock.yml index fee1e7f7d6..955f2bbaa7 100644 --- a/.github/workflows/issue_pr_lock.yml +++ b/.github/workflows/issue_pr_lock.yml @@ -11,7 +11,7 @@ name: "Lock closed issues and PRs" on: schedule: - cron: '0 0 * * *' - # Allow re-use of this workflow by other repositories + # Allow reuse of this workflow by other repositories # Ref: https://docs.github.com/en/actions/using-workflows/reusing-workflows workflow_call: secrets: diff --git a/.github/workflows/rerun_cirrus_cron.yml b/.github/workflows/rerun_cirrus_cron.yml index 7ab05d3a78..8d266094e7 100644 --- a/.github/workflows/rerun_cirrus_cron.yml +++ b/.github/workflows/rerun_cirrus_cron.yml @@ -13,7 +13,7 @@ on: - cron: '01 01 * * 1-5' # Debug: Allow triggering job manually in github-actions WebUI workflow_dispatch: {} - # Allow re-use of this workflow by other repositories + # Allow reuse of this workflow by other repositories # Ref: https://docs.github.com/en/actions/using-workflows/reusing-workflows workflow_call: secrets: diff --git a/.github/workflows/update-podmanio.yml b/.github/workflows/update-podmanio.yml index 84aacccddf..8f1287cef2 100644 --- a/.github/workflows/update-podmanio.yml +++ b/.github/workflows/update-podmanio.yml @@ -101,7 +101,7 @@ jobs: steps.checkversion.outputs.needsUpdate == 'true' && steps.checkpr.outputs.prexists == 'false' run: | - # Make commiter the user who triggered the action, either through cutting a release or manual trigger + # Make committer the user who triggered the action, either through cutting a release or manual trigger # GitHub gives everyone a noreply email associated with their account, use that email for the sign-off git config --local user.name ${{ github.actor }} git config --local user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md index abd361e25d..0bfbfb9d44 100644 --- a/RELEASE_PROCESS.md +++ b/RELEASE_PROCESS.md @@ -253,7 +253,7 @@ spelled with complete minutiae. event states triggered, but this can be ignored, as any duplicates will gracefully back-off. The job takes 5-6 minutes to complete. - Please note that the Windows action depends onthe artifact action, and will be + Please note that the Windows action depends on the artifact action, and will be triggered after the artifact action succeeds. If any of these actions are somehow not triggered, you can manually trigger them diff --git a/docs/source/markdown/podman-manifest-add.1.md.in b/docs/source/markdown/podman-manifest-add.1.md.in index 4c9e6c09de..db02b00c05 100644 --- a/docs/source/markdown/podman-manifest-add.1.md.in +++ b/docs/source/markdown/podman-manifest-add.1.md.in @@ -147,7 +147,7 @@ podman manifest add mylist:v1.11 docker://fedora 71c201d10fffdcac52968a000d85a0a016ca1c7d5473948000d3131c1773d965 ``` -Add all images from source manfest list to destination manifest list: +Add all images from source manifest list to destination manifest list: ``` podman manifest add --all mylist:v1.11 docker://fedora 71c201d10fffdcac52968a000d85a0a016ca1c7d5473948000d3131c1773d965 diff --git a/test/apiv2/25-containersMore.at b/test/apiv2/25-containersMore.at index f86194ba86..a7679817ad 100644 --- a/test/apiv2/25-containersMore.at +++ b/test/apiv2/25-containersMore.at @@ -92,7 +92,7 @@ t POST libpod/containers/create name=test1 image=$IMAGE privileged=true 201 t GET libpod/containers/test1/json 200 \ .HostConfig.Annotations.'"io.podman.annotations.privileged"'="TRUE" -# now the same without privileged it should not inhert the privileged from before +# now the same without privileged it should not inherit the privileged from before t POST libpod/containers/create name=test2 image=$IMAGE 201 t GET libpod/containers/test2/json 200 \ .HostConfig.Annotations=null