Skip to content

Commit

Permalink
Update imports.sh
Browse files Browse the repository at this point in the history
Not all unused imports were listed at once because I misunderstood bash syntax
  • Loading branch information
tomdjong authored Dec 3, 2024
1 parent b4a1da6 commit e5f762e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e5f762e

Please sign in to comment.