diff options
author | Vagrant Cascadian <vagrant@debian.org> | 2021-10-24 04:00:15 -0700 |
---|---|---|
committer | Vagrant Cascadian <vagrant@debian.org> | 2021-10-24 14:26:12 -0700 |
commit | b5f45a21c27b80210753e184e52708bb75a347bb (patch) | |
tree | 3e8c881ab769579adb65d5470fc2a59eb6c93496 /tests | |
parent | 65be27dcfd799e4d14cafc49e253d08836f73350 (diff) | |
download | guix-b5f45a21c27b80210753e184e52708bb75a347bb.tar.gz |
lint: Add description check for common typos.
Fixes: https://issues.guix.gnu.org/44675 * guix/lint.scm (check-description-typo): Add check for occurences of "This packages", "This modules", "allows to" and "permits to" in package descriptions. * tests/lint.scm: Add tests for "This packages" and "allows to".
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lint.scm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/lint.scm b/tests/lint.scm index 699a750eb9..6a7eed02e0 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -177,6 +177,20 @@ (description "Whitespace. ")))) (check-description-style pkg)))) +(test-equal "description: pluralized 'This package'" + "description contains typo 'This packages', should be 'This package'" + (single-lint-warning-message + (let ((pkg (dummy-package "x" + (description "This packages is a typo.")))) + (check-description-style pkg)))) + +(test-equal "description: grammar '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 "synopsis: not a string" "invalid synopsis: #f" (single-lint-warning-message |