diff options
| author | John Goff <john@hirehipo.com> | 2024-10-05 19:57:58 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-05 16:57:58 -0700 |
| commit | 307afa95499e7e3ed58a76a2818b1dc3ce11f9d5 (patch) | |
| tree | 4e6f83b0b20c505386143790cf634a023c792fd8 | |
| parent | 302a41c86c5ffe1e8f50cbe156e0f7b21835c02c (diff) | |
[#309] Write beancount files to disk before formatting (#310)
Fixes #309
The `bean-format` tool reads a file from the filename passed on the
command line, then outputs the formatted file to `STDOUT`. The filename
passed on the command line is a requirement, the `bean-format` tool does
not read from `STDIN` at all. Another option would be to use
`("bean-format" input "-o" output)`, but this way apheleia can avoid an
extra file read that's not strictly necessary.
---------
Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | apheleia-formatters.el | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index fbbc873..7709f62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ The format is based on [Keep a Changelog]. * `mix format` is now passed the `--stdin-filename` argument which is required in some cases. The version of Mix is autodetected and this option is only passed when it is supported ([#319]). +* Beancount files are formatted without an error ([#309]). ## Internal * Improvements to formatter test framework, it is now possible to @@ -37,6 +38,7 @@ The format is based on [Keep a Changelog]. [#301]: https://github.com/radian-software/apheleia/pull/301 [#306]: https://github.com/radian-software/apheleia/pull/306 +[#309]: https://github.com/radian-software/apheleia/issues/309 [#312]: https://github.com/radian-software/apheleia/issues/312 [#313]: https://github.com/radian-software/apheleia/pull/313 [#316]: https://github.com/radian-software/apheleia/pull/316 diff --git a/apheleia-formatters.el b/apheleia-formatters.el index ec3d83b..77e07ef 100644 --- a/apheleia-formatters.el +++ b/apheleia-formatters.el @@ -24,7 +24,7 @@ '((astyle . ("astyle" (apheleia-formatters-locate-file "--options" ".astylerc"))) (asmfmt . ("asmfmt")) - (bean-format . ("bean-format")) + (bean-format . ("bean-format" input)) (beautysh . ("beautysh" (apheleia-formatters-indent "--tab" "--indent-size" 'sh-basic-offset) |
