-.\" $OpenBSD: mandoc.1,v 1.115 2017/05/31 15:30:12 schwarze Exp $
+.\" $OpenBSD: mandoc.1,v 1.116 2017/06/01 15:24:41 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2012, 2014-2017 Ingo Schwarze <schwarze@openbsd.org>
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 31 2017 $
+.Dd $Mdocdate: June 1 2017 $
.Dt MANDOC 1
.Os
.Sh NAME
.Ic \&Fx ,
or
.Ic \&Dx .
+.It Sy "description line ends with a full stop"
+.Pq mdoc
+Do not use punctuation at the end of an
+.Ic \&Nd
+block.
.El
.Ss Warnings related to the document prologue
.Bl -ohang
-/* $OpenBSD: mandoc.h,v 1.160 2017/05/31 15:30:12 schwarze Exp $ */
+/* $OpenBSD: mandoc.h,v 1.161 2017/06/01 15:24:41 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
MANDOCERR_MACRO_USELESS, /* useless macro: macro */
MANDOCERR_BX, /* consider using OS macro: macro */
+ MANDOCERR_ND_DOT, /* description line ends with a full stop */
MANDOCERR_WARNING, /* ===== start of warnings ===== */
-/* $OpenBSD: mdoc_validate.c,v 1.245 2017/05/31 15:30:12 schwarze Exp $ */
+/* $OpenBSD: mdoc_validate.c,v 1.246 2017/06/01 15:24:41 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
post_nd(POST_ARGS)
{
struct roff_node *n;
+ size_t sz;
n = mdoc->last;
if (n->child == NULL)
mandoc_msg(MANDOCERR_ND_EMPTY, mdoc->parse,
n->line, n->pos, "Nd");
+ else if (n->last->type == ROFFT_TEXT &&
+ (sz = strlen(n->last->string)) != 0 &&
+ n->last->string[sz - 1] == '.')
+ mandoc_msg(MANDOCERR_ND_DOT, mdoc->parse,
+ n->last->line, n->last->pos + sz - 1, NULL);
post_hyph(mdoc);
}
-/* $OpenBSD: read.c,v 1.139 2017/05/31 15:30:12 schwarze Exp $ */
+/* $OpenBSD: read.c,v 1.140 2017/06/01 15:24:41 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
"useless macro",
"consider using OS macro",
+ "description line ends with a full stop",
"generic warning",