pkgsrc-Changes archive

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

CVS commit: pkgsrc/textproc/mdoclint



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sun May 14 18:04:23 UTC 2017

Modified Files:
        pkgsrc/textproc/mdoclint: Makefile
        pkgsrc/textproc/mdoclint/files: mdoclint mdoclint.1

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

>From Ingo Schwarze.

Bump version.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 pkgsrc/textproc/mdoclint/Makefile
cvs rdiff -u -r1.69 -r1.70 pkgsrc/textproc/mdoclint/files/mdoclint
cvs rdiff -u -r1.16 -r1.17 pkgsrc/textproc/mdoclint/files/mdoclint.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/mdoclint/Makefile
diff -u pkgsrc/textproc/mdoclint/Makefile:1.60 pkgsrc/textproc/mdoclint/Makefile:1.61
--- pkgsrc/textproc/mdoclint/Makefile:1.60      Sun May 14 18:00:12 2017
+++ pkgsrc/textproc/mdoclint/Makefile   Sun May 14 18:04:23 2017
@@ -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

Index: pkgsrc/textproc/mdoclint/files/mdoclint
diff -u pkgsrc/textproc/mdoclint/files/mdoclint:1.69 pkgsrc/textproc/mdoclint/files/mdoclint:1.70
--- pkgsrc/textproc/mdoclint/files/mdoclint:1.69        Sun May 14 18:00:12 2017
+++ pkgsrc/textproc/mdoclint/files/mdoclint     Sun May 14 18:04:23 2017
@@ -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 @@ use constant {
        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 @@ sub handle_options
        $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 @@ sub new
                oxrcsidseen => 0,
                nxrcsidseen => 0,
                lastsh => 0,
-               sasection => 0,
-               saname => '',
-               sarest => ',',
                in_section => 0,
                inliteral => 0,
                shseen => {},
@@ -362,29 +357,13 @@ sub parse_macro_args
        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 @@ sub process_line
                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 @@ sub finish
        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})) {

Index: pkgsrc/textproc/mdoclint/files/mdoclint.1
diff -u pkgsrc/textproc/mdoclint/files/mdoclint.1:1.16 pkgsrc/textproc/mdoclint/files/mdoclint.1:1.17
--- pkgsrc/textproc/mdoclint/files/mdoclint.1:1.16      Sun May 14 18:00:12 2017
+++ pkgsrc/textproc/mdoclint/files/mdoclint.1   Sun May 14 18:04:23 2017
@@ -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 @@ is a man page verifier.
 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