mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-11 18:46:41 +00:00
fix: Typos and add more spell checking rules to CI (#6415)
* fix: Typos and add more spell checking rules to CI Signed-off-by: Mateus Oliveira <msouzaol@redhat.com> * fixup! fix: Typos and add more spell checking rules to CI Signed-off-by: Mateus Oliveira <msouzaol@redhat.com> * fixup! fix: Typos and add more spell checking rules to CI Signed-off-by: Mateus Oliveira <msouzaol@redhat.com> * fixup! fix: Typos and add more spell checking rules to CI Signed-off-by: Mateus Oliveira <msouzaol@redhat.com> * fixup! fix: Typos and add more spell checking rules to CI Signed-off-by: Mateus Oliveira <msouzaol@redhat.com> * fixup! fix: Typos and add more spell checking rules to CI Signed-off-by: Mateus Oliveira <msouzaol@redhat.com> * fixup! fix: Typos and add more spell checking rules to CI Signed-off-by: Mateus Oliveira <msouzaol@redhat.com> * fixup! fix: Typos and add more spell checking rules to CI Signed-off-by: Mateus Oliveira <msouzaol@redhat.com> --------- Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
This commit is contained in:
@@ -49,7 +49,7 @@ jobs:
|
||||
run: |
|
||||
make local
|
||||
|
||||
# Check the common CLI against all kubernetes versions
|
||||
# Check the common CLI against all Kubernetes versions
|
||||
crd-check:
|
||||
needs: build-cli
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
run: |
|
||||
IMAGE=velero VERSION=pr-test make container
|
||||
docker save velero:pr-test -o ./velero.tar
|
||||
# Run E2E test against all kubernetes versions on kind
|
||||
# Run E2E test against all Kubernetes versions on kind
|
||||
run-e2e-test:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -14,7 +14,44 @@ jobs:
|
||||
uses: codespell-project/actions-codespell@master
|
||||
with:
|
||||
# ignore the config/.../crd.go file as it's generated binary data that is edited elswhere.
|
||||
skip: .git,*.png,*.jpg,*.woff,*.ttf,*.gif,*.ico,./config/crd/v1beta1/crds/crds.go,./config/crd/v1/crds/crds.go,,./config/crd/v2alpha1/crds/crds.go,./go.sum,./LICENSE
|
||||
skip: .git,*.png,*.jpg,*.woff,*.ttf,*.gif,*.ico,./config/crd/v1beta1/crds/crds.go,./config/crd/v1/crds/crds.go,./config/crd/v2alpha1/crds/crds.go,./go.sum,./LICENSE
|
||||
ignore_words_list: iam,aks,ist,bridget,ue,shouldnot,atleast
|
||||
check_filenames: true
|
||||
check_hidden: true
|
||||
|
||||
- name: Velero.io word list check
|
||||
shell: bash {0}
|
||||
run: |
|
||||
IGNORE_COMMENT="Velero.io word list : ignore"
|
||||
FILES_TO_CHECK=$(find . -type f \
|
||||
! -path "./.git/*" \
|
||||
! -path "./site/content/docs/v*" \
|
||||
! -path "./changelogs/CHANGELOG-*" \
|
||||
! -path "./.github/workflows/pr-codespell.yml" \
|
||||
! -path "./site/static/fonts/Metropolis/Open Font License.md" \
|
||||
! -regex '.*\.\(png\|jpg\|woff\|ttf\|gif\|ico\|svg\)'
|
||||
)
|
||||
function check_word_in_files() {
|
||||
local word=$1
|
||||
|
||||
xargs grep -Iinr "$word" <<< "$FILES_TO_CHECK" | \
|
||||
grep -v "$IGNORE_COMMENT" | \
|
||||
grep -i --color=always "$word" && \
|
||||
EXIT_STATUS=1
|
||||
}
|
||||
function check_word_case_sensitive_in_files() {
|
||||
local word=$1
|
||||
|
||||
xargs grep -Inr "$word" <<< "$FILES_TO_CHECK" | \
|
||||
grep -v "$IGNORE_COMMENT" | \
|
||||
grep --color=always "$word" && \
|
||||
EXIT_STATUS=1
|
||||
}
|
||||
EXIT_STATUS=0
|
||||
check_word_case_sensitive_in_files ' kubernetes '
|
||||
check_word_in_files 'on-premise\b'
|
||||
check_word_in_files 'back-up'
|
||||
check_word_in_files 'plug-in'
|
||||
check_word_in_files 'whitelist'
|
||||
check_word_in_files 'blacklist'
|
||||
exit $EXIT_STATUS
|
||||
|
||||
Reference in New Issue
Block a user