aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-12-28 18:21:53 +0100
committerLudovic Courtès <ludo@gnu.org>2014-12-28 18:21:53 +0100
commitc79c6e598ad48dfe1cd2d0d8e9d7d3c311a48f5d (patch)
treea5632ba9213debd68331b5f41406ce0d2dfa5be7
parent07af3e5efee742b9b67a19a6df3256cd00fb18e0 (diff)
downloadguix-c79c6e598ad48dfe1cd2d0d8e9d7d3c311a48f5d.tar
guix-c79c6e598ad48dfe1cd2d0d8e9d7d3c311a48f5d.tar.gz
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.
-rw-r--r--guix/scripts/lint.scm12
1 files changed, 9 insertions, 3 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index d6aa54dc0c..9a0d997320 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -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)))
;;;