[devscripts] 03/07: licensecheck: parse files without suffix

dod at debian.org dod at debian.org
Sat Dec 26 11:17:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

dod pushed a commit to branch master
in repository devscripts.

commit 36279d9245fa874557f8116a9b4b878f8bc39a16
Author: Dominique Dumont <dod at debian.org>
Date:   Sat Dec 26 11:58:45 2015 +0100

    licensecheck: parse files without suffix
---
 debian/changelog        |  1 +
 scripts/licensecheck.pl | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 91052af..324d154 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -53,6 +53,7 @@ devscripts (2.15.10) UNRELEASED; urgency=medium
     + parse .lisp file (part of #806424)
     + added LLGPL license (part of #806424)
     + also parse last 5kb of a file
+    + parse source file without suffix (e.g script, README)
     * tweaked to parse Artistic 2.0 license file
     * improved detection of artistic 2.0 licenses
 
diff --git a/scripts/licensecheck.pl b/scripts/licensecheck.pl
index ba9b6f7..7385bd1 100755
--- a/scripts/licensecheck.pl
+++ b/scripts/licensecheck.pl
@@ -193,8 +193,11 @@ my $default_ignore_regex = qr!
 
 
 my $default_check_regex =
-    qr/\.(
-	   c(c|pp|xx)?           # c and c++
+    qr!
+    /[\w-]+$                      # executable scripts or README like file
+    |
+    \.(                          # search for file suffix
+        c(c|pp|xx)?              # c and c++
        |h(h|pp|xx)?              # header files for c and c++
        |S
        |f(77|90)?
@@ -222,7 +225,9 @@ my $default_check_regex =
        |tex
        |mli?
        |(c|l)?hs
-       )$/x;
+     )
+    $
+   !x;
 
 # also used to cleanup
 my $copyright_indicator_regex

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list