Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support running vale locally #22130

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -101,8 +101,29 @@ formatted markup, and other things. To run the tests:
$ docker buildx bake validate
```

or, using the Makefile:

```console
$ make validate
```

If this command doesn't result in any errors, you're good to go!

#### Running Vale

Vale is a tool that checks for spelling and grammar errors in your text. To run Vale
for the content in the `content` directory, use the following command:

```console
$ make vale
```

You can also specify a different directory for Vale to check. For example:

```console
$ CONTENT_DIR="content/manuals/compose" make vale
```

## Content not edited here

CLI reference documentation is maintained in upstream repositories. It's
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# Directory containing the content to validate. Default is "content".
# It can be overridden by setting the CONTENT_DIR environment variable.
# Example: CONTENT_DIR=content/manuals/compose make vale
CONTENT_DIR := $(or $(CONTENT_DIR), content)

# Docker image to use for vale.
VALE_IMAGE := jdkato/vale:latest

.PHONY: vale
vale: ## run vale
docker run --rm -v $(PWD):/docs \
-w /docs \
-e PIP_BREAK_SYSTEM_PACKAGES=1 \
$(VALE_IMAGE) $(CONTENT_DIR)

.PHONY: validate
validate: ## run validations
docker buildx bake validate

.PHONY: vendor
vendor: ## vendor hugo modules
./hack/vendor