@@ -15459,6 +15459,9 @@ Invoking guix lint
List and describe all the available checkers that will be run on packages
and exit.
+@item --dry-run
+Do not run the checkers.
+
@item --checkers
@itemx -c
Only enable the checkers specified in a comma-separated list using the
@@ -100,6 +100,8 @@ (define (show-help)
(display (G_ "Usage: guix lint [OPTION]... [PACKAGE]...
Run a set of checkers on the specified package; if none is specified,
run the checkers on all packages.\n"))
+ (display (G_ "
+ --dry-run do not run checkers "))
(display (G_ "
-c, --checkers=CHECKER1,CHECKER2...
only run the specified checkers"))
@@ -154,6 +156,9 @@ (define %options
(option '(#\n "no-network") #f #f
(lambda (opt name arg result)
(alist-cons 'no-network? #t result)))
+ (option '("dry-run") #f #f
+ (lambda (opt name arg result)
+ (alist-cons 'dry-run? #t result)))
(find (lambda (option)
(member "load-path" (option-names option)))
%standard-build-options)
@@ -222,10 +227,13 @@ (define-command (guix-lint . args)
(lambda (store)
(cond
((null? args)
- (fold-packages (lambda (p r) (run-checkers p checkers
- #:store store)) '()))
+ (fold-packages (lambda (p r)
+ (when (not (assoc-ref opts 'dry-run?))
+ (run-checkers p checkers
+ #:store store))) '()))
(else
(for-each (lambda (package)
- (run-checkers package checkers
- #:store store))
+ (when (not (assoc-ref opts 'dry-run?))
+ (run-checkers package checkers
+ #:store store)))
args)))))))))