From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: guix lint Date: Thu, 7 Apr 2016 14:37:44 +0200 Message-ID: <20160407143744.3b0d8e98@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ao9C3-00007u-Vw for guix-devel@gnu.org; Thu, 07 Apr 2016 08:37:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ao9Bz-0005oz-Sb for guix-devel@gnu.org; Thu, 07 Apr 2016 08:37:51 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:45061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ao9Bz-0005oN-MZ for guix-devel@gnu.org; Thu, 07 Apr 2016 08:37:47 -0400 Received: from localhost (178.115.131.19.wireless.dyn.drei.com [178.115.131.19]) by dd1012.kasserver.com (Postfix) with ESMTPSA id B63531CA1AA1 for ; Thu, 7 Apr 2016 14:37:45 +0200 (CEST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org 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 ;;;