~ruther/guix-local

c79c6e598ad48dfe1cd2d0d8e9d7d3c311a48f5d — Ludovic Courtès 11 years ago 07af3e5
lint: Report on the package being checked.

* guix/scripts/lint.scm (run-checkers): Check
  whether (current-error-port) is a tty, and print the package being
  checked and the checker currently running when it is.
1 files changed, 9 insertions(+), 3 deletions(-)

M guix/scripts/lint.scm
M guix/scripts/lint.scm => guix/scripts/lint.scm +9 -3
@@ 408,9 408,15 @@ descriptions maintained upstream."

(define (run-checkers package checkers)
  ;; Run the given CHECKERS on PACKAGE.
  (for-each (lambda (checker)
              ((lint-checker-check checker) package))
            checkers))
  (let ((tty? (isatty? (current-error-port)))
        (name (package-full-name package)))
    (for-each (lambda (checker)
                (when tty?
                  (format (current-error-port) "checking ~a [~a]...\r"
                          name (lint-checker-name checker))
                  (force-output (current-error-port)))
                ((lint-checker-check checker) package))
              checkers)))


;;;