File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change 44# !!! <TYPE> "title" - Title needs to be quoted!
55# Same for ???
66grep -Er ' ^(!{3}|\?{3})\s\S+:|^(!{3}|\?{3})\s\S+\s[^"]' docs/*
7+ format_issues=$?
78
8- if [ $? -ne 0 ]; then
9+ failed=0
10+
11+ while read -r file; do
12+ awk -v fname=" $file " '
13+ /^(!!!|\?\?\?)/ {
14+ current_line_number = NR
15+ current_line = $0
16+ if (getline nextLine <= 0 || nextLine !~ /^ /) {
17+ print "File:", fname
18+ print "Error in Line ", current_line_number, "Expected next line to start with 4 spaces"
19+ print ">>", current_line
20+ print "------"
21+ exit 1
22+ }
23+ }
24+ ' " $file "
25+
26+ if [ $? -ne 0 ]; then
27+ failed=1
28+ fi
29+ done < <( find . -type f -name " *.md" )
30+
31+ if [ $format_issues -eq 1 ] && [ $failed -eq 0 ]; then
932 echo " Docs test success."
1033 exit 0
1134fi
You can’t perform that action at this time.
0 commit comments