diff mbox series

[bug#40367,v3] lint: Display result of checkers on stdout.

Message ID 20200521190838.29736-1-brice@waegenei.re
State Accepted
Headers show
Series [bug#40367,v3] lint: Display result of checkers on stdout. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Brice Waegeneire May 21, 2020, 7:08 p.m. UTC
* guix/scripts/lint.scm (emit-warnings): Use 'current-output-port'
instead of 'current-error-port'.
---

This version remove an extra space and correctly indent the patch.

 guix/scripts/lint.scm | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

Comments

Christopher Baines Nov. 21, 2020, 10:24 a.m. UTC | #1
Brice Waegeneire <brice@waegenei.re> writes:

> * guix/scripts/lint.scm (emit-warnings): Use 'current-output-port'
> instead of 'current-error-port'.
> ---
>
> This version remove an extra space and correctly indent the patch.
>
>  guix/scripts/lint.scm | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
> index 97ffd57301..5445645b53 100644
> --- a/guix/scripts/lint.scm
> +++ b/guix/scripts/lint.scm
> @@ -10,6 +10,7 @@
>  ;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
>  ;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
>  ;;; Copyright © 2019 Simon Tournier <zimon.toutoune@gmail.com>
> +;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -47,11 +48,15 @@
>    ;; 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))))
> +     (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)

Thanks, and apologies in the delay in looking at this again.

I've pushed it to master as becfa42ea79feb402fe6bc5922da2019ef021e88.q

Thanks again,

Chris
diff mbox series

Patch

diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 97ffd57301..5445645b53 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -10,6 +10,7 @@ 
 ;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2019 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -47,11 +48,15 @@ 
   ;; 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))))
+     (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)