Wed Mar 6 22:09:02 2013 UTC ()
Do not warn about () in literal strings or when used as macro argument.
Ride bump.


(wiz)
diff -r1.23 -r1.24 pkgsrc/textproc/mdoclint/files/mdoclint

cvs diff -r1.23 -r1.24 pkgsrc/textproc/mdoclint/files/Attic/mdoclint (expand / switch to unified diff)

--- pkgsrc/textproc/mdoclint/files/Attic/mdoclint 2013/03/06 21:43:43 1.23
+++ pkgsrc/textproc/mdoclint/files/Attic/mdoclint 2013/03/06 22:09:01 1.24
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1#!@PERL5@ 1#!@PERL5@
2# 2#
3# $OpenBSD: mdoclint,v 1.14 2009/04/13 12:40:05 espie Exp $ 3# $OpenBSD: mdoclint,v 1.14 2009/04/13 12:40:05 espie Exp $
4# $NetBSD: mdoclint,v 1.23 2013/03/06 21:43:43 wiz Exp $ 4# $NetBSD: mdoclint,v 1.24 2013/03/06 22:09:01 wiz Exp $
5# 5#
6# Copyright (c) 2001-2013 Thomas Klausner 6# Copyright (c) 2001-2013 Thomas Klausner
7# All rights reserved. 7# All rights reserved.
8# 8#
9# Redistribution and use in source and binary forms, with or without 9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions 10# modification, are permitted provided that the following conditions
11# are met: 11# are met:
12# 1. Redistributions of source code must retain the above copyright 12# 1. Redistributions of source code must retain the above copyright
13# notice, this list of conditions and the following disclaimer. 13# notice, this list of conditions and the following disclaimer.
14# 2. Redistributions in binary form must reproduce the above copyright 14# 2. Redistributions in binary form must reproduce the above copyright
15# notice, this list of conditions and the following disclaimer in the 15# notice, this list of conditions and the following disclaimer in the
16# documentation and/or other materials provided with the distribution. 16# documentation and/or other materials provided with the distribution.
17# 17#
@@ -532,27 +532,27 @@ sub process_line @@ -532,27 +532,27 @@ sub process_line
532 } 532 }
533 533
534 if (/\w\w\.\s+[A-Z]/o) { 534 if (/\w\w\.\s+[A-Z]/o) {
535 $s->warning("new sentence, new line: `$_'") if $opt_p; 535 $s->warning("new sentence, new line: `$_'") if $opt_p;
536 } 536 }
537 if (/^\... .*[^\s][\.();,\[\]\{\}:]$/o 537 if (/^\... .*[^\s][\.();,\[\]\{\}:]$/o
538 and not /\s\.\.\.$/o and not /\\&.$/o) { 538 and not /\s\.\.\.$/o and not /\\&.$/o) {
539 $s->warning("punctuation in format string ", 539 $s->warning("punctuation in format string ",
540 "without space: `$_'") if $opt_p; 540 "without space: `$_'") if $opt_p;
541 } 541 }
542 if (/^\./o and /Ns [\.();,\[\]\{\}:]/o) { 542 if (/^\./o and /Ns [\.();,\[\]\{\}:]/o) {
543 $s->warning("possible Ns abuse: `$_'") if $opt_p; 543 $s->warning("possible Ns abuse: `$_'") if $opt_p;
544 } 544 }
545 if (/(\w+)\(\)/o) { 545 if ((/^([^\.]\w+)\(\)/o or /^[^\.].*\s(\w+)\(\)/o) and not $s->{inliteral}) {
546 $s->warning("use .Fn or .Xr for functions: `$1()'") if $opt_p; 546 $s->warning("use .Fn or .Xr for functions: `$1()'") if $opt_p;
547 } 547 }
548 548
549 my $destruct = $_; 549 my $destruct = $_;
550 if ($s->{mandoc_p}) { 550 if ($s->{mandoc_p}) {
551 $destruct =~ s/\\\&([\w\.])/$1/o; 551 $destruct =~ s/\\\&([\w\.])/$1/o;
552 if ($destruct =~ /^\.Xr\s+([\w\:\.\-\+\/]+)\s+($esections_re)(.*)/o) { 552 if ($destruct =~ /^\.Xr\s+([\w\:\.\-\+\/]+)\s+($esections_re)(.*)/o) {
553 $s->debug("Xref to $1($2) found: `$_'"); 553 $s->debug("Xref to $1($2) found: `$_'");
554 $s->verify_xref($1, $2, "", ""); 554 $s->verify_xref($1, $2, "", "");
555 if ($3 =~ /^\S/o) { 555 if ($3 =~ /^\S/o) {
556 $s->warning("No space after section number in Xref: `$_'") if $opt_x; 556 $s->warning("No space after section number in Xref: `$_'") if $opt_x;
557 } 557 }
558 } elsif ($destruct =~ /^\.Xr/o) { 558 } elsif ($destruct =~ /^\.Xr/o) {