pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files - Marked the latest :Q warning ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f15cf03e963b
branches: trunk
changeset: 508137:f15cf03e963b
user: rillig <rillig%pkgsrc.org@localhost>
date: Wed Feb 15 17:00:02 2006 +0000
description:
- Marked the latest :Q warning as experimental. It currently suggests to
quote even ${CC} and ${CXX}, which is wrong. The warning is not
printed for the other TOOLS, but that is only because the tool
variables have not been assigned proper types.
- Reduced the number of negations in a condition.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (36 lines):
diff -r 0082582bc6e2 -r f15cf03e963b pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Wed Feb 15 16:58:59 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Wed Feb 15 17:00:02 2006 +0000
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.518 2006/02/15 16:10:49 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.519 2006/02/15 17:00:02 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -2304,7 +2304,7 @@
my $vartype = get_vartypes_map()->{$varname};
if ($vartype !~ qr"^List") {
- $line->log_warning("Please use \${${varname}:Q} instead of \${${varname}}.");
+ $line->log_warning("[experimental] Please use \${${varname}:Q} instead of \${${varname}}.");
}
} else {
$opt_debug and $line->log_warning("Not sure whether the variable ${varname} needs quoting.");
@@ -2545,11 +2545,11 @@
$line->log_debug("[" . scst_statename->[$state] . "] shellword=${shellword}");
- checkline_mk_shellword($line, $shellword, (
- $state != SCST_CASE
- && $state != SCST_FOR_CONT
- && $state != SCST_SET_CONT
- && ($state != SCST_START || $shellword !~ regex_sh_varassign)));
+ checkline_mk_shellword($line, $shellword, !(
+ $state == SCST_CASE
+ || $state == SCST_FOR_CONT
+ || $state == SCST_SET_CONT
+ || ($state == SCST_START && $shellword =~ regex_sh_varassign)));
#
# Actions associated with the current state
Home |
Main Index |
Thread Index |
Old Index