Skip to content

Commit

Permalink
scalafmt: Add --stdout as workaround (#238)
Browse files Browse the repository at this point in the history
Sometimes, scalafmt does not produce formatted output to stdout with
only the `--stdin` flag provided. For example, this happens when there
are no formatting changes required to be made to the file. As-is, this
causes the formatter to clear the buffer when there are no formatting
changes required.

Fix by adding the `--stdout` flag.

See scalameta/scalafmt#3632 for more
information.
  • Loading branch information
Emily Bourke authored Sep 10, 2023
1 parent 2c780df commit 22e48b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion format-all.el
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ Consult the existing formatters for examples of BODY."
(:features)
(:format
(format-all--buffer-easy
executable "--stdin" "--non-interactive" "--quiet")))
executable "--stdin" "--non-interactive" "--quiet" "--stdout")))

(define-format-all-formatter shfmt
(:executable "shfmt")
Expand Down

0 comments on commit 22e48b8

Please sign in to comment.