Browse Source

Add a -C argument for pedantic committer mode. The does everything -A does
but omits the new port check.

Requested by: eik

marcus 20 years ago
parent
commit
75f54cf977
2 changed files with 10 additions and 6 deletions
  1. 3 0
      portlint.1
  2. 7 6
      portlint.pl

+ 3 - 0
portlint.1

@@ -50,6 +50,9 @@ Some of the committers prefer
 instead of 
 .Pa $(VARIABLE) ,
 even though they are semantically same.
+.It Fl C
+Pedantic committer flag.  This is equivalent to
+.Fl abct .
 .It Fl c
 Committer flag.
 It will add several checks useful only for committers.

+ 7 - 6
portlint.pl

@@ -40,7 +40,7 @@ $portdir = '.';
 # version variables
 my $major = 2;
 my $minor = 5;
-my $micro = 2;
+my $micro = 3;
 
 sub l { '[{(]'; }
 sub r { '[)}]'; }
@@ -90,6 +90,7 @@ usage: $prog [-AabchvtN] [-M ENV] [-B#] [port_directory]
 	-a	additional check for scripts/* and pkg-*
 	-A	turn on all additional checks (equivalent to -abcNt)
 	-b	warn \$(VARIABLE)
+	-C	pedantic committer mode (equivalent to -abct)
 	-c	committer mode
 	-h	show summary of command line options
 	-v	verbose mode
@@ -107,16 +108,16 @@ sub version {
 	exit $major;
 }
 
-getopts('AabchtvB:M:NV');
+getopts('AabCchtvB:M:NV');
 
 &usage if $opt_h;
 &version if $opt_V;
-$extrafile = 1 if $opt_a || $opt_A;
-$parenwarn = 1 if $opt_b || $opt_A;
-$committer = 1 if $opt_c || $opt_A;
+$extrafile = 1 if $opt_a || $opt_A || $opt_C;
+$parenwarn = 1 if $opt_b || $opt_A || $opt_C;
+$committer = 1 if $opt_c || $opt_A || $opt_C;
 $verbose = 1 if $opt_v;
 $newport = 1 if $opt_N || $opt_A;
-$usetabs = 1 if $opt_t || $opt_A;
+$usetabs = 1 if $opt_t || $opt_A || $opt_C;
 $contblank = $opt_B if $opt_B;
 $makeenv = $opt_M if $opt_M;