-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoc_reports.sh
45 lines (33 loc) · 929 Bytes
/
doc_reports.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
bash --version
# Set tool locations
MARKDOWNLINT="markdownlint"
echo "Working with these files"
DOCS=$(find ./docs -type f -name "*.md")
README=$(find . -type f -name "README.md")
FILES=( "${DOCS[@]}" "${README[@]}" )
for file in $FILES; do
echo "$file"
done
echo
#echo "Linting markdown files with alex"
#npx alex
# "$ALEx"
# set -euo pipefail
echo "Linting markdown files with markdownlint"
for file in $FILES; do
echo "$MARKDOWNLINT" "$file" --ignore node_modules --ignore .git --ignore .idea
npx "$MARKDOWNLINT" "$file" --ignore node_modules --ignore .git --ignore .idea
done
echo "Checking links in markdown files with linkcheckMarkdown"
for file in $FILES; do
linkcheckMarkdown "$file"
done
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