pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/mdoclint The -a checks are covered by mandoc ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/27b62698a351
branches:  trunk
changeset: 362415:27b62698a351
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sun May 14 18:04:23 2017 +0000

description:
The -a checks are covered by mandoc -Tlint as well, remove the option.

>From Ingo Schwarze.

Bump version.

diffstat:

 textproc/mdoclint/Makefile         |   4 +-
 textproc/mdoclint/files/mdoclint   |  62 ++-----------------------------------
 textproc/mdoclint/files/mdoclint.1 |  12 +-----
 3 files changed, 9 insertions(+), 69 deletions(-)

diffs (177 lines):

diff -r b3f2bd0185a4 -r 27b62698a351 textproc/mdoclint/Makefile
--- a/textproc/mdoclint/Makefile        Sun May 14 18:00:26 2017 +0000
+++ b/textproc/mdoclint/Makefile        Sun May 14 18:04:23 2017 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.60 2017/05/14 18:00:12 wiz Exp $
+# $NetBSD: Makefile,v 1.61 2017/05/14 18:04:23 wiz Exp $
 
-DISTNAME=      mdoclint-1.49
+DISTNAME=      mdoclint-1.50
 CATEGORIES=    textproc
 MASTER_SITES=  # none
 DISTFILES=     # none
diff -r b3f2bd0185a4 -r 27b62698a351 textproc/mdoclint/files/mdoclint
--- a/textproc/mdoclint/files/mdoclint  Sun May 14 18:00:26 2017 +0000
+++ b/textproc/mdoclint/files/mdoclint  Sun May 14 18:04:23 2017 +0000
@@ -1,7 +1,7 @@
 #!@PERL5@
 #
 # $OpenBSD: mdoclint,v 1.48 2016/01/24 20:10:48 schwarze Exp $
-# $NetBSD: mdoclint,v 1.69 2017/05/14 18:00:12 wiz Exp $
+# $NetBSD: mdoclint,v 1.70 2017/05/14 18:04:23 wiz Exp $
 #
 # Copyright (c) 2001-2017 Thomas Klausner
 # All rights reserved.
@@ -40,11 +40,10 @@
        OPENBSD => 0,
        NETBSD => 1,
        SECTION_NAME => 2,
-       SECTION_SEE_ALSO => 3,
 };
 
 use vars qw(
-       $opt_a $opt_D $opt_d $opt_e $opt_F $opt_f $opt_H $opt_h $opt_l
+       $opt_D $opt_d $opt_e $opt_F $opt_f $opt_H $opt_h $opt_l
        $opt_m $opt_n $opt_o $opt_p $opt_r $opt_S $opt_v $opt_w
        $opt_X $opt_x
 );
@@ -250,11 +249,10 @@
        $opt_h and usage();
 
        # default to all warnings if no flag is set
-       unless ($opt_a or $opt_D or $opt_d or $opt_e
-               or $opt_f or $opt_H or $opt_l
+       unless ($opt_D or $opt_d or $opt_e or $opt_f or $opt_H or $opt_l
                or $opt_m or $opt_n or $opt_o or $opt_p or $opt_r
                or $opt_S or $opt_X or $opt_x) {
-               $opt_a = $opt_D = $opt_d = $opt_f = $opt_m =
+               $opt_D = $opt_d = $opt_f = $opt_m =
                    $opt_n = $opt_o = $opt_p = $opt_r = $opt_S =
                    $opt_X = $opt_x = 1;
                $opt_e = $opt_l = 1 if NETBSD;
@@ -307,9 +305,6 @@
                oxrcsidseen => 0,
                nxrcsidseen => 0,
                lastsh => 0,
-               sasection => 0,
-               saname => '',
-               sarest => ',',
                in_section => 0,
                inliteral => 0,
                shseen => {},
@@ -362,29 +357,13 @@
        return @params;
 }
 
-sub end_of_section
-{
-       my ($s) = @_;
-
-       if ($s->{in_section} == SECTION_SEE_ALSO and not $s->{sarest} eq "") {
-               $s->warning("unneeded characters at end of SEE ALSO: ",
-                   "`$s->{sarest}'") if $opt_a;
-               # to avoid a second warning at EOF
-               $s->{sarest} = "";
-       }
-}
-
 sub set_section_header
 {
        my ($s, $section_header) = @_;
        $section_header = join(' ', $s->parse_macro_args($section_header));
 
-       end_of_section($s);
-
        if ($section_header eq 'NAME') {
                $s->{in_section} = SECTION_NAME;
-       } elsif ($section_header eq 'SEE ALSO') {
-               $s->{in_section} = SECTION_SEE_ALSO;
        } else {
                $s->{in_section} = 0;
        }
@@ -477,33 +456,6 @@
                if (/^\.Nm\s+(\S+)/o) {
                        $s->{names}{$1.$s->{sec}} = 1;
                }
-       } elsif ($s->{in_section} == SECTION_SEE_ALSO) {
-               if (/^\.Xr\s+(\S+)\s+($sections_re)\s?(.*)?$/o) {
-                       my ($saname, $sasection, $sarest) = ($1, $2, $3);
-                       $saname =~ s/^\\&//o;
-                       if ($s->{sasection} gt $sasection
-                           or ($s->{sasection} eq $sasection and
-                           (lc($s->{saname}) gt lc($saname)))) {
-                               $s->warning("SEE ALSO: `.Xr $s->{saname} ",
-                                   "$s->{sasection}' should be after ",
-                                   "`.Xr $saname $sasection'") if $opt_a;
-                       }
-                       if ($s->{sarest} ne ",") {
-                               $s->warning("SEE ALSO: .Xr not separated ",
-                                   "by comma, but `$s->{sarest}'") if $opt_a;
-                       }
-                       $s->{saname} = $saname;
-                       $s->{sasection} = $sasection;
-                       $s->{sarest} = $sarest;
-               }
-               if (/^\.Rs(?:\s+|$)/o) {
-                       if ($s->{sarest} ne "") {
-                               $s->warning("SEE ALSO: Not necessary to ",
-                                   "separate .Xr from .Rs by ",
-                                   "`$s->{sarest}'") if $opt_a;
-                       }
-                       $s->{sarest} = "";
-               }
        }
 
        if (/^\.Fn.*,.+/o) {
@@ -640,12 +592,6 @@
        if (OPENBSD and not $s->{oxrcsidseen}) {
                $s->warning("Missing RCS Id") if $opt_r;
        }
-
-       end_of_section($s);
-
-#      if (not ($fn =~ /$section$/)) {
-#              $s->warning("section doesn't match (internal value: $section)");
-#      }
        if ($s->{mandoc_p}) {
                foreach my $i (qw(NAME SYNOPSIS DESCRIPTION)) {
                        if (not ($s->{shseen}{$i})) {
diff -r b3f2bd0185a4 -r 27b62698a351 textproc/mdoclint/files/mdoclint.1
--- a/textproc/mdoclint/files/mdoclint.1        Sun May 14 18:00:26 2017 +0000
+++ b/textproc/mdoclint/files/mdoclint.1        Sun May 14 18:04:23 2017 +0000
@@ -1,5 +1,5 @@
 .\"    $OpenBSD: mdoclint.1,v 1.7 2009/04/13 19:06:38 jmc Exp $
-.\" $NetBSD: mdoclint.1,v 1.16 2017/05/14 18:00:12 wiz Exp $
+.\" $NetBSD: mdoclint.1,v 1.17 2017/05/14 18:04:23 wiz Exp $
 .\"
 .\" Copyright (c) 2001-2013 Thomas Klausner
 .\" All rights reserved.
@@ -33,7 +33,7 @@
 .Nd man page verifier
 .Sh SYNOPSIS
 .Nm
-.Op Fl aDdeFfHhlmnoprSvwXx
+.Op Fl DdeFfHhlmnoprSvwXx
 .Ar
 .Sh DESCRIPTION
 .Nm
@@ -41,18 +41,12 @@
 It tries to automatically find as many common
 errors that occur when writing man pages as possible.
 If no flags are given,
-.Fl aDdeflmnoprSXx
+.Fl DdeflmnoprSXx
 is assumed (that is, everything except
 .Fl FHhvw ) .
 .Pp
 The options are as follows:
 .Bl -tag -width xxxx -compact
-.It Fl a
-Warn about some possible problems in the
-.Sx SEE ALSO
-section, like incorrect order (correct order: first by section
-numbers, then by name), or incorrect or superfluous punctuation
-between or after the cross-references.
 .It Fl D
 Warn about bad casing and architectures in the .Dt macro.
 .It Fl d



Home | Main Index | Thread Index | Old Index