-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathlint_docs.sh
More file actions
executable file
·36 lines (29 loc) · 857 Bytes
/
lint_docs.sh
File metadata and controls
executable file
·36 lines (29 loc) · 857 Bytes
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
#!/bin/bash
# This script uses markdownlint.
# https://github.com/markdownlint/markdownlint
# To install, run:
# gem install mdl
set -ex
STYLE=.markdownlint.rb
# Intentionally opt-in only markdown files that are included in generated docs.
# Keep this list aligned with modules included by root dokka generation.
DOC_MARKDOWN_FILES=(
"workflow-core/README.md"
"workflow-runtime/README.md"
"workflow-rx2/README.md"
"workflow-testing/README.md"
"workflow-ui/compose/README.md"
"workflow-ui/radiography/README.md"
)
DOC_FILES_TO_LINT=()
for file in "${DOC_MARKDOWN_FILES[@]}"; do
if [ -f "$file" ]; then
DOC_FILES_TO_LINT+=("$file")
fi
done
if [ ${#DOC_FILES_TO_LINT[@]} -eq 0 ]; then
echo "No opted-in markdown files found to lint."
exit 0
fi
mdl --style "$STYLE" --ignore-front-matter "${DOC_FILES_TO_LINT[@]}"
echo "Success."