summaryrefslogtreecommitdiffstats
path: root/mandoc.1
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2020-04-24 12:02:33 +0000
committerIngo Schwarze <schwarze@openbsd.org>2020-04-24 12:02:33 +0000
commit8cb870017a69040560be430c7f7978efa809acb3 (patch)
tree47f257f67a01e84b2f35c6e70b21c7c6bc3e9de8 /mandoc.1
parent2258889db3530de027ab40978bb09a8a824e9c5f (diff)
downloadmandoc-8cb870017a69040560be430c7f7978efa809acb3.tar.gz
provide a STYLE message when mandoc knows the file name and the extension
disagrees with the section number given in the .Dt or .TH macro; feature suggested and patch tested by jmc@
Diffstat (limited to 'mandoc.1')
-rw-r--r--mandoc.118
1 files changed, 16 insertions, 2 deletions
diff --git a/mandoc.1 b/mandoc.1
index 7497ec15..5f10320e 100644
--- a/mandoc.1
+++ b/mandoc.1
@@ -1,7 +1,7 @@
-.\" $Id$
+.\" $OpenBSD: mandoc.1,v 1.166 2020/02/15 15:28:01 schwarze Exp $
.\"
-.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2012, 2014-2020 Ingo Schwarze <schwarze@openbsd.org>
+.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
@@ -1078,6 +1078,20 @@ macro lacks the mandatory section argument.
The section number in a
.Ic \&Dt
line is invalid, but still used.
+.It Sy "filename/section mismatch"
+.Pq mdoc , man
+The name of the input file being processed is known and its file
+name extension starts with a non-zero digit, but the
+.Ic \&Dt
+or
+.Ic \&TH
+macro contains a
+.Ar section
+argument that starts with a different non-zero digit.
+The
+.Ar section
+argument is used as provided anyway.
+Consider checking whether the file name or the argument need a correction.
.It Sy "missing date, using \(dq\(dq"
.Pq mdoc, man
The document was parsed as