Skip to content

Commit 02d564a

Browse files
committed
Add Vale to Makefile
1 parent bdf6956 commit 02d564a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,21 @@ vale: deps ## Run Vale style, grammar, and spell checks
168168
@echo
169169
@echo "Vale is finished; look for any errors in the above output."
170170

171+
.PHONY: vale-json
172+
vale-json: deps ## Run Vale and output results as JSON
173+
vale sync
174+
vale --output=JSON $(VALEFILES) > vale_errors.json
175+
@echo
176+
@echo "Vale JSON output saved to vale_errors.json"
177+
178+
.PHONY: vale-json-no-modules
179+
vale-json-no-modules: deps ## Run Vale excluding module docs and output as JSON
180+
vale sync
181+
$(eval VALEFILES_NO_MODULES := $(shell find -L $(DOCS_DIR) -type f -name "*.md" -not -path "$(DOCS_DIR)/reference/modules/*" -print))
182+
vale --output=JSON $(VALEFILES_NO_MODULES) > vale_errors_filtered.json
183+
@echo
184+
@echo "Vale JSON output (excluding modules) saved to vale_errors_filtered.json"
185+
171186
.PHONY: html_meta
172187
html_meta: deps ## Add meta data headers to all Markdown pages
173188
python ./docs/addMetaData.py

0 commit comments

Comments
 (0)