summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/lint.scm4
-rw-r--r--tests/lint.scm8
2 files changed, 7 insertions, 5 deletions
diff --git a/guix/lint.scm b/guix/lint.scm
index ad639a63f75..a111a854ee6 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -398,7 +398,9 @@ superfluous when building natively and incorrect when cross-compiling."
398 398
399 (define (check-ends-with-period description) 399 (define (check-ends-with-period description)
400 "Checks that a description field ends with a period." 400 "Checks that a description field ends with a period."
401 (if (not (string-suffix? "." description)) 401 (if (not (or (string-null? description) ;check-not-empty
402 (string-suffix? " " description) ;check-no-trailing-whitespace
403 (string-suffix? "." description)))
402 (list 404 (list
403 (make-warning package 405 (make-warning package
404 (G_ "description should end with a period") 406 (G_ "description should end with a period")
diff --git a/tests/lint.scm b/tests/lint.scm
index f712c38c3fd..1f38f931c8a 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -119,7 +119,7 @@
119 "Texinfo markup in description is invalid" 119 "Texinfo markup in description is invalid"
120 (single-lint-warning-message 120 (single-lint-warning-message
121 (check-description-style 121 (check-description-style
122 (dummy-package "x" (description (identity "f{oo}b@r")))))) 122 (dummy-package "x" (description (identity "f{oo}b@r."))))))
123 123
124(test-equal "description: does not start with an upper-case letter" 124(test-equal "description: does not start with an upper-case letter"
125 "description should start with an upper-case letter or digit" 125 "description should start with an upper-case letter or digit"
@@ -131,7 +131,7 @@
131(test-equal "description: may start with texinfo markup" 131(test-equal "description: may start with texinfo markup"
132 '() 132 '()
133 (check-description-style 133 (check-description-style
134 (dummy-package "x" (description "@emph{Maxwell Equations of Software}")))) 134 (dummy-package "x" (description "@emph{Maxwell Equations of Software}."))))
135 135
136(test-equal "description: may start with a digit" 136(test-equal "description: may start with a digit"
137 '() 137 '()
@@ -187,14 +187,14 @@
187 "description should not contain trademark sign '™' at 20" 187 "description should not contain trademark sign '™' at 20"
188 (single-lint-warning-message 188 (single-lint-warning-message
189 (let ((pkg (dummy-package "x" 189 (let ((pkg (dummy-package "x"
190 (description "Does The Right Thing™")))) 190 (description "Does The Right Thing™."))))
191 (check-description-style pkg)))) 191 (check-description-style pkg))))
192 192
193(test-equal "description: may not contain trademark signs: ®" 193(test-equal "description: may not contain trademark signs: ®"
194 "description should not contain trademark sign '®' at 17" 194 "description should not contain trademark sign '®' at 17"
195 (single-lint-warning-message 195 (single-lint-warning-message
196 (let ((pkg (dummy-package "x" 196 (let ((pkg (dummy-package "x"
197 (description "Works with Format®")))) 197 (description "Works with Format®."))))
198 (check-description-style pkg)))) 198 (check-description-style pkg))))
199 199
200(test-equal "description: suggest ornament instead of quotes" 200(test-equal "description: suggest ornament instead of quotes"