pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Added a warning that shell comm...
details: https://anonhg.NetBSD.org/pkgsrc/rev/0925b9f06f9f
branches: trunk
changeset: 512074:0925b9f06f9f
user: rillig <rillig%pkgsrc.org@localhost>
date: Sun Apr 30 21:31:32 2006 +0000
description:
Added a warning that shell commands should not be hidden unconditionally
(by starting with the @ character).
diffstat:
pkgtools/pkglint/files/pkglint.pl | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 79ebaf6def86 -r 0925b9f06f9f pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sun Apr 30 21:26:54 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sun Apr 30 21:31:32 2006 +0000
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.565 2006/04/29 10:12:36 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.566 2006/04/30 21:31:32 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -2752,7 +2752,14 @@
}
$vartools = get_vartool_names();
- ($rest = $text) =~ s/^[-@]*(?:\$\{_PKG_SILENT\})?(?:\$\{_PKG_DEBUG\})?//;
+ $rest = $text;
+ if ($rest =~ s/^([-@]*)(?:\$\{_PKG_SILENT\}\$\{_PKG_DEBUG\})?//) {
+ my ($hidden) = ($1);
+ if ($hidden =~ qr"\@") {
+ $line->log_warning("Shell commands should not be hidden unconditionally.");
+ }
+ }
+
$state = SCST_START;
$set_e_mode = false;
while ($rest =~ s/^$regex_shellword//) {
Home |
Main Index |
Thread Index |
Old Index