From badddca2e4665269304c99bba8d78b67a82a42d3 Mon Sep 17 00:00:00 2001 From: Kevin Putnam Date: Thu, 8 Aug 2019 09:40:26 -0700 Subject: [PATCH] Turned on linkcheck in Travis. (#708) * Turned on linkcheck in Travis. Signed-off-by: Kevin Putnam * Added print lines to parse-link-check.py to improve Travis log output. Signed-off-by: Kevin Putnam --- .travis.yml | 2 +- source/_scripts/_python/linkcheck/parse-link-check.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2536a62a..2f92f8b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ install: script: - make py - make htmlall - #- make linkcheck + - make linkcheck deploy: - provider: pages diff --git a/source/_scripts/_python/linkcheck/parse-link-check.py b/source/_scripts/_python/linkcheck/parse-link-check.py index e703a0b0..4cab80e8 100644 --- a/source/_scripts/_python/linkcheck/parse-link-check.py +++ b/source/_scripts/_python/linkcheck/parse-link-check.py @@ -77,12 +77,15 @@ for line in lines: if link in whitelist: whiteListLines.append("" + strings[0] + "\n
[whitelist] " + link + "
\n") numWhiteListMatches += 1 + print("[White list match] " + link) elif "Anchor '" in line: anchorLines.append("" + strings[0] + "\n
[anchor] " + link + "
\n") numAnchors += 1 + print("[Anchor not found] " + link) else: newLines.append("" + strings[0] + "\n
[broken] " + link + "
\n") numBrokenLinks += 1 + print("[broken link] " + link) newLines.insert(0,"

" + str(numBrokenLinks + numWhiteListMatches) + " broken links found in Sphinx link check

\n") newLines.insert(1,"

" + str(numBrokenLinks) + " unmatched broken links

\n")