diff options
author | wiz <wiz@pkgsrc.org> | 2012-07-09 22:11:00 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2012-07-09 22:11:00 +0000 |
commit | 8d52d6ffa4cc04cb7af6ab0d1561c357b7bb91ed (patch) | |
tree | c2eaa7cd224dda2987fbb19d04611da5ea9425c7 /pkgtools/pkglint | |
parent | c6ccbd82c1e93e514a9358ebb6c8d4d1a988b6a3 (diff) | |
download | pkgsrc-8d52d6ffa4cc04cb7af6ab0d1561c357b7bb91ed.tar.gz |
Expand permission descriptions in standard warning.
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.1 | 14 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 16 |
2 files changed, 15 insertions, 15 deletions
diff --git a/pkgtools/pkglint/files/pkglint.1 b/pkgtools/pkglint/files/pkglint.1 index 5c0db63632f..54a12c8fbdf 100644 --- a/pkgtools/pkglint/files/pkglint.1 +++ b/pkgtools/pkglint/files/pkglint.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: pkglint.1,v 1.44 2012/07/09 17:36:59 wiz Exp $ +.\" $NetBSD: pkglint.1,v 1.45 2012/07/09 22:11:00 wiz Exp $ .\" From FreeBSD: portlint.1,v 1.8 1997/11/25 14:53:14 itojun Exp .\" .\" Copyright (c) 1997 by Jun-ichiro Itoh <itojun@itojun.org>. @@ -161,16 +161,16 @@ Warn if Makefile variables are not in the preferred order. Warn if a variable is used or defined outside its specified scope. The available permissions are: .Bl -tag -width 3n -compact -.It a +.It append append something using += -.It d +.It default set a default value using ?= -.It s -set a variable using :=, =, != -.It p +.It preprocess use a variable during preprocessing -.It u +.It runtime use a variable at runtime +.It set +set a variable using :=, =, != .El A .Sq \&? diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index d45ac6419f9..cae3642af66 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.836 2012/07/09 21:57:31 wiz Exp $ +# $NetBSD: pkglint.pl,v 1.837 2012/07/09 22:11:00 wiz Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -4760,16 +4760,16 @@ sub checkline_mk_vardef($$$) { my $perms = get_variable_perms($line, $varname); my $needed = { "=" => "s", "!=" => "s", "?=" => "d", "+=" => "a", ":=" => "s" }->{$op}; - + my %full = ( "a" => "append", "d" => "default", "p" => "preprocess", "s" => "set", "t" => "runtime" ); if (index($perms, $needed) == -1) { - $line->log_warning("Permission [${needed}] requested for ${varname}, but only [${perms}] is allowed."); + $line->log_warning("Permission [$full{$needed}] requested for ${varname}, but only [$full{$perms}] is allowed."); $line->explain_warning( "The available permissions are:", -"\ta\tappend something using +=", -"\td\tset a default value using ?=", -"\ts\tset a variable using :=, =, !=", -"\tp\tuse a variable during preprocessing", -"\tu\tuse a variable at runtime", +"\tappend\t\tappend something using +=", +"\tdefault\t\tset a default value using ?=", +"\tpreprocess\tuse a variable during preprocessing", +"\truntime\t\tuse a variable at runtime", +"\tset\t\tset a variable using :=, =, !=", "", "A \"?\" means that it is not yet clear which permissions are allowed", "and which aren't."); |