Package: devscripts
Version: 2.10.45
Severity: normal
Tags: patch

Hi,

the attached patch should provide documentation for the '--no-conf'
option adding an entry in help and manpage. It should also fix the
following warning when using such option:

Use of uninitialized value $opt_lines in pattern match (m//) at
/usr/bin/licensecheck line 221.

Please feel free to change the description text, it is just an hint.

Thanks,
Cristian
Index: licensecheck.pl
===================================================================
--- licensecheck.pl	(revision 1821)
+++ licensecheck.pl	(working copy)
@@ -27,9 +27,9 @@
 
 B<licensecheck> B<--help|--version>
 
-B<licensecheck> [B<--verbose>] [B<--copyright>] [B<-l|--lines=N>] 
-[B<-i|--ignore=regex>] [B<-c|--check=regex>] [B<-r|--recursive>]
-I<list of files and directories to check>
+B<licensecheck> [B<--no-conf>] [B<--verbose>] [B<--copyright>]
+[B<-l|--lines=N>] [B<-i|--ignore=regex>] [B<-c|--check=regex>]
+[B<-r|--recursive>] I<list of files and directories to check>
 
 =head1 DESCRIPTION
 
@@ -44,6 +44,11 @@
 
 =over 4
 
+=item B<--no-conf> B<--noconf>
+
+Don't source any configuration file, just read variables from the command line
+or fallback to default values. It is only acceptable as the first option.
+
 =item B<--verbose> B<--no-verbose>
 
 Specify whether to output the text being processed from each file before
@@ -76,7 +81,7 @@
 
 =item B<--copyright>
 
-Also display copyright text found within the file
+Also display copyright text found within the file.
 
 =back
 
@@ -218,7 +223,7 @@
 	   )
     or die "Usage: $progname [options] filelist\nRun $progname --help for more details\n";
 
-$opt_lines =~ /^[1-9][0-9]*$/ or $opt_lines = $def_lines;
+$opt_lines = $def_lines unless (defined $opt_lines and $opt_lines =~ /^[1-9][0-9]*$/);
 $opt_ignore_regex = $default_ignore_regex if !$opt_ignore_regex;
 $opt_check_regex = $default_check_regex if !$opt_check_regex;
 
@@ -339,6 +344,7 @@
 Valid options are:
    --help, -h             Display this message
    --version, -v          Display version and copyright info
+   --no-conf              Don't read any configuration file
    --verbose              Display the header of each file before its
                             license information
    --lines, -l            Specify how many lines of the file header

Attachment: signature.asc
Description: Digital signature

Reply via email to