Skip to content

Commit

Permalink
feat: add a make goal to run vale locally
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Feb 28, 2025
1 parent 973a4a2 commit 181090e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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
Expand Down

0 comments on commit 181090e

Please sign in to comment.