diff options
author | rillig <rillig> | 2009-05-26 21:40:42 +0000 |
---|---|---|
committer | rillig <rillig> | 2009-05-26 21:40:42 +0000 |
commit | a77537bdc379760839d9ff4b0d8e5ccb4604565f (patch) | |
tree | 30a5ff9d10a6f711cca9569f742a6bb55dcd0fb5 /pkgtools/pkglint/files/pkglint.pl | |
parent | 7b6a9dd972601ba0781c4e7e933836cdfca45302 (diff) | |
download | pkgsrc-a77537bdc379760839d9ff4b0d8e5ccb4604565f.tar.gz |
Shell comments may be hidden using @, as they have no side effects.
Diffstat (limited to 'pkgtools/pkglint/files/pkglint.pl')
-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); |