diff options
author | rillig <rillig@pkgsrc.org> | 2009-05-26 21:40:42 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2009-05-26 21:40:42 +0000 |
commit | 8447379c6fac9bf87f4f3d59aa5fff3009b05b8d (patch) | |
tree | 30a5ff9d10a6f711cca9569f742a6bb55dcd0fb5 /pkgtools/pkglint | |
parent | 5651451ce7ddd5d430b1ff18d72fa5c3f7ce5143 (diff) | |
download | pkgsrc-8447379c6fac9bf87f4f3d59aa5fff3009b05b8d.tar.gz |
Shell comments may be hidden using @, as they have no side effects.
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 6af08439c70..e5f2470690f 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.811 2009/04/26 16:08:40 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.812 2009/05/26 21:40:42 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -4377,7 +4377,7 @@ sub checkline_mk_shelltext($$) { $set_e_mode = false; - if ($rest =~ s/^\s*([-@]*)(\$\{_PKG_SILENT\}\$\{_PKG_DEBUG\}|\${RUN}|)//) { + if ($rest =~ s/^\s*([-@]*)(\$\{_PKG_SILENT\}\$\{_PKG_DEBUG\}|\$\{RUN\}|)//) { my ($hidden, $macro) = ($1, $2); if ($hidden !~ m"\@") { @@ -4386,6 +4386,9 @@ sub checkline_mk_shelltext($$) { } elsif (defined($mkctx_target) && $mkctx_target =~ m"^(?:show-.*|.*-message)$") { # In some targets commands may be hidden. + } elsif ($rest =~ m"^#") { + # Shell comments may be hidden, as they have no side effects + } elsif ($rest =~ $regex_shellword) { my ($cmd) = ($1); |