Skip to content

Commit

Permalink
Add cake (#873)
Browse files Browse the repository at this point in the history
Co-authored-by: Edward Jiang <edward@Edwards-Laptop.local>
  • Loading branch information
eddddddy and Edward Jiang authored Oct 3, 2024
1 parent 0be93fd commit 140ca77
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/JuliaFormatter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,9 @@ function format(path::AbstractString, options::Configuration)
is_formatted = format(subpath, options)
Threads.atomic_and!(formatted, is_formatted)
end
if formatted.value
println("Well done! ✨ 🍰 ✨")
end
return formatted.value
end
# `path` is not a directory but a file
Expand All @@ -454,7 +457,11 @@ function format(path::AbstractString, options::Configuration)
return true
end
try
return _format_file(path; [Symbol(k) => v for (k, v) in pairs(options)]...)
formatted = _format_file(path; [Symbol(k) => v for (k, v) in pairs(options)]...)
if formatted
println("Well done! ✨ 🍰 ✨")
end
return formatted
catch err
@info "Error in formatting file $path"
@debug "formatting failed due to" exception = (err, catch_backtrace())
Expand Down

0 comments on commit 140ca77

Please sign in to comment.