pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Explained a warning that wiz ju...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d0d18917c4d6
branches:  trunk
changeset: 525795:d0d18917c4d6
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Fri Feb 23 01:46:02 2007 +0000

description:
Explained a warning that wiz just asked me about.

diffstat:

 pkgtools/pkglint/files/pkglint.pl |  14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 3fb9a7a02c2a -r d0d18917c4d6 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Fri Feb 23 00:35:25 2007 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Fri Feb 23 01:46:02 2007 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.700 2007/02/21 01:38:53 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.701 2007/02/23 01:46:02 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -4003,6 +4003,18 @@
 
                if ($needs_quoting == false && $mod =~ qr":Q$") {
                        $line->log_warning("The :Q operator should not be used for \${${varname}} here.");
+                       $line->explain_warning(
+"When a variable of type ShellWord appears in a context that expects",
+"a shell word, it does not need to have a :Q operator. Even when it",
+"is concatenated with another variable, it still stays _one_ word.",
+"",
+"Example:",
+"\tWORD1=  Have\\ fun             # 1 word",
+"\tWORD2=  \"with BSD Make\"       # 1 word, too",
+"",
+"\tdemo:",
+"\t\techo \${WORD1}\${WORD2} # still 1 word");
+
                }
        }
 



Home | Main Index | Thread Index | Old Index