diff options
author | rillig <rillig@pkgsrc.org> | 2006-05-31 08:10:45 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-05-31 08:10:45 +0000 |
commit | ef3ee853a6cfccf02707cbea778db3b8cfce4bad (patch) | |
tree | 640c91ea53e5adc535804b50624db87f1a52811e /pkgtools | |
parent | 69e5762c65f43fdb5e6d73bad99227faee480eee (diff) | |
download | pkgsrc-ef3ee853a6cfccf02707cbea778db3b8cfce4bad.tar.gz |
Fixed indentation level in checkline_mk_vartype.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index c05bcdadc40..61b61da2734 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.592 2006/05/31 06:35:52 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.593 2006/05/31 08:10:45 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -4062,42 +4062,42 @@ sub checkline_mk_vartype($$$$$) { } } - if (!defined($type)) { - # Cannot check anything if the type is not known. + if (!defined($type)) { + # Cannot check anything if the type is not known. - } elsif ($op eq "!=") { - $opt_debug and $line->log_info("Use of !=: ${value}"); + } elsif ($op eq "!=") { + $opt_debug and $line->log_info("Use of !=: ${value}"); - } elsif ($type->kind_of_list != LK_NONE) { - my (@words, $rest); + } elsif ($type->kind_of_list != LK_NONE) { + my (@words, $rest); - if ($type->kind_of_list == LK_INTERNAL) { - @words = split(qr"\s+", $value); - $rest = ""; - } else { - @words = (); - $rest = $value; - while ($rest =~ s/^$regex_shellword//) { - my ($word) = ($1); - last if ($word =~ qr"^#"); - push(@words, $1); - } - } - - foreach my $word (@words) { - checkline_mk_vartype_basic($line, $varname, $type->basic_type, $op, $word, $comment, true); - if ($type->kind_of_list != LK_INTERNAL) { - checkline_mk_shellword($line, $word, true); - } + if ($type->kind_of_list == LK_INTERNAL) { + @words = split(qr"\s+", $value); + $rest = ""; + } else { + @words = (); + $rest = $value; + while ($rest =~ s/^$regex_shellword//) { + my ($word) = ($1); + last if ($word =~ qr"^#"); + push(@words, $1); } + } - if ($rest !~ qr"^\s*$") { - $opt_debug and $line->log_warning("Invalid shell word \"${value}\" at the end."); + foreach my $word (@words) { + checkline_mk_vartype_basic($line, $varname, $type->basic_type, $op, $word, $comment, true); + if ($type->kind_of_list != LK_INTERNAL) { + checkline_mk_shellword($line, $word, true); } + } - } else { - checkline_mk_vartype_basic($line, $varname, $type->basic_type, $op, $value, $comment, !type_should_be_quoted($type)); + if ($rest !~ qr"^\s*$") { + $opt_debug and $line->log_warning("Invalid shell word \"${value}\" at the end."); } + + } else { + checkline_mk_vartype_basic($line, $varname, $type->basic_type, $op, $value, $comment, !type_should_be_quoted($type)); + } } sub checkline_mk_varassign($$$$$) { |