aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGabriel Wicki <gabriel@erlikon.ch>2024-12-02 23:38:51 +0100
committerLudovic Courtès <ludo@gnu.org>2024-12-12 12:52:07 +0100
commit27b4c319c06d1bc1dd8a79d225c1e0d90c9b667d (patch)
tree77e37c2ca82936cf363c9e71f9496c85b08bc57b /tests
parent687f4e22e666aa06dfac7344ff652fb51e47a4b0 (diff)
downloadguix-27b4c319c06d1bc1dd8a79d225c1e0d90c9b667d.tar
guix-27b4c319c06d1bc1dd8a79d225c1e0d90c9b667d.tar.gz
lint: Prevent false positives in description typo check.
* guix/lint.scm(check-description-style)[check-description-typo]: Add spaces to match strings to prevent matching false positives, like "allows tokens" or "prevents torpedoes". * tests/lint.scm: Add test. Change-Id: Ifc2ec6167a590b9d2e742dd86fecd798c4bfaa24 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/lint.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/lint.scm b/tests/lint.scm
index 6631034151..47e31a69bf 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -219,12 +219,18 @@
(check-description-style pkg))))
(test-equal "description: grammar 'allows to'"
- "description contains typo 'allows to'"
+ "description contains typo 'allows to '"
(single-lint-warning-message
(let ((pkg (dummy-package "x"
(description "This package allows to do stuff."))))
(check-description-style pkg))))
+(test-equal "description: grammar 'allows to' 2"
+ '()
+ (let ((pkg (dummy-package "x"
+ (description "This package allows tokenization."))))
+ (check-description-style pkg)))
+
(test-equal "synopsis: not a string"
"invalid synopsis: #f"
(single-lint-warning-message