M guix/lint.scm => guix/lint.scm +10 -0
@@ 396,6 396,15 @@ superfluous when building natively and incorrect when cross-compiling."
#:field 'description))
'()))
+ (define (check-ends-with-period description)
+ "Checks that a description field ends with a period."
+ (if (not (string-suffix? "." description))
+ (list
+ (make-warning package
+ (G_ "description should end with a period")
+ #:field 'description))
+ '()))
+
(define (check-texinfo-markup description)
"Check that DESCRIPTION can be parsed as a Texinfo fragment. If the
markup is valid return a plain-text version of DESCRIPTION, otherwise #f."
@@ 515,6 524,7 @@ by two spaces; possible infraction~p at ~{~a~^, ~}")
(check-not-empty description)
(check-quotes description)
(check-trademarks description)
+ (check-ends-with-period description)
(check-description-typo description
'(("Infrastucture" . "Infrastructure") ; codespell:ignore
("This packages" . "This package") ; codespell:ignore
M tests/lint.scm => tests/lint.scm +7 -0
@@ 108,6 108,13 @@
(check-description-style
(dummy-package "x" (description "")))))
+(test-equal "description: does not end with a period"
+ "description should end with a period"
+ (single-lint-warning-message
+ (let ((pkg (dummy-package "x"
+ (description "This package provides a bad description"))))
+ (check-description-style pkg))))
+
(test-equal "description: invalid Texinfo markup"
"Texinfo markup in description is invalid"
(single-lint-warning-message