From 83f18e06530f025df9f6c5059bfe261a1291a24f Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Tue, 23 Aug 2016 02:08:02 -0500 Subject: guix: lint: Check descriptions for trademark signs. * guix/scripts/lint.scm (check-description-style): Emit a warning if trademark signs found in description. * tests/lint.scm (description: may not contain trademark signs): Add test. --- tests/lint.scm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'tests/lint.scm') diff --git a/tests/lint.scm b/tests/lint.scm index 770f43e57f..df69d2b4b1 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013 Cyril Roelandt -;;; Copyright © 2014, 2015 Eric Bavier +;;; Copyright © 2014, 2015, 2016 Eric Bavier ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2015, 2016 Mathieu Lirzin ;;; @@ -203,6 +203,20 @@ string) on HTTP requests." "E.g. Foo, i.e. Bar resp. Baz (a.k.a. DVD).")))) (check-description-style pkg))))) +(test-assert "description: may not contain trademark signs" + (and (->bool + (string-contains (with-warnings + (let ((pkg (dummy-package "x" + (description "Does The Right Thing™")))) + (check-description-style pkg))) + "should not contain trademark sign")) + (->bool + (string-contains (with-warnings + (let ((pkg (dummy-package "x" + (description "Works with Format®")))) + (check-description-style pkg))) + "should not contain trademark sign")))) + (test-assert "synopsis: not a string" (->bool (string-contains (with-warnings -- cgit 1.4.1