diff options
author | rillig <rillig> | 2009-05-26 21:40:42 +0000 |
---|---|---|
committer | rillig <rillig> | 2009-05-26 21:40:42 +0000 |
commit | d5b442cde8669c2ac8589141f7e42956f92652d3 (patch) | |
tree | 30a5ff9d10a6f711cca9569f742a6bb55dcd0fb5 | |
parent | 82a4555d1e7aa9e06addd67dc687df0a8616e04f (diff) | |
download | pkgsrc-d5b442cde8669c2ac8589141f7e42956f92652d3.tar.gz |
Shell comments may be hidden using @, as they have no side effects.
-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); |