diff options
author | rillig <rillig> | 2007-02-23 01:46:02 +0000 |
---|---|---|
committer | rillig <rillig> | 2007-02-23 01:46:02 +0000 |
commit | 943d121b16f7ed5472e7be722f9c59614f997b09 (patch) | |
tree | ba1d78e3b7d80be054b25422b4a685cb6f7d750b /pkgtools | |
parent | a9d444753b12bef27fd557d1155cc7456bd772b7 (diff) | |
download | pkgsrc-943d121b16f7ed5472e7be722f9c59614f997b09.tar.gz |
Explained a warning that wiz just asked me about.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 14 |
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"); + } } |