diff options
author | Eric Bavier <bavier@member.fsf.org> | 2014-10-25 11:29:34 -0500 |
---|---|---|
committer | Eric Bavier <bavier@member.fsf.org> | 2014-10-26 13:03:53 -0500 |
commit | 903581f971cd63e3079e849b171bdb8e8118141f (patch) | |
tree | db295f14c62fc06b4fd50e252c361f15e5513e36 /tests/lint.scm | |
parent | 334c43e35462f20d75f25a05e5b66095839d81c0 (diff) | |
download | guix-903581f971cd63e3079e849b171bdb8e8118141f.tar guix-903581f971cd63e3079e849b171bdb8e8118141f.tar.gz |
guix: lint: Allow digits at start of synopsis or description.
* guix/scripts/lint.scm (start-with-capital-letter?): Rename too...
(properly-starts-sentence?): Rewrite with regex and add digits.
(check-description-style, check-synopsis-style): Use it.
* tests/lint.scm: Add tests.
Diffstat (limited to 'tests/lint.scm')
-rw-r--r-- | tests/lint.scm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/lint.scm b/tests/lint.scm index b732a1826a..9557887e4f 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -63,6 +63,15 @@ (check-description-style pkg)))) "description should start with an upper-case letter"))) +(test-assert "description: may start with a digit" + (not + (string-contains (call-with-warnings + (lambda () + (let ((pkg (dummy-package "x" + (description "2-component library.")))) + (check-description-style pkg)))) + "description should start with an upper-case letter"))) + (test-assert "description: two spaces after end of sentence" (->bool (string-contains (call-with-warnings @@ -100,6 +109,15 @@ (check-synopsis-style pkg)))) "synopsis should start with an upper-case letter"))) +(test-assert "synopsis: may start with a digit" + (not + (string-contains (call-with-warnings + (lambda () + (let ((pkg (dummy-package "x" + (synopsis "5-dimensional frobnicator")))) + (check-synopsis-style pkg)))) + "synopsis should start with an upper-case letter"))) + (test-assert "synopsis: ends with a period" (->bool (string-contains (call-with-warnings |