File tree 2 files changed +10
-5
lines changed
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ if [[ "${CONTENT_TESTS:-}" == 1 ]]; then
13
13
echo " Installing additional dependencies"
14
14
15
15
if [[ " ${CONTENT_TESTS_LINKS:- } " == 1 ]]; then
16
- gem install html-proofer
16
+ pip3 install --user link-checker==0.1.0
17
17
fi
18
18
cargo install mdbook --vers ' 0.1.7' --debug
19
19
fi
Original file line number Diff line number Diff line change @@ -32,12 +32,17 @@ if [[ "${CONTENT_TESTS:-}" == 1 ]]; then
32
32
./ci/spellcheck.sh list
33
33
34
34
if [[ " ${CONTENT_TESTS_LINKS:- } " == 1 ]]; then
35
- if [ $( program_installed htmlproofer ) == 0 ]; then
36
- echo " Please install htmlproofer: gem install html-proofer "
35
+ if [ $( program_installed link-checker ) == 0 ]; then
36
+ echo " Please install link-checker: 'pip install link-checker' "
37
37
exit 1
38
38
fi
39
- echo " Checking links"
40
- htmlproofer --empty-alt-ignore ./book/
39
+ echo " Checking local links:"
40
+ # failing local link test is a hard error as there should be no false possitives
41
+ link-checker --no-external ./book/
42
+
43
+ echo " Checking external links:"
44
+ # we do not want to fail on false positives
45
+ link-checker --no-local ./book/ --ignore ' .*api.github.com*.' || true
41
46
fi
42
47
else
43
48
echo " Testing code snippets"
You can’t perform that action at this time.
0 commit comments