summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHugo Buddelmeijer <hugo@buddelmeijer.nl>2026-08-18 21:39:21 +0200
committerLudovic Courtès <ludo@gnu.org>2026-09-02 12:16:03 +0200
commit84b0e85c3ce82e904389a5b77cbfc383215829e9 (patch)
tree73c97de824e4f0f679d133780e99fbb49931002a /tests
parent925c116b46941fcd41e9fa35f3fdc8a526b674a0 (diff)
scripts: lint: Add --manifest option.
* guix/scrips/lint.scm (show-help): Describe option. (%options): Add 'manifest'option. (guix-lint): Run checkers on packages defined in manifest. * doc/guix.texi (Invoking guix lint): Document option. * tests/guix-lint.sh: Test option. Normalize whitespace. * guix/scripts/refresh.scm: Export packages-from-manifest. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Modified-by: Ludovic Courtès <ludo@gnu.org> Merges: #10653
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-lint.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/guix-lint.sh b/tests/guix-lint.sh
index 4a77315b3a2..2b36649a8b2 100644
--- a/tests/guix-lint.sh
+++ b/tests/guix-lint.sh
@@ -52,6 +52,10 @@ cat > "$module_dir/foo.scm"<<EOF
52 (name "bar"))) 52 (name "bar")))
53EOF 53EOF
54 54
55cat > "${module_dir}/foomanifest.scm"<<EOF
56(specifications->manifest '("dummy"))
57EOF
58
55GUIX_PACKAGE_PATH="$module_dir" 59GUIX_PACKAGE_PATH="$module_dir"
56export GUIX_PACKAGE_PATH 60export GUIX_PACKAGE_PATH
57 61
@@ -64,8 +68,8 @@ grep_warning ()
64# Issues with the dummy package: 68# Issues with the dummy package:
65# 1) the synopsis starts with the package name; 69# 1) the synopsis starts with the package name;
66# 2) the synopsis starts with a lower-case letter; 70# 2) the synopsis starts with a lower-case letter;
67# 3) the description has a single space following the end-of-sentence period; 71# 3) the description has a single space following the end-of-sentence period;
68# 4) the alphabetically lesser bar package succeeds it. 72# 4) the alphabetically lesser bar package succeeds it.
69 73
70out=`guix lint -c synopsis,description dummy 2>&1` 74out=`guix lint -c synopsis,description dummy 2>&1`
71test `grep_warning "$out"` -eq 3 75test `grep_warning "$out"` -eq 3
@@ -79,6 +83,10 @@ test `grep_warning "$out"` -eq 1
79out=`guix lint -c description,synopsis dummy 2>&1` 83out=`guix lint -c description,synopsis dummy 2>&1`
80test `grep_warning "$out"` -eq 3 84test `grep_warning "$out"` -eq 3
81 85
86# Test specifying a manifest.
87out=`guix lint -c synopsis,description -m ${module_dir}/foomanifest.scm 2>&1`
88test `grep_warning "$out"` -eq 3
89
82working_dir="$(pwd)" 90working_dir="$(pwd)"
83cd "$module_dir" 91cd "$module_dir"
84out=`guix lint -c name -f foo.scm 2>&1` 92out=`guix lint -c name -f foo.scm 2>&1`