From 10075b5fa93642a2b40cdc76b710877fba427228 Mon Sep 17 00:00:00 2001 From: yikeke Date: Mon, 24 Feb 2020 19:45:03 +0800 Subject: [PATCH 1/2] 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 bdeac45cbc0b..9b9eb247b9a5 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 follows a style like '/reference/tidb-binlog/deploy.md#服务器要求'. That is, please 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 From 85377afbc657afc0742af3efd56d73faef17109c Mon Sep 17 00:00:00 2001 From: Keke Yi <40977455+yikeke@users.noreply.github.com> Date: Mon, 24 Feb 2020 19:47:40 +0800 Subject: [PATCH 2/2] Update scripts/verify-links.sh --- scripts/verify-links.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/verify-links.sh b/scripts/verify-links.sh index 9b9eb247b9a5..85e84883e6c2 100755 --- a/scripts/verify-links.sh +++ b/scripts/verify-links.sh @@ -69,7 +69,7 @@ if [ "$error_files" -gt 0 ]; then 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 follows a style like '/reference/tidb-binlog/deploy.md#服务器要求'. That is, please make sure that:" + 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 == ":