pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Removed the "Internal pkglint e...
details: https://anonhg.NetBSD.org/pkgsrc/rev/d4bd32deb1d5
branches: trunk
changeset: 527921:d4bd32deb1d5
user: rillig <rillig%pkgsrc.org@localhost>
date: Sun Apr 15 22:58:49 2007 +0000
description:
Removed the "Internal pkglint errors" when parsing complicated Make
variable expressions. These expressions are skipped completely and not
checked for anything.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diffs (35 lines):
diff -r 3147ad05bbb1 -r d4bd32deb1d5 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sun Apr 15 22:14:44 2007 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sun Apr 15 22:58:49 2007 +0000
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.704 2007/03/24 05:36:20 schmonz Exp $
+# $NetBSD: pkglint.pl,v 1.705 2007/04/15 22:58:49 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -4171,6 +4171,24 @@
checkline_mk_varuse($line, $varname, defined($mod) ? $mod : "", $ctx);
}
+ # The syntax of the variable modifiers can get quite
+ # hairy. In lack of motivation, we just skip anything
+ # complicated, hoping that at least the braces are
+ # balanced.
+ } elsif ($rest =~ s/^\$\{//) {
+ my $braces = 1;
+ while ($rest ne "" && $braces > 0) {
+ if ($rest =~ s/^\}//) {
+ $braces--;
+ } elsif ($rest =~ s/^\{//) {
+ $braces++;
+ } elsif ($rest =~ s/^[^{}]+//) {
+ # Nothing to do here.
+ } else {
+ last;
+ }
+ }
+
} elsif ($state == SWST_PLAIN) {
if ($rest =~ s/^[!#\%&\(\)*+,\-.\/0-9:;<=>?\@A-Z\[\]^_a-z{|}~]+//) {
} elsif ($rest =~ s/^\'//) {
Home |
Main Index |
Thread Index |
Old Index