summaryrefslogtreecommitdiff
path: root/guix/scripts/lint.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2016-08-29 23:46:33 +0300
committerEfraim Flashner <efraim@flashner.co.il>2016-08-29 23:46:33 +0300
commitb3d2be945d2dfe08e3b73102dd0fd3f4a0a93b60 (patch)
tree707c6a5e18474b410e39fa6892521c9f47518ccc /guix/scripts/lint.scm
parent97127431ee9133626fea62449706d729d80b73f6 (diff)
parent5b63a8568b39c019970569773bace18fab17a157 (diff)
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'guix/scripts/lint.scm')
-rw-r--r--guix/scripts/lint.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 51191e7e7b..eac3214bbf 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -161,6 +161,18 @@ markup is valid return a plain-text version of DESCRIPTION, otherwise #f."
'description)
#f)))
+ (define (check-trademarks description)
+ "Check that DESCRIPTION does not contain '™' or '®' characters. See
+http://www.gnu.org/prep/standards/html_node/Trademarks.html."
+ (match (string-index description (char-set #\™ #\®))
+ ((and (? number?) index)
+ (emit-warning package
+ (format #f (_ "description should not contain ~
+trademark sign '~a' at ~d")
+ (string-ref description index) index)
+ 'description))
+ (else #t)))
+
(define (check-proper-start description)
(unless (or (properly-starts-sentence? description)
(string-prefix-ci? (package-name package) description))
@@ -191,6 +203,7 @@ by two spaces; possible infraction~p at ~{~a~^, ~}")
(if (string? description)
(begin
(check-not-empty description)
+ (check-trademarks description)
;; Use raw description for this because Texinfo rendering
;; automatically fixes end of sentence space.
(check-end-of-sentence-space description)