From 4547f49a080842040a8d2f401d73f1aeeb6c2b5a Mon Sep 17 00:00:00 2001 From: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Date: Sat, 18 Nov 2023 11:48:52 +0100 Subject: [PATCH] test: skip symlinked English folder and optimise the script (#11537) * test: skip symlinked English folder and optimise the script * Update test.sh * Update test.sh * Update test.sh * Update test.sh * Update test.sh * Update test.sh * Update test.sh --- scripts/test.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index 5edf9ee680..ecfba227f3 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -62,11 +62,13 @@ function run_tests { find pages* -name '*.md' -exec markdownlint {} + tldr-lint ./pages for f in ./pages.*; do - if [[ $f == *zh* || $f == *zh_TW* ]]; then - tldr-lint --ignore "TLDR003,TLDR004,TLDR005,TLDR015,TLDR104" "${f}" - else - tldr-lint --ignore "TLDR003,TLDR004,TLDR015,TLDR104" "${f}" + checks="TLDR003,TLDR004,TLDR015,TLDR104" + if [[ -L $f ]]; then + continue + elif [[ $f == *zh* || $f == *zh_TW* ]]; then + checks+=",TLDR005" fi + tldr-lint --ignore $checks "${f}" done run_black run_flake8