[lintian] 01/01: Avoid a false positive in krusader due to line number
This is an automated email from the git hooks/post-receive script.
broucaries-guest pushed a commit to branch master
in repository lintian.
commit cbf7c1c6c10193f49539ae1f72553d2d26b1bb30
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date: Sat Aug 8 21:02:46 2015 +0200
Avoid a false positive in krusader due to line number
Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
---
checks/cruft.pm | 10 +++++++++-
debian/changelog | 3 +++
.../debian/src/oldfalsepositive/krusader | 20 ++++++++++++++++++++
3 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/checks/cruft.pm b/checks/cruft.pm
index 682b68b..b5922d5 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -961,9 +961,16 @@ sub _check_gfdl_license_problem {
my $gfdlsections = _strip_punct($rawgfdlsections);
my $contextbefore = _strip_punct($rawcontextbefore);
- my $oldgfdlsections;
+ # remove line number at beginning of line
+ # see krusader/1:2.4.0~beta3-2/doc/en_US/advanced-functions.docbook/
+ $gfdlsections =~ s{[ ]\d+[ ]}{ }gxsmo;
+ $gfdlsections =~ s{^\d+[ ]}{ }xsmo;
+ $gfdlsections =~ s{[ ]\d+$}{ }xsmo;
+ $gfdlsections =~ s{[ ]+}{ }xsmo;
+
# remove classical and without meaning part of
# matched string
+ my $oldgfdlsections;
do {
$oldgfdlsections = $gfdlsections;
$gfdlsections =~ s{ \A \(?[ ]? g?fdl [ ]?\)?[ ]? [,\.;]?[ ]?}{}xsmo;
@@ -983,6 +990,7 @@ sub _check_gfdl_license_problem {
permission [ ] is [ ] granted [ ] to [ ] copy [ ]?[,\.;]?[ ]?
distribute [ ]?[,\.;]?[ ]? and[ ]?/?[ ]?or [ ] modify [ ]
this [ ] document [ ] under [ ] the [ ] terms [ ] of [ ] the\Z}{}xsmo;
+
# Treat ambiguous empty text
unless(
defined(
diff --git a/debian/changelog b/debian/changelog
index 15d78fe..e1f3927 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ lintian (2.5.36) UNRELEASED; urgency=medium
XXX: generate tag summary with private/generate-tag-summary
+ * checks/cruft.pm:
+ + Avoid a false positive for gfdl detection in krusader.
+ Remove line number before running the detection.
* checks/files.desc:
+ [BR] Correct a few typos. (Closes: #794953).
* checks/scripts.desc:
diff --git a/t/tests/cruft-gfdl-invariants/debian/src/oldfalsepositive/krusader b/t/tests/cruft-gfdl-invariants/debian/src/oldfalsepositive/krusader
new file mode 100644
index 0000000..96f3be3
--- /dev/null
+++ b/t/tests/cruft-gfdl-invariants/debian/src/oldfalsepositive/krusader
@@ -0,0 +1,20 @@
+<!-- **********************************************************************
+ 4 more.docbook
+ 5 +++++++++++++++++++++++++++
+ 6 copyright : (C) 2000 - 2010
+ 7 XXXXXX
+ 8 XXXX
+ 9 e-mail : XXXX@XXXX
+ 10 web site : YYYYYY
+ 11 description : something
+ 12
+ 13 ***************************************************************************
+ 14 * Permission is granted to copy, distribute and/or modify this *
+ 15 * document under the terms of the GNU Free Documentation License, *
+ 16 * Version 1.1 or any later version published by the Free Software *
+ 17 * Foundation; with no Invariant Sections, no Front-Cover Texts and *
+ 18 * no Back-Cover Texts. A copy of the license is available on the *
+ 19 * GNU site http://www.gnu.org/licenses/fdl.html or by writing to: *
+ 20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, *
+ 21 * MA 02111-1307, USA. *
+ 22 *********************************************************************** -->
\ No newline at end of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: