From 6d859f97eec96fb4dc096e299bb77709f0e83f52 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Wed, 6 Dec 2023 15:34:57 +0000 Subject: [PATCH] CI: static-checks: Lint fixes Declare and then define a couple of variables separately. Signed-off-by: James O. D. Hunt --- tests/static-checks.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/static-checks.sh b/tests/static-checks.sh index 037b18104..de8286873 100755 --- a/tests/static-checks.sh +++ b/tests/static-checks.sh @@ -500,13 +500,16 @@ check_url() local invalid_urls_dir="${2:-}" [ -n "$invalid_urls_dir" ] || die "need invalid URLs directory" - local curl_out=$(mktemp) + local curl_out + curl_out=$(mktemp) + files_to_remove+=("${curl_out}") info "Checking URL $url" # Process specific file to avoid out-of-order writes - local invalid_file=$(printf "%s/%d" "$invalid_urls_dir" "$$") + local invalid_file + invalid_file=$(printf "%s/%d" "$invalid_urls_dir" "$$") local ret local user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"