From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:36809) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJdHo-0006Ej-8h for guix-patches@gnu.org; Wed, 01 Apr 2020 09:20:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJdHm-0003Ku-75 for guix-patches@gnu.org; Wed, 01 Apr 2020 09:20:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54268) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJdHm-0003Kg-48 for guix-patches@gnu.org; Wed, 01 Apr 2020 09:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jJdHl-0000Qm-Vo for guix-patches@gnu.org; Wed, 01 Apr 2020 09:20:01 -0400 Subject: [bug#40367] [PATCH v2] lint: Display result of checkers on stdout. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:36622) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJdHK-00066a-Cj for guix-patches@gnu.org; Wed, 01 Apr 2020 09:19:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJdHJ-0002St-2K for guix-patches@gnu.org; Wed, 01 Apr 2020 09:19:34 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:46549) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jJdHI-0002Oe-SQ for guix-patches@gnu.org; Wed, 01 Apr 2020 09:19:33 -0400 Received: from localhost (luy13-1-78-237-113-178.fbx.proxad.net [78.237.113.178]) (Authenticated sender: brice@waegenei.re) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 2C2E8E0005 for ; Wed, 1 Apr 2020 13:19:29 +0000 (UTC) From: Brice Waegeneire Date: Wed, 1 Apr 2020 15:19:25 +0200 Message-Id: <20200401131925.8532-1-brice@waegenei.re> In-Reply-To: <20200401073835.5890-1-brice@waegenei.re> References: <20200401073835.5890-1-brice@waegenei.re> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 40367@debbugs.gnu.org * guix/scripts/lint.scm (emit-warnings): Use 'current-output-port' instead of 'current-error-port'. --- This version is rebased on top of master and only change the output port to stdout for the result of the checkers, not for the progress or any run-time errors. guix/scripts/lint.scm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index 97ffd57301..28b4db656c 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2017, 2018 Efraim Flashner ;;; Copyright © 2018, 2019 Arun Isaac ;;; Copyright © 2019 Simon Tournier +;;; Copyright © 2020 Brice Waegeneire ;;; ;;; This file is part of GNU Guix. ;;; @@ -46,13 +47,17 @@ ;; given, the location of PACKAGE otherwise, the full name of PACKAGE and the ;; provided MESSAGE. (for-each - (lambda (lint-warning) - (let ((package (lint-warning-package lint-warning)) - (loc (lint-warning-location lint-warning))) - (info loc (G_ "~a@~a: ~a~%") - (package-name package) (package-version package) - (lint-warning-message lint-warning)))) - warnings)) + (lambda (lint-warning) + (let* ((package (lint-warning-package lint-warning)) + (name (package-name package)) + (version (package-version package)) + (loc (lint-warning-location lint-warning)) + (message (lint-warning-message lint-warning))) + (parameterize + ((guix-warning-port (current-output-port))) + (info loc (G_ "~a@~a: ~a~%") + name version message) ))) + warnings)) (define* (run-checkers package checkers #:key store) "Run the given CHECKERS on PACKAGE." -- 2.25.1