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.
This commit is contained in:
Ludovic Courtès 2014-12-28 18:21:53 +01:00
parent 07af3e5efe
commit c79c6e598a
1 changed files with 9 additions and 3 deletions

View File

@ -408,9 +408,15 @@ descriptions maintained upstream."
(define (run-checkers package checkers) (define (run-checkers package checkers)
;; Run the given CHECKERS on PACKAGE. ;; Run the given CHECKERS on PACKAGE.
(for-each (lambda (checker) (let ((tty? (isatty? (current-error-port)))
((lint-checker-check checker) package)) (name (package-full-name package)))
checkers)) (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)))
;;; ;;;