diff --git a/Makefile b/Makefile index 097ef3fd4f..a73fc7b3c3 100644 --- a/Makefile +++ b/Makefile @@ -148,11 +148,6 @@ ifeq ($(DOCKER_RUNNING), 1) else @echo "Docker not installed or running. Skipping golangci run." endif -ifeq ($(DOCKER_RUNNING), 1) - docker run --rm -v $(shell pwd):/data:ro,Z -w /data pipelinecomponents/yamllint:${YAML_LINT_VERSION} yamllint test/cases/testdata -else - @echo "Docker not installed or running. Skipping yamllint run." -endif .PHONY: fmt fmt: @@ -480,6 +475,14 @@ check-go-module: $(RELEASE_BUILD_IMAGE) \ /bin/bash -c "git config --system --add safe.directory /src && go mod vendor -v" +.PHONY: check-yaml-tests +check-yaml-tests: +ifeq ($(DOCKER_RUNNING), 1) + docker run --rm -v $(shell pwd):/data:ro,Z -w /data pipelinecomponents/yamllint:${YAML_LINT_VERSION} yamllint test/cases/testdata +else + @echo "Docker not installed or running. Skipping yamllint run." +endif + ###################################################### # # Release targets diff --git a/docs/content/contrib-development.md b/docs/content/contrib-development.md index d3a32641d7..3a0d17e914 100644 --- a/docs/content/contrib-development.md +++ b/docs/content/contrib-development.md @@ -74,6 +74,8 @@ git rebase upstream/main > style. > For YAML files, you may need to run the `yamllint` tool on the > `test/cases/testdata` folder to make sure any new tests are well-formatted. +> If you have Docker available, you can run `make check-yaml-tests` to +> run `yamllint` on the tests without installing any Python dependencies. ### Submission