From 8202a513138d7b7f57878bf8f50b928e2d4094c5 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Sat, 27 Sep 2014 23:00:44 +0200 Subject: guix lint: check whether descriptions and synopses start with an upper-case letter. * guix/scripts/lint.scm (check-description-style, check-synopsis-start-upper-case): New methods. * tests/lint.scm ("description: does not start with an upper-case letter", "synopsis: does not start with an upper-case letter"): New tests. --- tests/lint.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests') diff --git a/tests/lint.scm b/tests/lint.scm index e0829089b4..ceb7abe23e 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -44,6 +44,24 @@ (define (call-with-warnings thunk) (thunk)) (get-output-string port))) +(test-assert "description: does not start with an upper-case letter" + (->bool + (string-contains (call-with-warnings + (lambda () + (let ((pkg (dummy-package "x" + (description "bad description.")))) + (check-description-style pkg)))) + "description should start with an upper-case letter"))) + +(test-assert "synopsis: does not start with an upper-case letter" + (->bool + (string-contains (call-with-warnings + (lambda () + (let ((pkg (dummy-package "x" + (synopsis "bad synopsis.")))) + (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 -- cgit v1.2.3