From 17854ef91dd6b8e8956ef38bd7a7db59fb43f114 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 7 Nov 2014 14:09:19 +0100 Subject: lint: Improve check for synopses starting with package name. * guix/scripts/lint.scm (package-name-regexp): New procedure. (check-synopsis-style)[check-start-with-package-name]: Use it instead of 'string-prefix-ci?'. * tests/lint.scm ("synopsis: start with package name prefix"): New test. --- tests/lint.scm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/lint.scm b/tests/lint.scm index 2f62adc39f..9a043c4b59 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -194,6 +194,14 @@ (check-synopsis-style pkg)))) "synopsis should not start with the package name"))) +(test-assert "synopsis: start with package name prefix" + (string-null? + (call-with-warnings + (lambda () + (let ((pkg (dummy-package "arb" + (synopsis "Arbitrary precision")))) + (check-synopsis-style pkg)))))) + (test-assert "inputs: pkg-config is probably a native input" (->bool (string-contains -- cgit 1.4.1