From 5a2a9c3d1b7d1635baa9fe884aecc1735a47fcc9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Thu, 24 Jan 2013 10:18:11 +0100
Subject: [PATCH 5/6] Avoid a false positive with tex comments

Tex comments % are allowed in the gfdl.
---
 checks/cruft                                                 |    2 +-
 t/tests/cruft-gfdl-invariants/debian/src/gfdltexcomments.tex |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
 create mode 100644 t/tests/cruft-gfdl-invariants/debian/src/gfdltexcomments.tex

diff --git a/checks/cruft b/checks/cruft
index 2c8bb7d..46754e7 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -454,7 +454,7 @@ sub find_cruft {
                          A \s+ copy \s+ of \s+ the \s+ license \s+ is \s+ included/xis) {
                     if (!exists $licenseproblemhash{'gfdl-invariants'}) {
                         # local space
-                        my $s = '(?:\s|\@c)';
+                        my $s = '(?:\s|\@c|%)';
                         # GFDL license, assume it is bad unless it
                         # explicitly states it has no "bad sections".
                         given($+{gfdlsections}) {
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/gfdltexcomments.tex b/t/tests/cruft-gfdl-invariants/debian/src/gfdltexcomments.tex
new file mode 100644
index 0000000..00e496c
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/gfdltexcomments.tex
@@ -0,0 +1,7 @@
+% Permission is granted to copy, distribute and/or modify this document
+% under the terms of the GNU Free Documentation License, Version 1.1 or
+% any later version published by the Free Software Foundation; with no
+% Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+% Texts.  A copy of the license is included in the section entitled
+% ``GNU Free Documentation License.''
+%
-- 
1.7.10.4

