mirror of
https://github.com/vale981/apheleia
synced 2025-03-04 17:11:40 -05:00
Fix ktlint (#159)
* Suppress logs for ktlint Recent versions of ktlint (mine's 0.48.2) have started including logs in their output when the `--stdin` flag is given. These logs would end up being included *into the file* by apheleia, which isn't what we want. Since emitting log messages is likely never a good idea when formatting code, I just opted to disable them altogether using a command line flag. This fixes the issue. * Add change log message about ktlint fix
This commit is contained in:
parent
ffa8d58651
commit
60f897a3a0
2 changed files with 7 additions and 1 deletions
|
@ -3,6 +3,12 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog].
|
||||
|
||||
## Unreleased
|
||||
### Bugs fixed
|
||||
* `ktlint` would emit log messages into its stdout when formatting,
|
||||
and these would get spliced into the source file. This has been fixed
|
||||
by suppressing all logs from `ktlint`.
|
||||
|
||||
## 3.2 (released 2023-02-25)
|
||||
### Features
|
||||
* You can use `apheleia-inhibit` as a file-local variable to disable
|
||||
|
|
|
@ -961,7 +961,7 @@ being run, for diagnostic purposes."
|
|||
(google-java-format . ("google-java-format" "-"))
|
||||
(isort . ("isort" "-"))
|
||||
(lisp-indent . apheleia-indent-lisp-buffer)
|
||||
(ktlint . ("ktlint" "--stdin" "-F"))
|
||||
(ktlint . ("ktlint" "--log-level=none" "--stdin" "-F"))
|
||||
(latexindent . ("latexindent" "--logfile=/dev/null"))
|
||||
(mix-format . ("mix" "format" "-"))
|
||||
(nixfmt . ("nixfmt"))
|
||||
|
|
Loading…
Add table
Reference in a new issue