pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files - Changed the wording of the wa...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/046487d80972
branches:  trunk
changeset: 507959:046487d80972
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat Feb 11 20:58:08 2006 +0000

description:
- Changed the wording of the warning message for misquoted variables. The
  wording had been completely mysterious. Now it gives a direct advise on
  how to fix the problem.

diffstat:

 pkgtools/pkglint/files/pkglint.pl |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (24 lines):

diff -r fba0240a3d84 -r 046487d80972 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sat Feb 11 20:11:54 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sat Feb 11 20:58:08 2006 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.510 2006/02/11 16:14:40 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.511 2006/02/11 20:58:08 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -2348,9 +2348,11 @@
                                        "appropriate to remove the double quotes.");
 
                        } elsif ($opt_warn_quoting) {
-                               $line->log_warning("Possibly misquoted make variable ${varname} in " . user_statename->[$state] . ".");
-                               if ($state == SWST_PLAIN && !defined($mod)) {
+                               if ($state == SWST_PLAIN) {
+                                       $line->log_warning("Please use \${${varname}:Q} instead of \${${varname}}.");
                                        $line->replace("\${${varname}}", "\${${varname}:Q}");
+                               } else {
+                                       $line->log_warning("Please use \${${varname}:Q} instead of \${${varname}} and make sure the variable appears outside of any quoting characters.");
                                }
                        }
 



Home | Main Index | Thread Index | Old Index