diff options
author | rillig <rillig@pkgsrc.org> | 2006-01-09 02:47:56 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-01-09 02:47:56 +0000 |
commit | b51d365e02399cb212b83465bcccc27ea68b0b5a (patch) | |
tree | 88f07c2c2f7310673a748aa5f666ad79d53b5a06 /pkgtools/pkglint | |
parent | a43c213dc7a4f27daaec43355661b5ec595af588 (diff) | |
download | pkgsrc-b51d365e02399cb212b83465bcccc27ea68b0b5a.tar.gz |
- Added "Please use ${FOO} instead of $(FOO)."
- It is an error if the COMMENT has the default value from url2pkg.
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 6605ec2a2e1..d55ab815207 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -w -# $NetBSD: pkglint.pl,v 1.457 2006/01/08 15:55:13 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.458 2006/01/09 02:47:56 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -1690,6 +1690,13 @@ sub checkline_mk_text($$) { } } + $rest = $text; + while ($rest =~ s/\$\(([-A-Z0-9a-z_]+)(?::[^\}]+)?\)//) { + my ($varname) = ($1); + + $line->log_warning("Please use \${${varname}\} instead of \$(${varname})."); + } + } sub checkline_mk_shellword($$$) { @@ -2057,6 +2064,9 @@ sub checkline_mk_vartype_basic($$$$$) { } } elsif ($type eq "Comment") { + if ($value eq "SHORT_DESCRIPTION_OF_THE_PACKAGE") { + $line->log_error("COMMENT must be set."); + } if ($value =~ qr"^(a|an)\s+"i) { $line->log_warning("COMMENT should not begin with '$1'."); } @@ -3004,8 +3014,6 @@ sub checkfile_package_Makefile($$$) { checkperms($fname); - # TODO: "Please use \${VARIABLE} instead of \$(VARIABLE)." - if (!exists($makevar->{"PLIST_SRC"}) && !exists($makevar->{"NO_PKG_REGISTER"}) && !-f "${current_dir}/$pkgdir/PLIST" |