-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore false-positive github link errors (#146)
* Ignore false github link errors * Remove tmp logfile * Remove logfile * Move cleanup to bash script
- Loading branch information
1 parent
f312a84
commit f3163a1
Showing
2 changed files
with
23 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
# This script is used to check the links in the ROS documentation. | ||
# due to a bug in the sphinx linkchecker, github anchors are false positives and | ||
# have to be explicitly ignored | ||
# https://github.com/sphinx-doc/sphinx/issues/9016 | ||
|
||
LOGFILE="linkcheck.log" | ||
cleanup () { | ||
rm "$LOGFILE" | ||
rm -rf doc/api/ | ||
} | ||
|
||
cp -r $1/html/doc/api/. doc/api/ | ||
make linkcheck > "$LOGFILE" | ||
if grep broken "$LOGFILE" | grep -v -E 'github.*Anchor'; then | ||
num_broken=$(grep broken "$LOGFILE" | grep -v -E 'github.*Anchor' | wc -l) | ||
echo "Broken links found: $num_broken" | ||
cleanup | ||
exit 1 | ||
fi | ||
cleanup | ||
exit 0 |