Skip to content

Commit

Permalink
Use --only_4xx to prevent failure on successful redirects
Browse files Browse the repository at this point in the history
Adds the '--only_4xx' option to HTMLProofer, which "Only reports errors
for links that fall within the 4xx status code range." [1] The rationale
is that Travis CI should not fail just because there are successful
redirects.

In particular, redirects from unversioned URLs to versioned URLs are
desirable to support release-specific documentation (see
QubesOS/qubes-issues#5308).

[1] https://github.com/gjtorikian/html-proofer#configuration
  • Loading branch information
andrewdavidwong committed Sep 15, 2019
1 parent cc4af59 commit c7650e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion _utils/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ htmlproofer ./_site \
--disable-external \
--checks-to-ignore ImageCheck \
--file-ignore ./_site/video-tours/index.html \
--url-ignore "/qubes-issues/" || all_ok=false
--url-ignore "/qubes-issues/" || all_ok=false \
--only_4xx

if $all_ok; then
echo 'All checks passed!'
Expand Down

0 comments on commit c7650e3

Please sign in to comment.