mirror of https://github.com/zulip/zulip.git
test-documentation: Fix shellcheck warnings.
In tools/test-documentation line 6: echo -e "\e[${color_code}m${message}\e[0m" >&2 ^-- SC1117: Backslash is literal in "\e". Prefer explicit escaping: "\\e". ^-- SC1117: Backslash is literal in "\e". Prefer explicit escaping: "\\e". In tools/test-documentation line 41: scrapy crawl_with_status documentation_crawler $loglevel ^-- SC2086: Double quote to prevent globbing and word splitting. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
bb51503907
commit
e1d770d451
|
@ -3,9 +3,11 @@ set -e
|
|||
|
||||
color_message () {
|
||||
local color_code="$1" message="$2"
|
||||
echo -e "\e[${color_code}m${message}\e[0m" >&2
|
||||
printf '\e[%sm%s\e[0m\n' "$color_code" "$message" >&2
|
||||
}
|
||||
|
||||
loglevel=()
|
||||
|
||||
case $1 in
|
||||
-h|--help)
|
||||
echo "--help, -h show this help message and exit"
|
||||
|
@ -13,7 +15,7 @@ case $1 in
|
|||
exit 0
|
||||
;;
|
||||
-L|--loglevel)
|
||||
loglevel="$1 $2"
|
||||
loglevel=("$1" "$2")
|
||||
;;
|
||||
--skip-check-links)
|
||||
skip_check_links=1
|
||||
|
@ -38,7 +40,7 @@ color_message 94 "Testing links in documentation..."
|
|||
|
||||
cd ../tools/documentation_crawler
|
||||
set +e
|
||||
scrapy crawl_with_status documentation_crawler $loglevel
|
||||
scrapy crawl_with_status documentation_crawler "${loglevel[@]}"
|
||||
result=$?
|
||||
if [ "$result" = 1 ]; then
|
||||
color_message 91 "Failed!"
|
||||
|
|
Loading…
Reference in New Issue