Merge pull request #23398 from yarikoptic/enh-codespell

Add codespell support (config, workflow to detect/not fix) and make it fix few typos
This commit is contained in:
openshift-merge-bot[bot] 2024-09-05 18:53:25 +00:00 committed by GitHub
commit ae14dff812
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 25 additions and 13 deletions

6
.codespellrc Normal file
View File

@ -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

View File

@ -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 \ podman run -it \
-v ./.github/renovate.json5:/usr/src/app/renovate.json5:z \ -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 ***** ****** Global/general configuration options *****
*************************************************/ *************************************************/
// Re-use predefined sets of configuration options to DRY // Reuse predefined sets of configuration options to DRY
"extends": [ "extends": [
// https://github.com/containers/automation/blob/main/renovate/defaults.json5 // https://github.com/containers/automation/blob/main/renovate/defaults.json5
"github>containers/automation//renovate/defaults.json5" "github>containers/automation//renovate/defaults.json5"

View File

@ -14,7 +14,7 @@ on:
- cron: '03 03 * * 1-5' - cron: '03 03 * * 1-5'
# Debug: Allow triggering job manually in github-actions WebUI # Debug: Allow triggering job manually in github-actions WebUI
workflow_dispatch: {} 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 # Ref: https://docs.github.com/en/actions/using-workflows/reusing-workflows
workflow_call: workflow_call:
secrets: secrets:

View File

@ -11,7 +11,7 @@ name: "Lock closed issues and PRs"
on: on:
schedule: schedule:
- cron: '0 0 * * *' - 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 # Ref: https://docs.github.com/en/actions/using-workflows/reusing-workflows
workflow_call: workflow_call:
secrets: secrets:

View File

@ -13,7 +13,7 @@ on:
- cron: '01 01 * * 1-5' - cron: '01 01 * * 1-5'
# Debug: Allow triggering job manually in github-actions WebUI # Debug: Allow triggering job manually in github-actions WebUI
workflow_dispatch: {} 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 # Ref: https://docs.github.com/en/actions/using-workflows/reusing-workflows
workflow_call: workflow_call:
secrets: secrets:

View File

@ -101,7 +101,7 @@ jobs:
steps.checkversion.outputs.needsUpdate == 'true' && steps.checkversion.outputs.needsUpdate == 'true' &&
steps.checkpr.outputs.prexists == 'false' steps.checkpr.outputs.prexists == 'false'
run: | 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 # 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.name ${{ github.actor }}
git config --local user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com" git config --local user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"

View File

@ -20,3 +20,8 @@ repos:
- id: check-executables-have-shebangs - id: check-executables-have-shebangs
- id: check-merge-conflict - id: check-merge-conflict
- id: check-yaml - id: check-yaml
- repo: https://github.com/codespell-project/codespell
# Configuration for codespell is in .codespellrc
rev: v2.2.6
hooks:
- id: codespell

View File

@ -307,7 +307,8 @@ test/version/version: version/version.go
.PHONY: codespell .PHONY: codespell
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 # Code validation target that **DOES NOT** require building podman binaries
.PHONY: validate-source .PHONY: validate-source

View File

@ -147,7 +147,7 @@ podman manifest add mylist:v1.11 docker://fedora
71c201d10fffdcac52968a000d85a0a016ca1c7d5473948000d3131c1773d965 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 podman manifest add --all mylist:v1.11 docker://fedora
71c201d10fffdcac52968a000d85a0a016ca1c7d5473948000d3131c1773d965 71c201d10fffdcac52968a000d85a0a016ca1c7d5473948000d3131c1773d965

View File

@ -213,11 +213,11 @@ type ContainerBasicConfig struct {
// container. // container.
// Optional. // Optional.
EnvMerge []string `json:"envmerge,omitempty"` 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. // Optional.
UnsetEnv []string `json:"unsetenv,omitempty"` UnsetEnv []string `json:"unsetenv,omitempty"`
// UnsetEnvAll unsetall default environment variables from the image or from buildin or containers.conf // 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 buildin // UnsetEnvAll unsets all default environment variables from the image or from built-in
// Optional. // Optional.
UnsetEnvAll *bool `json:"unsetenvall,omitempty"` UnsetEnvAll *bool `json:"unsetenvall,omitempty"`
// Passwd is a container run option that determines if we are validating users/groups before running the container // Passwd is a container run option that determines if we are validating users/groups before running the container

View File

@ -92,7 +92,7 @@ t POST libpod/containers/create name=test1 image=$IMAGE privileged=true 201
t GET libpod/containers/test1/json 200 \ t GET libpod/containers/test1/json 200 \
.HostConfig.Annotations.'"io.podman.annotations.privileged"'="TRUE" .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 POST libpod/containers/create name=test2 image=$IMAGE 201
t GET libpod/containers/test2/json 200 \ t GET libpod/containers/test2/json 200 \
.HostConfig.Annotations=null .HostConfig.Annotations=null