diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2008-11-23 17:07:37 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2008-11-23 17:07:37 +0000 |
commit | 4c449a40d9a260c0a8f3bf7da4744c5451fb63c0 (patch) | |
tree | 134c685424cc6a287df84b38a60dad100ac4c8f2 /regress/usr.bin/mdoclint | |
parent | 02c4a349490cfc1eb230d34ed78b202637d0174b (diff) |
expand -p to warn about "new sentence, new line" errors;
from wiz@netbsd
Diffstat (limited to 'regress/usr.bin/mdoclint')
-rw-r--r-- | regress/usr.bin/mdoclint/mdoclint | 5 | ||||
-rw-r--r-- | regress/usr.bin/mdoclint/mdoclint.1 | 13 |
2 files changed, 10 insertions, 8 deletions
diff --git a/regress/usr.bin/mdoclint/mdoclint b/regress/usr.bin/mdoclint/mdoclint index 830776a7fa2..7f78dee533f 100644 --- a/regress/usr.bin/mdoclint/mdoclint +++ b/regress/usr.bin/mdoclint/mdoclint @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# $OpenBSD: mdoclint,v 1.10 2008/11/07 20:20:33 espie Exp $ +# $OpenBSD: mdoclint,v 1.11 2008/11/23 17:07:36 jmc Exp $ # $NetBSD: mdoclint,v 1.18 2008/01/05 09:03:50 wiz Exp $ # # Copyright (c) 2001-2008 Thomas Klausner @@ -286,6 +286,9 @@ sub handle_file { } } if ($opt_p) { + if (not /^\.\\\"/o and /\w\w\.\s+[A-Z]/o) { + warning("new sentence, new line: `$_'"); + } if (not /^\.\\\"/o and /^\... .*[^\s][\.();,\[\]\{\}:]$/o and not /\s\.\.\.$/o and not /\\&.$/o) { warning("punctuation in format string without space: `$_'"); diff --git a/regress/usr.bin/mdoclint/mdoclint.1 b/regress/usr.bin/mdoclint/mdoclint.1 index 44d7dbceb1e..c7fce241140 100644 --- a/regress/usr.bin/mdoclint/mdoclint.1 +++ b/regress/usr.bin/mdoclint/mdoclint.1 @@ -1,7 +1,7 @@ -.\" $OpenBSD: mdoclint.1,v 1.4 2008/11/03 12:17:01 espie Exp $ +.\" $OpenBSD: mdoclint.1,v 1.5 2008/11/23 17:07:36 jmc Exp $ .\" $NetBSD: mdoclint.1,v 1.3 2003/05/09 09:22:05 wiz Exp $ .\" -.\" Copyright (c) 2001, 2002, 2003 Thomas Klausner +.\" Copyright (c) 2001-2008 Thomas Klausner .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: November 3 2008 $ +.Dd $Mdocdate: November 23 2008 $ .Os .Dt MDOCLINT 1 .Sh NAME @@ -98,10 +98,9 @@ the current version is default). Warn about paragraph problems, like empty lines or .Pp macros before section macros like .Ss and .Sh. .It Fl p -Warn about possible punctuation problems at the end of macro -arguments. -Also warns about abuse of .Ns to get punctuation directly next to a -word \(en this should not be needed. +Warn about possible punctuation problems at the end of macro arguments, +abuse of .Ns to get punctuation directly next to a word, +and sentences not starting on a new line. .It Fl r Warn about missing RCS Id. .It Fl S |