From e5f762eff1cc726cc7f519ae23a3da55185a0939 Mon Sep 17 00:00:00 2001 From: Tom de Jong <43781735+tomdjong@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:08:46 +0100 Subject: [PATCH] Update imports.sh Not all unused imports were listed at once because I misunderstood bash syntax --- imports.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imports.sh b/imports.sh index b16ba3a77..8d60118f4 100755 --- a/imports.sh +++ b/imports.sh @@ -113,7 +113,7 @@ check_imports() { if $rem_flag; then ${sed_cmd} -i "${unused[*]/%/d;}" $file # Remove redundant imports else # Report redundant imports - for i in $unused; + for i in ${unused[@]}; do import=$(${sed_cmd} -n "${i}p" $file | awk -F 'open import ' '{print $2}') echo "Importing $import was not necessary"