diff options
author | rillig <rillig@pkgsrc.org> | 2005-07-02 14:46:06 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-07-02 14:46:06 +0000 |
commit | 0a355c263a2c061a42a22b1b9a9acea5d89c5f94 (patch) | |
tree | 7ae586ab2264f5eaf9357966b34bd5dc57617d2f /pkgtools | |
parent | c921cd51b39977617731b170ccf418be557c7cd9 (diff) | |
download | pkgsrc-0a355c263a2c061a42a22b1b9a9acea5d89c5f94.tar.gz |
Restricted the warning option -Wsort to only apply to PLIST files and
therefore renamed it to -Wplist-sort. This option is disabled by default
to avoid excessive warnings. Apart from an unfounded suggestion
somewhere in the past, I don't see a reason why PLIST files should be
sorted. Remember: The option is still available, it's just disabled by
default.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.0 | 7 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.1 | 10 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 10 |
3 files changed, 14 insertions, 13 deletions
diff --git a/pkgtools/pkglint/files/pkglint.0 b/pkgtools/pkglint/files/pkglint.0 index fb4bc46b93c..b2d5f1715dc 100644 --- a/pkgtools/pkglint/files/pkglint.0 +++ b/pkgtools/pkglint/files/pkglint.0 @@ -84,8 +84,9 @@ DDEESSCCRRIIPPTTIIOONN [no-]paren Warn if variables are used like $(VAR) in Makefiles. They should always be used like ${VAR}. - [no-]sort Warn if items of a list are not correctly sorted. Currently - this affects PLISTs and the SUBDIRs in category Makefiles. + [no-]plist-sort + Warn if items of a PLIST file are not sorted alphabetically. + This warning is disabled by default. [no-]types Warn for some Makefile variables if their assigned values do not match their type. @@ -137,4 +138,4 @@ BBUUGGSS ings concerning Makefiles do not print the file and line number where the warning originated. - May 23, 2005 3 + Jul 02, 2005 3 diff --git a/pkgtools/pkglint/files/pkglint.1 b/pkgtools/pkglint/files/pkglint.1 index fdb36b27524..89f9a3a7726 100644 --- a/pkgtools/pkglint/files/pkglint.1 +++ b/pkgtools/pkglint/files/pkglint.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: pkglint.1,v 1.13 2005/05/31 20:44:02 rillig Exp $ +.\" $NetBSD: pkglint.1,v 1.14 2005/07/02 14:46:06 rillig Exp $ .\" From FreeBSD: portlint.1,v 1.8 1997/11/25 14:53:14 itojun Exp .\" .\" Copyright (c) 1997 by Jun-ichiro Itoh <itojun@itojun.org>. @@ -6,7 +6,7 @@ .\" .\" Roland Illig <roland.illig@gmx.de>, 2004. .\" -.Dd May 23, 2005 +.Dd Jul 02, 2005 .Dt PKGLINT 1 .Sh NAME .Nm pkglint @@ -101,9 +101,9 @@ Warn if Makefile variables are not in the preferred order. .It [no-]paren Warn if variables are used like $(VAR) in Makefiles. They should always be used like ${VAR}. -.It [no-]sort -Warn if items of a list are not correctly sorted. -Currently this affects PLISTs and the SUBDIRs in category Makefiles. +.It [no-]plist-sort +Warn if items of a PLIST file are not sorted alphabetically. +This warning is disabled by default. .It [no-]types Warn for some Makefile variables if their assigned values do not match their type. diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index c1b78fa0d89..9129aeba136 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.197 2005/07/02 12:02:58 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.198 2005/07/02 14:46:06 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by: @@ -317,7 +317,7 @@ my $opt_warn_directcmd = true; my $opt_warn_exec = true; my $opt_warn_order = true; my $opt_warn_paren = true; -my $opt_warn_sort = true; +my $opt_warn_plist_sort = false; my $opt_warn_types = true; my $opt_warn_vague = true; my $opt_warn_workdir = true; @@ -327,7 +327,7 @@ my (%warnings) = ( "exec" => [\$opt_warn_exec, "warn if source files are executable"], "order" => [\$opt_warn_order, "warn if Makefile entries are unordered"], "paren" => [\$opt_warn_paren, "warn about use of \$(VAR) instead of \${VAR} in Makefiles"], - "sort" => [\$opt_warn_sort, "warn about any unsorted entries in category Makefiles and PLISTs"], + "plist-sort" => [\$opt_warn_plist_sort, "warn about unsorted entries in PLISTs"], "types" => [\$opt_warn_types, "do some simple type checking in Makefiles"], "vague" => [\$opt_warn_vague, "show old (unreliable, vague) warnings"], "workdir" => [\$opt_warn_workdir, "warn that work* should not be committed into CVS"], @@ -927,7 +927,7 @@ sub checkfile_PLIST($) { $line->log_error("Use of full pathname disallowed."); } - if ($opt_warn_sort && $line->text =~ qr"^\w") { + if ($opt_warn_plist_sort && $line->text =~ qr"^\w") { if (defined($last_file_seen)) { if ($last_file_seen gt $line->text) { $line->log_warning($line->text . " should be sorted before ${last_file_seen}."); @@ -2056,7 +2056,7 @@ sub check_category($) { $line->log_error("SUBDIR+= expected."); } push(@makefile_subdirs, $subdir); - if ($opt_warn_sort && $last_subdir ge $subdir) { + if ($last_subdir ge $subdir) { $line->log_error("$subdir should come before $last_subdir."); } $last_subdir = $subdir; |