[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guix lint

From: Danny Milosavljevic
Subject: guix lint
Date: Thu, 7 Apr 2016 14:37:44 +0200

Currently, when run from gnome-terminal, "guix lint" prints CR and then writes 
a shorter text, resulting in a less-than-ideal display.

I propose to clear-to-end-of-line before that.

Also, at the very end of the lint check it still did this:

address@hidden ~/src/guix$ -0.9.4 [formatting]...


Therefore, I clear the line at the very end of "run-checkers" as well.

diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 27b9e15..afa9628 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -799,11 +799,14 @@ or a list thereof")
         (name (package-full-name package)))
     (for-each (lambda (checker)
                 (when tty?
-                  (format (current-error-port) "checking ~a [~a]...\r"
+                  (format (current-error-port) "checking ~a [~a]...\x1b[K\r"
                           name (lint-checker-name checker))
                   (force-output (current-error-port)))
                 ((lint-checker-check checker) package))
-              checkers)))
+              checkers)
+    (when tty?
+      (format (current-error-port) "\x1b[K")
+      (force-output (current-error-port)))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]