unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* guix lint
@ 2016-04-07 12:37 Danny Milosavljevic
  2016-04-07 15:09 ` Leo Famulari
  2016-04-08 15:59 ` [PATCH] guix lint: at the "checking" line, make sure to delete the old line's text before overwriting it (with a possibly shorter text) Danny Milosavljevic
  0 siblings, 2 replies; 8+ messages in thread
From: Danny Milosavljevic @ 2016-04-07 12:37 UTC (permalink / raw)
  To: Guix-devel

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:

dannym@dayas ~/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)))))
 
 ^L
 ;;;

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-04-14 22:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-07 12:37 guix lint Danny Milosavljevic
2016-04-07 15:09 ` Leo Famulari
2016-04-07 17:20   ` Efraim Flashner
2016-04-07 21:48   ` Ludovic Courtès
2016-04-08 18:07     ` Danny Milosavljevic
2016-04-14 22:38       ` bug#22536: " Ludovic Courtès
2016-04-08 15:59 ` [PATCH] guix lint: at the "checking" line, make sure to delete the old line's text before overwriting it (with a possibly shorter text) Danny Milosavljevic
2016-04-13 21:20   ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).