-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocs.mk
31 lines (27 loc) · 864 Bytes
/
docs.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
MARKDOWNLINT=markdownlint
FILES=$(shell find . -type f -name "*.md" -not -path "./node_modules/*" -not -path "./.git/*" -not -path "./.idea/*")
.PHONY: all
all: lint check-links check-style
.PHONY: lint
lint:
@echo "Linting markdown files with $(MARKDOWNLINT)"
@for file in $(FILES); do \
echo "$(MARKDOWNLINT) $$file"; \
npx $(MARKDOWNLINT) "$$file" --ignore node_modules --ignore .git --ignore .idea; \
done
.PHONY: check-links
check-links:
@echo "Checking links in markdown files with linkcheckMarkdown"
@for file in $(FILES); do \
linkcheckMarkdown "$$file"; \
done
.PHONY: check-style
check-style:
@echo "Checking with proselint"
@for file in $(FILES); do \
proselint "$$file"; \
done
@echo "Checking links in markdown files with write-good"
@for file in $(FILES); do \
npx write-good "$$file"; \
done