Wireshark-dev: Re: [Wireshark-dev] checklicenses.py
From: João Valverde <[email protected]>
Date: Sat, 6 Aug 2016 22:42:44 +0100

On 08/06/2016 10:07 PM, Guy Harris wrote:
On Aug 6, 2016, at 1:21 PM, João Valverde <[email protected]> wrote:

Done in https://code.wireshark.org/review/#/c/16913/.
Does "Removed regex to check files without an extension." mean that we are, or aren't, checking files without an extension?

If it means we aren't, should we give the few scripts that don't have an extension an extension, such as .sh for shell scripts, so that we check them for a license?  Most of our shell scripts have a .sh extension, although that's not necessarily the right answer for shell scripts to be run as commands.
It means we aren't checking files without an extension. I removed that 
match from the Debian script as unworkable for our purposes, made worse 
by the fact that the check licenses step is being run on an unclean 
build directory by PD.
I think your suggestion to add an .sh extension for files we wish to 
include would be best. But otherwise we should feel free to tailor 
checklicenses.py + licensecheck.pl in the tools dir to suit our needs.
For future reference here is the diff I applied to the upstream 
--- ../licensecheck.pl	2016-08-05 20:43:04.098683796 +0100
+++ tools/licensecheck.pl	2016-08-06 20:18:20.415943059 +0100
@@ -193,8 +193,6 @@ my $default_ignore_regex = qr!

 my $default_check_regex =
-    /[\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++
@@ -594,7 +592,7 @@ EOF

 sub version {
     print <<"EOF";
-This is $progname, from the Debian devscripts package, version ###VERSION###
+This is $progname, from the Debian devscripts package, version 2.16.2
Copyright (C) 2007, 2008 by Adam D. Barratt <adam\@adam-barratt.org.uk>; based
 on a script of the same name from the KDE SDK by <dfaure\@kde.org>.

@@ -657,7 +655,7 @@ sub parselicense {
 	$license = "GPL$gplver$extrainfo $license";


if ($licensetext =~ /is distributed under the terms of the GNU General Public License,/
 	and length $gplver) {