summaryrefslogtreecommitdiffstats
path: root/mandoc.1
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-08 00:11:23 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-08 00:11:23 +0000
commitc81e4b80275400dcb0530e3f1c5cae2fc53e4aab (patch)
tree829505ea8a53690849b134bf6a04a9d477ac8796 /mandoc.1
parent75d8bee1b6d2966fca4b9729823bc194f3fb390e (diff)
downloadmandoc-c81e4b80275400dcb0530e3f1c5cae2fc53e4aab.tar.gz
Stricter validation of the NAME section, in particular:
- require a comma between names - reject all other text nodes - reject all empty Nm below NAME, not only in the leading position - reject Nm after Nd
Diffstat (limited to 'mandoc.1')
-rw-r--r--mandoc.117
1 files changed, 12 insertions, 5 deletions
diff --git a/mandoc.1 b/mandoc.1
index 65e61074..10623355 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -1,7 +1,7 @@
.\" $Id$
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
-.\" Copyright (c) 2012, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
+.\" Copyright (c) 2012, 2014-2017 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
@@ -809,11 +809,13 @@ This may confuse
.Xr makewhatis 8
and
.Xr apropos 1 .
-.It Sy "NAME section without name"
+.It Sy "NAME section without Nm before Nd"
.Pq mdoc
The NAME section does not contain any
.Ic \&Nm
-child macro.
+child macro before the first
+.Ic \&Nd
+macro.
.It Sy "NAME section without description"
.Pq mdoc
The NAME section lacks the mandatory
@@ -830,6 +832,11 @@ The NAME section contains plain text or macros other than
.Ic \&Nm
and
.Ic \&Nd .
+.It Sy "missing comma before name"
+.Pq mdoc
+The NAME section contains an
+.Ic \&Nm
+macro that is neither the first one nor preceded by a comma.
.It Sy "missing description line, using \(dq\(dq"
.Pq mdoc
The
@@ -1622,8 +1629,8 @@ macro fails to specify the list type.
.It Sy "missing manual name, using \(dq\(dq"
.Pq mdoc
The first call to
-.Ic \&Nm
-lacks the required argument.
+.Ic \&Nm ,
+or any call in the NAME section, lacks the required argument.
.It Sy "uname(3) system call failed, using UNKNOWN"
.Pq mdoc
The