diff options
author | wiz <wiz@pkgsrc.org> | 2017-05-14 18:04:23 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2017-05-14 18:04:23 +0000 |
commit | 53de67467f97ec55a517d7e5be352f55d5c0337d (patch) | |
tree | f902fcbba85e3ed5608c7b61eb334ee9ed6e4e4a /textproc/mdoclint | |
parent | 12a952bbf32a27ec983c5883cd159c64e9d19adf (diff) | |
download | pkgsrc-53de67467f97ec55a517d7e5be352f55d5c0337d.tar.gz |
The -a checks are covered by mandoc -Tlint as well, remove the option.
From Ingo Schwarze.
Bump version.
Diffstat (limited to 'textproc/mdoclint')
-rw-r--r-- | textproc/mdoclint/Makefile | 4 | ||||
-rwxr-xr-x | textproc/mdoclint/files/mdoclint | 62 | ||||
-rwxr-xr-x | textproc/mdoclint/files/mdoclint.1 | 12 |
3 files changed, 9 insertions, 69 deletions
diff --git a/textproc/mdoclint/Makefile b/textproc/mdoclint/Makefile index ff1a8ca25ba..02b4ee7dff7 100644 --- a/textproc/mdoclint/Makefile +++ b/textproc/mdoclint/Makefile @@ -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 --git a/textproc/mdoclint/files/mdoclint b/textproc/mdoclint/files/mdoclint index abce62f2e78..2d90e21d8e1 100755 --- a/textproc/mdoclint/files/mdoclint +++ b/textproc/mdoclint/files/mdoclint @@ -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})) { diff --git a/textproc/mdoclint/files/mdoclint.1 b/textproc/mdoclint/files/mdoclint.1 index 2d81a2dcb0e..831480ac548 100755 --- a/textproc/mdoclint/files/mdoclint.1 +++ b/textproc/mdoclint/files/mdoclint.1 @@ -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 |