diff options
| author | Hugo Buddelmeijer <hugo@buddelmeijer.nl> | 2026-08-18 21:39:21 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-09-02 12:16:03 +0200 |
| commit | 84b0e85c3ce82e904389a5b77cbfc383215829e9 (patch) | |
| tree | 73c97de824e4f0f679d133780e99fbb49931002a /tests | |
| parent | 925c116b46941fcd41e9fa35f3fdc8a526b674a0 (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.sh | 12 |
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"))) |
| 53 | EOF | 53 | EOF |
| 54 | 54 | ||
| 55 | cat > "${module_dir}/foomanifest.scm"<<EOF | ||
| 56 | (specifications->manifest '("dummy")) | ||
| 57 | EOF | ||
| 58 | |||
| 55 | GUIX_PACKAGE_PATH="$module_dir" | 59 | GUIX_PACKAGE_PATH="$module_dir" |
| 56 | export GUIX_PACKAGE_PATH | 60 | export 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 | ||
| 70 | out=`guix lint -c synopsis,description dummy 2>&1` | 74 | out=`guix lint -c synopsis,description dummy 2>&1` |
| 71 | test `grep_warning "$out"` -eq 3 | 75 | test `grep_warning "$out"` -eq 3 |
| @@ -79,6 +83,10 @@ test `grep_warning "$out"` -eq 1 | |||
| 79 | out=`guix lint -c description,synopsis dummy 2>&1` | 83 | out=`guix lint -c description,synopsis dummy 2>&1` |
| 80 | test `grep_warning "$out"` -eq 3 | 84 | test `grep_warning "$out"` -eq 3 |
| 81 | 85 | ||
| 86 | # Test specifying a manifest. | ||
| 87 | out=`guix lint -c synopsis,description -m ${module_dir}/foomanifest.scm 2>&1` | ||
| 88 | test `grep_warning "$out"` -eq 3 | ||
| 89 | |||
| 82 | working_dir="$(pwd)" | 90 | working_dir="$(pwd)" |
| 83 | cd "$module_dir" | 91 | cd "$module_dir" |
| 84 | out=`guix lint -c name -f foo.scm 2>&1` | 92 | out=`guix lint -c name -f foo.scm 2>&1` |
