Make shellcheck happier

This commit is contained in:
Michael Wolf
2023-09-20 10:09:35 -06:00
parent 607140cce3
commit d486fe6217

View File

@@ -9,7 +9,7 @@ source "$DIR/_reformat-common.bash"
file="$1"
file_type=$(sniff_file_type $file)
file_type=$(sniff_file_type "$file")
export WOULD_REFORMAT=do_reformat
@@ -28,7 +28,7 @@ if [[ $file_type == "javascript" || \
retval="$?"
success_retval=0
elif [[ $file_type == "python" ]]; then
out=$(pipx run black $file 2>/dev/null && pipx run isort $file 2>/dev/null)
out=$(pipx run black "$file" 2>/dev/null && pipx run isort "$file" 2>/dev/null)
retval="$?"
success_retval=0
elif [[ $file_type == "golang" ]] ; then
@@ -36,7 +36,7 @@ elif [[ $file_type == "golang" ]] ; then
retval="$?"
success_retval=0
elif [[ $file_type == "dart" ]] ; then
out=$(dart format $file)
out=$(dart format "$file")
retval="$?"
success_retval=0
else
@@ -44,7 +44,7 @@ else
exit 0
fi
if [[ x"$retval" == x"$success_retval" ]]; then
if [[ "$retval" == "$success_retval" ]]; then
echo "$out"
exit 0
else