-
Notifications
You must be signed in to change notification settings - Fork 260
/
Makefile
21 lines (16 loc) · 943 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /usr/bin/env make
user := "$(shell id -u):$(shell id -g)"
ignored = '/docs/resources/references/* /docs/adr/*'
image = jonasbn/github-action-spellcheck:0.43.0
.PHONY : help lint fix
.DEFAULT_GOAL : help
# This will output the help for each task. thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
help: ## Show this help
@printf "\033[33m%s:\033[0m\n" 'Available commands'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[32m%-18s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
lint: ## Runs the linting tool
docker run --rm -u ${user} -v "$(shell pwd):/docs" -w /docs -e INPUT_IGNORE=${ignored} ${image} \
--config /docs/markdown-style-config.yml /docs
fix: ## Runs the linting tool and fixes simple mistakes
docker run --rm -u ${user} -v "$(shell pwd):/docs" -e INPUT_FIX=true -e INPUT_IGNORE=${ignored} avtodev/markdown-lint:v1.5 \
--config /docs/markdown-style-config.yml /docs