mirror of
https://github.com/clearlinux/clear-linux-documentation.git
synced 2026-06-28 08:46:12 +00:00
Turned on linkcheck in Travis. (#708)
* Turned on linkcheck in Travis. Signed-off-by: Kevin Putnam <kevin.putnam@intel.com> * Added print lines to parse-link-check.py to improve Travis log output. Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>
This commit is contained in:
committed by
michael vincerra
parent
3f2ff7321a
commit
badddca2e4
@@ -77,12 +77,15 @@ for line in lines:
|
||||
if link in whitelist:
|
||||
whiteListLines.append("<b>" + strings[0] + "</b>\n<blockquote><a href=\"" + link + "\">[whitelist] " + link + "</a></blockquote>\n")
|
||||
numWhiteListMatches += 1
|
||||
print("[White list match] " + link)
|
||||
elif "Anchor '" in line:
|
||||
anchorLines.append("<b>" + strings[0] + "</b>\n<blockquote><a href=\"" + link + "\">[anchor] " + link + "</a></blockquote>\n")
|
||||
numAnchors += 1
|
||||
print("[Anchor not found] " + link)
|
||||
else:
|
||||
newLines.append("<b>" + strings[0] + "</b>\n<blockquote><a href=\"" + link + "\">[broken] " + link + "</a></blockquote>\n")
|
||||
numBrokenLinks += 1
|
||||
print("[broken link] " + link)
|
||||
|
||||
newLines.insert(0,"<h1>" + str(numBrokenLinks + numWhiteListMatches) + " broken links found in Sphinx link check</h1>\n")
|
||||
newLines.insert(1,"<h2>" + str(numBrokenLinks) + " unmatched broken links</h2>\n")
|
||||
|
||||
Reference in New Issue
Block a user