From 596ba6e3afb7fe11beeae6e9ee128fbd4e1008e2 Mon Sep 17 00:00:00 2001 From: yikeke Date: Mon, 24 Feb 2020 19:52:56 +0800 Subject: [PATCH] scripts/verify-links: update link check error messages --- scripts/verify-links.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/verify-links.sh b/scripts/verify-links.sh index bdeac45cbc0bf..85e84883e6c23 100755 --- a/scripts/verify-links.sh +++ b/scripts/verify-links.sh @@ -66,11 +66,15 @@ error_files=$(cat $ERROR_REPORT | grep 'FILE: ' | wc -l) error_output=$(cat $ERROR_REPORT) echo "" if [ "$error_files" -gt 0 ]; then - echo "error: $error_files files have invalid links (or alias links which are recommended to be replaced with latest one), please fix them!" + echo "Link error: $error_files files have invalid links. The faulty files are listed below, please fix the wrong links!" + echo "" + echo "=== Hint on how to fix links === " + echo "Links in TiDB documentation follow a style like '/reference/tidb-binlog/deploy.md#服务器要求'. That is, you need to make sure that:" + echo "1) Links start with a slash; 2) Anchor links are written in a '/dir/xxx.md#anchor-point' style; 3) Links don't start with a version, e.g. '/v3.0/...' is wrong and '/v3.0' should be removed." echo "" echo "=== ERROR REPORT == ": echo "$error_output" exit 1 else - echo "info: all files are ok!" + echo "Link check report: All files are ok. No deadlink found!" fi