pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Fixed the indentation. Replaced...
details: https://anonhg.NetBSD.org/pkgsrc/rev/dfe53c857e4c
branches: trunk
changeset: 497896:dfe53c857e4c
user: rillig <rillig%pkgsrc.org@localhost>
date: Sat Aug 06 22:24:07 2005 +0000
description:
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:
pkgtools/pkglint/files/pkglint.pl | 40 +++++++++++++++++---------------------
1 files changed, 18 insertions(+), 22 deletions(-)
diffs (63 lines):
diff -r 76db9c6de76d -r dfe53c857e4c pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Sat Aug 06 22:20:10 2005 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Sat Aug 06 22:24:07 2005 +0000
@@ -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 @@
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}.");
+ } 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.");
}
- $last_subdir = $subdir;
-
- } 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>
$lines_index++;
}
Home |
Main Index |
Thread Index |
Old Index