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 1 commit
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
Prev Previous commit
feat: add a make goal to run vale locally
  • Loading branch information
mdelapenya committed Feb 28, 2025
commit 181090e4f5a9605d952f5e41f60695db8ab1800c
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -109,6 +109,21 @@ $ 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
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# 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