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 an explanation to the "Do...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a18f3abbd0fb
branches:  trunk
changeset: 530199:a18f3abbd0fb
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Mon Jun 18 09:35:59 2007 +0000

description:
Added an explanation to the "Don't add quotes around SUBST_MESSAGE" rule.

diffstat:

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

diffs (25 lines):

diff -r 87cd718054fe -r a18f3abbd0fb pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Mon Jun 18 08:14:54 2007 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Mon Jun 18 09:35:59 2007 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.709 2007/06/03 18:38:14 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.710 2007/06/18 09:35:59 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -5055,6 +5055,14 @@
        } elsif ($type eq "Message") {
                if ($value =~ qr"^[\"'].*[\"']$") {
                        $line->log_warning("${varname} should not be quoted.");
+                       $line->explain_warning(
+"The quoting is only needed for variables which are interpreted as",
+"multiple words (or, generally speaking, a list of something). A single",
+"text message does not belong to this class, since it is only printed",
+"as a whole.",
+"",
+"On the other hand, PKG_FAIL_REASON is a _list_ of text messages, so in",
+"that case, the quoting has to be done.");
                }
 
        } elsif ($type eq "Option") {



Home | Main Index | Thread Index | Old Index