pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Shell comments may be hidden us...
details: https://anonhg.NetBSD.org/pkgsrc/rev/4318e2cea327
branches: trunk
changeset: 393794:4318e2cea327
user: rillig <rillig%pkgsrc.org@localhost>
date: Tue May 26 21:40:42 2009 +0000
description:
Shell comments may be hidden using @, as they have no side effects.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r f367d70e013b -r 4318e2cea327 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Tue May 26 21:34:36 2009 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Tue May 26 21:40:42 2009 +0000
@@ -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 @@
$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 @@
} 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);
Home |
Main Index |
Thread Index |
Old Index