Fix rustfmt dumping child modules' content into file (#45)

* Fix rustfmt dumping child modules' content into file

rustfmt by default analyses all files dependent on the current file,
too. The out put of --emit stdout contain all child modules. Apheleia
would happily dump that into the currently edited buffer (even though
the content came from another file.)

The unstable option --skip-children prevents that. It's as yet
untested! I've only made a couple of quick sanity checks.

* Fix long line
This commit is contained in:
Aleksandar Dimitrov 2021-10-03 20:09:38 +02:00 committed by GitHub
parent 92c0fce6b4
commit f46d65c179
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -466,7 +466,8 @@ modified from what is written to disk, then don't do anything."
(latexindent . ("latexindent" file))
(ocamlformat . ("ocamlformat" file))
(prettier . (npx "prettier" "--stdin-filepath" filepath))
(rustfmt . ("rustfmt" "--quiet" "--emit" "stdout" file))
(rustfmt . ("rustfmt" "--unstable-features" "--skip-children"
"--quiet" "--emit" "stdout" file))
(terraform . ("terraform" "fmt" "-")))
"Alist of code formatting commands.
The keys may be any symbols you want, and the values are