aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/scripts/lint.scm3
-rw-r--r--tests/lint.scm9
2 files changed, 11 insertions, 1 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 5432069858..7f5915ba2e 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -88,7 +88,8 @@
'description)))
(define (check-proper-start description)
- (unless (properly-starts-sentence? description)
+ (unless (or (properly-starts-sentence? description)
+ (string-prefix-ci? (package-name package) description))
(emit-warning package
"description should start with an upper-case letter or digit"
'description)))
diff --git a/tests/lint.scm b/tests/lint.scm
index 9557887e4f..2061cc18cb 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -72,6 +72,15 @@
(check-description-style pkg))))
"description should start with an upper-case letter")))
+(test-assert "description: may start with lower-case package name"
+ (not
+ (string-contains (call-with-warnings
+ (lambda ()
+ (let ((pkg (dummy-package "x"
+ (description "x is a dummy package."))))
+ (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