Skip to content

Commit 181090e

Browse files
committed
feat: add a make goal to run vale locally
1 parent 973a4a2 commit 181090e

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,21 @@ $ make validate
109109

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

112+
#### Running Vale
113+
114+
Vale is a tool that checks for spelling and grammar errors in your text. To run Vale
115+
for the content in the `content` directory, use the following command:
116+
117+
```console
118+
$ make vale
119+
```
120+
121+
You can also specify a different directory for Vale to check. For example:
122+
123+
```console
124+
$ CONTENT_DIR="content/manuals/compose" make vale
125+
```
126+
112127
## Content not edited here
113128

114129
CLI reference documentation is maintained in upstream repositories. It's

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Directory containing the content to validate. Default is "content".
2+
# It can be overridden by setting the CONTENT_DIR environment variable.
3+
# Example: CONTENT_DIR=content/manuals/compose make vale
4+
CONTENT_DIR := $(or $(CONTENT_DIR), content)
5+
6+
# Docker image to use for vale.
7+
VALE_IMAGE := jdkato/vale:latest
8+
9+
.PHONY: vale
10+
vale: ## run vale
11+
docker run --rm -v $(PWD):/docs \
12+
-w /docs \
13+
-e PIP_BREAK_SYSTEM_PACKAGES=1 \
14+
$(VALE_IMAGE) $(CONTENT_DIR)
15+
116
.PHONY: validate
217
validate: ## run validations
318
docker buildx bake validate

0 commit comments

Comments
 (0)