diff options
author | rillig <rillig> | 2005-11-10 11:03:57 +0000 |
---|---|---|
committer | rillig <rillig> | 2005-11-10 11:03:57 +0000 |
commit | 7f15009b2cb7f9d91e378916467fdb788a633719 (patch) | |
tree | b5315a4de34e3fb45d2200d8e0821990bccb2d64 /pkgtools | |
parent | 8c308769875145b2b671d15bc51206cf86229a64 (diff) | |
download | pkgsrc-7f15009b2cb7f9d91e378916467fdb788a633719.tar.gz |
Updated pkglint to 4.39.
Changes since 4.38:
- Disabled the check on Makefile variable order, as the discussion on
tech-pkg has not finished yet.
- Improved detection of valid tool names.
- Improved detection of direct use of tool names. (Less false positives.)
- Improved the diagnostics for direct use of tool names.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 14 |
2 files changed, 10 insertions, 8 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index db76f9548bb..e88a8bbd372 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.290 2005/11/10 10:26:46 rillig Exp $ +# $NetBSD: Makefile,v 1.291 2005/11/10 11:03:57 rillig Exp $ # -DISTNAME= pkglint-4.38.4 +DISTNAME= pkglint-4.39 CATEGORIES= pkgtools devel MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 174c1152f6a..69d6405c91f 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -11,7 +11,7 @@ # Freely redistributable. Absolutely no warranty. # # From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp -# $NetBSD: pkglint.pl,v 1.343 2005/11/10 10:26:46 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.344 2005/11/10 11:03:57 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by: @@ -1856,7 +1856,9 @@ sub checklines_direct_tools($) { USE_TOOLS); my @valid_shellcmds = ( qr"for file in", - qr"(?:\./Build|\$\{JAM_COMMAND\})\s+(?:install|test)", + qr"\./${regex_tools}\b", + qr"(?:\./Build|\$\{(?:BJAM_CMD|JAM_COMMAND)\})\s+(?:install|test)", + qr"\$\{(?:GMAKE|MAKE_PROGRAM)\}\s+(?:install)", qr"\"[^\"]*${regex_tools}[^\"]*\"", qr"\'[^\']*${regex_tools}[^\']*\'", qr"#.*", @@ -1893,9 +1895,9 @@ sub checklines_direct_tools($) { my ($varname, undef, $varvalue) = ($1, $2, $3); if ($varname =~ $regex_ok_vars) { - $line->log_info("Legitimate direct use of \"${tool}\" in variable ${varname}."); + $line->log_info("Legitimate direct use of tool \"${tool}\" in variable ${varname}."); } elsif ($varvalue =~ $regex_tools_with_context) { - $line->log_warning("Possible direct use of \"${tool}\" in variable ${varname}. Please use \$\{$toolvar{$tool}\} instead."); + $line->log_warning("Possible direct use of tool \"${tool}\" in variable ${varname}. Please use \$\{$toolvar{$tool}\} instead."); } else { # the tool name has appeared in the comment } @@ -1923,9 +1925,9 @@ sub checklines_direct_tools($) { } if ($remaining_shellcmd =~ $regex_tools_with_context) { - $line->log_warning("Possible direct use of \"${tool}\" in shell command \"${short_shellcmd}\". Please use \$\{$toolvar{$tool}\} instead."); + $line->log_warning("Possible direct use of tool \"${tool}\" in shell command \"${short_shellcmd}\". Please use \$\{$toolvar{$tool}\} instead."); } else { - $line->log_info("Legitimate direct use of \"${tool}\" in shell command \"${short_shellcmd}\"."); + $line->log_info("Legitimate direct use of tool \"${tool}\" in shell command \"${short_shellcmd}\"."); } # skip processing directives |