summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2005-08-06 22:24:07 +0000
committerrillig <rillig>2005-08-06 22:24:07 +0000
commit78db65806f8383d746eb5d4ff79e2b52c1a97d0e (patch)
tree0845efa25aadbee83d256cdc2977df56e67b491e /pkgtools
parenteb9b05c085113d6a21f47d2c0e85b9b7bb83988d (diff)
downloadpkgsrc-78db65806f8383d746eb5d4ff79e2b52c1a97d0e.tar.gz
Fixed the indentation. Replaced a nested if with an &&. Noticed that I
had put the closing indentation FIXME comment at a wrong place. But as it is removed now, this doesn't matter.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl38
1 files changed, 17 insertions, 21 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index bd04db3fb08..58b927bd20c 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -11,7 +11,7 @@
# Freely redistributable. Absolutely no warranty.
#
# From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp
-# $NetBSD: pkglint.pl,v 1.233 2005/08/06 22:20:10 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.234 2005/08/06 22:24:07 rillig Exp $
#
# This version contains lots of changes necessary for NetBSD packages
# done by:
@@ -2090,33 +2090,29 @@ sub check_category($) {
if (!$lines_atend && $fetch_next_line) {
$fetch_next_line = false;
-# FIXME: <indent +1>
- if ($line->text =~ qr"^(#?)SUBDIR\+=(\s*)(\S+)\s*(?:#\s*(.*?)\s*|)$") {
- my ($comment_flag, $indentation, $subdir, $comment) = ($1, $2, $3, $4);
+ if ($line->text =~ qr"^(#?)SUBDIR\+=(\s*)(\S+)\s*(?:#\s*(.*?)\s*|)$") {
+ my ($comment_flag, $indentation, $subdir, $comment) = ($1, $2, $3, $4);
- if ($comment_flag eq "#") {
- if (!defined($comment) || $comment eq "") {
+ if ($comment_flag eq "#" && (!defined($comment) || $comment eq "")) {
$line->log_error("${subdir} commented out without giving a reason.");
}
- }
- if ($indentation ne "\t") {
- $line->log_error("Indentation must be a single tab character.");
- }
+ if ($indentation ne "\t") {
+ $line->log_error("Indentation must be a single tab character.");
+ }
- if (defined($last_subdir) && $subdir le $last_subdir) {
- $line->log_error("${subdir} must come before ${last_subdir}.");
- }
- $last_subdir = $subdir;
+ if (defined($last_subdir) && $subdir le $last_subdir) {
+ $line->log_error("${subdir} must come before ${last_subdir}.");
+ }
+ $last_subdir = $subdir;
- } elsif ($is_wip && $line->text eq "") {
- # ignore the special case "wip", which defines its own "index" target.
- $lines_atend = true;
+ } elsif ($is_wip && $line->text eq "") {
+ # ignore the special case "wip", which defines its own "index" target.
+ $lines_atend = true;
- } else {
- $line->log_error("SUBDIR+= line expected.");
- }
-# FIXME: </indent>
+ } else {
+ $line->log_error("SUBDIR+= line expected.");
+ }
$lines_index++;
}