HTML checks
Restarting review https://review.opendev.org/c/starlingx/docs/+/773155 Adding htmlChecks.sh to tox.ini. Script will run post-build checks for HTML formatting issues not reported by sphinx. Per 773155 review of tox failure, updated tox.ini to pass script to bash. Script was executable in previous review but failed remote runs. Signed-off-by: Ron Stone <ronald.stone@windriver.com> Change-Id: I603c724fcac567006e20244cffa15ee2860a7b68
This commit is contained in:
parent
4c41786955
commit
75e96e3eff
26
htmlChecks.sh
Executable file
26
htmlChecks.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Post-build checks on HTML go here.
|
||||
|
||||
RED='\033[0;31m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
cd doc/build
|
||||
|
||||
# 1. Check for rST formatting issues that don't cause build warnings/errors
|
||||
echo "Checking for \"grey bar\" formatting errors in output ..."
|
||||
GREY_FILES=( $(grep -rl --include="*.html" "blockquote" .) )
|
||||
if [ ${#GREY_FILES[@]} != 0 ]; then
|
||||
echo "Found ${#GREY_FILES[@]} file(s):"
|
||||
for FILE in ${GREY_FILES[@]};
|
||||
do
|
||||
echo -e "${RED}$FILE${NC}"
|
||||
done
|
||||
echo "Using a browser, locate vertical grey bars in the left margin of the above file(s), then correct the issue(s) in the cooresponding rST file(s)."
|
||||
# Set -W to halt tox
|
||||
if [[ $1 == "-W" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# 2. do - check for emdash before option (missing backticks)
|
Loading…
x
Reference in New Issue
Block a user