summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorzimoun <zimon.toutoune@gmail.com>2019-12-04 19:06:31 +0100
committerLudovic Courtès <ludo@gnu.org>2019-12-08 23:14:03 +0100
commit7282f9496793227d7ac6f902976aecb663068ec1 (patch)
tree42bdc9d0c1fb22255d4d262b12de92ec7ec01657 /guix/scripts
parentd9b4022c6fd6844e42aaa503d3118bf3e3a0a441 (diff)
downloadpatches-7282f9496793227d7ac6f902976aecb663068ec1.tar
patches-7282f9496793227d7ac6f902976aecb663068ec1.tar.gz
lint: Add '--load-path' option.
* guix/scripts/lint.scm (%options): Add '--load-path' option. * doc/guix.texi: Document it. * tests/guix-lint.sh: Test it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/lint.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 1668d02992..8d08c484f5 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
;;; 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>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -30,6 +31,7 @@
#:use-module (guix lint)
#:use-module (guix ui)
#:use-module (guix scripts)
+ #:use-module (guix scripts build)
#:use-module (gnu packages)
#:use-module (ice-9 match)
#:use-module (ice-9 format)
@@ -94,6 +96,9 @@ run the checkers on all packages.\n"))
-c, --checkers=CHECKER1,CHECKER2...
only run the specified checkers"))
(display (G_ "
+ -L, --load-path=DIR prepend DIR to the package module search path"))
+ (newline)
+ (display (G_ "
-h, --help display this help and exit"))
(display (G_ "
-l, --list-checkers display the list of available lint checkers"))
@@ -128,6 +133,9 @@ run the checkers on all packages.\n"))
%local-checkers
(alist-delete 'checkers
result))))
+ (find (lambda (option)
+ (member "load-path" (option-names option)))
+ %standard-build-options)
(option '(#\h "help") #f #f
(lambda args
(show-help)