Skip to content

Commit 05a4d14

Browse files
committed
fix(emacs): don't log blank messages
Every time Flymake runs quick-lint-js, a "" message is logged. This is because the plugin logs stderr, but most of the time, stderr is empty. Fix the noisy logs by only logging if stderr is non-empty.
1 parent 8139e0a commit 05a4d14

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

plugin/emacs/flymake-quicklintjs.el

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,10 @@ REPORT-FN is Flymake's callback."
9292
(when (and (eq 'exit (process-status p))
9393
(eq p flymake-quicklintjs--proc))
9494
(with-current-buffer stderr-buf
95-
(flymake-log :warning "%S"
96-
(buffer-substring-no-properties
97-
(point-min) (point-max))))
95+
(let ((stderr-data (buffer-substring-no-properties
96+
(point-min) (point-max))))
97+
(if (not (string-empty-p stderr-data))
98+
(flymake-log :warning "%S" stderr-data))))
9899
(with-current-buffer stdout-buf
99100
(let ((diags (flymake-quicklintjs--make-diagnostics
100101
src-buf

0 commit comments

Comments
 (0)