From e077c1fdf5bbc1e70b6b214ba695ff7f920ce509 Mon Sep 17 00:00:00 2001 From: Yati Padia Date: Wed, 11 Aug 2021 10:33:37 +0530 Subject: [PATCH] cleanup: run codespell on containerized testing This commit adds a new target codespell to the make containerized-test. Fixes: #2229 Signed-off-by: Yati Padia --- .github/workflows/codespell.yaml | 7 +------ Makefile | 6 ++++-- scripts/Dockerfile.test | 1 + scripts/codespell.conf | 4 ++++ 4 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 scripts/codespell.conf diff --git a/.github/workflows/codespell.yaml b/.github/workflows/codespell.yaml index 4fd9251b7..bbc0e989e 100644 --- a/.github/workflows/codespell.yaml +++ b/.github/workflows/codespell.yaml @@ -14,9 +14,4 @@ jobs: steps: - uses: actions/checkout@v2 - name: codespell - uses: codespell-project/actions-codespell@master - with: - skip: .git,./vendor,./docs/design/proposals/images - check_filenames: true - ignore_words_list: ExtraVersion,extraversion,ba - check_hidden: true + run: CONTAINER_CMD=docker make containerized-test TARGET=codespell diff --git a/Makefile b/Makefile index 1b89d2662..a69a55916 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ endif all: cephcsi -.PHONY: go-test static-check mod-check go-lint lint-extras gosec commitlint +.PHONY: go-test static-check mod-check go-lint lint-extras gosec commitlint codespell ifeq ($(CONTAINERIZED),no) # include mod-check in non-containerized runs test: go-test static-check mod-check @@ -95,7 +95,7 @@ else # exclude mod-check for containerized runs (CI runs it separately) test: go-test static-check endif -static-check: check-env go-lint lint-extras gosec +static-check: check-env codespell go-lint lint-extras gosec go-test: TEST_COVERAGE ?= $(shell . $(CURDIR)/build.env ; echo $${TEST_COVERAGE}) go-test: GO_COVER_DIR ?= $(shell . $(CURDIR)/build.env ; echo $${GO_COVER_DIR}) @@ -139,6 +139,8 @@ func-test: check-env: @./scripts/check-env.sh +codespell: + codespell --config scripts/codespell.conf # # commitlint will do a rebase on top of GIT_SINCE when REBASE=1 is passed. # diff --git a/scripts/Dockerfile.test b/scripts/Dockerfile.test index 0178594a6..ae59e01c0 100644 --- a/scripts/Dockerfile.test +++ b/scripts/Dockerfile.test @@ -29,6 +29,7 @@ RUN source /build.env \ librbd-devel \ rubygems \ ShellCheck \ + codespell \ yamllint \ npm \ diffutils \ diff --git a/scripts/codespell.conf b/scripts/codespell.conf new file mode 100644 index 000000000..a62b8cd21 --- /dev/null +++ b/scripts/codespell.conf @@ -0,0 +1,4 @@ +[codespell] +skip = .git,./vendor,./docs/design/proposals/images +ignore-words-list = ExtraVersion,extraversion,ba +check-filenames = true