summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint
diff options
context:
space:
mode:
authorrillig <rillig>2007-02-23 01:46:02 +0000
committerrillig <rillig>2007-02-23 01:46:02 +0000
commit9f0a62c64190b865d688348072b85499b8a3ca00 (patch)
treeba1d78e3b7d80be054b25422b4a685cb6f7d750b /pkgtools/pkglint
parent096676a0be5dcf00449a65ed7a2f0e823cd8ef47 (diff)
downloadpkgsrc-9f0a62c64190b865d688348072b85499b8a3ca00.tar.gz
Explained a warning that wiz just asked me about.
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl14
1 files changed, 13 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 8365ab39741..324519d1967 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -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 @@ sub checkline_mk_varuse($$$$) {
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");
+
}
}