Make shfmt happier
This commit is contained in:
@@ -13,29 +13,29 @@ file_type=$(sniff_file_type "$file")
|
||||
|
||||
export WOULD_REFORMAT=do_reformat
|
||||
|
||||
if [[ $file_type == "javascript" || \
|
||||
$file_type == "vue" || \
|
||||
$file_type == "css" || \
|
||||
$file_type == "typescript" || \
|
||||
$file_type == "php" || \
|
||||
$file_type == "html" || \
|
||||
$file_type == "jsx" || \
|
||||
$file_type == "tsx" || \
|
||||
$file_type == "css" || \
|
||||
$file_type == "scss" || \
|
||||
if [[ $file_type == "javascript" ||
|
||||
$file_type == "vue" ||
|
||||
$file_type == "css" ||
|
||||
$file_type == "typescript" ||
|
||||
$file_type == "php" ||
|
||||
$file_type == "html" ||
|
||||
$file_type == "jsx" ||
|
||||
$file_type == "tsx" ||
|
||||
$file_type == "css" ||
|
||||
$file_type == "scss" ||
|
||||
$file_type == "sh" ]]; then
|
||||
out=$("$(wfroot "$DIR")"/./prettier.sh "$file")
|
||||
out=$("$(wf_root)"/./prettier.sh "$file")
|
||||
retval="$?"
|
||||
success_retval=0
|
||||
elif [[ $file_type == "python" ]]; then
|
||||
out=$(pipx run black "$file" 2>/dev/null && pipx run isort "$file" 2>/dev/null)
|
||||
retval="$?"
|
||||
success_retval=0
|
||||
elif [[ $file_type == "golang" ]] ; then
|
||||
elif [[ $file_type == "golang" ]]; then
|
||||
out=$(gofmt -w "$file" 2>/dev/null)
|
||||
retval="$?"
|
||||
success_retval=0
|
||||
elif [[ $file_type == "dart" ]] ; then
|
||||
elif [[ $file_type == "dart" ]]; then
|
||||
out=$(dart format "$file")
|
||||
retval="$?"
|
||||
success_retval=0
|
||||
|
||||
Reference in New Issue
Block a user