summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mandoc.1
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2017-07-02 15:31:49 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2017-07-02 15:31:49 +0000
commit23737f2b4a46cae385a54a45f7aeeb05141d9d73 (patch)
tree3704e1e3f21b971c1ab8b1ab5c8664a298dcfbd9 /usr.bin/mandoc/mandoc.1
parent4d7b727c50e22bb3bef01dd520d293c65ace05cf (diff)
add warning "cross reference to self"; inspired by mdoclint
Diffstat (limited to 'usr.bin/mandoc/mandoc.1')
-rw-r--r--usr.bin/mandoc/mandoc.122
1 files changed, 20 insertions, 2 deletions
diff --git a/usr.bin/mandoc/mandoc.1 b/usr.bin/mandoc/mandoc.1
index 2e4ceffbe4e..1304a3fae47 100644
--- a/usr.bin/mandoc/mandoc.1
+++ b/usr.bin/mandoc/mandoc.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mandoc.1,v 1.134 2017/07/01 09:47:23 schwarze Exp $
+.\" $OpenBSD: mandoc.1,v 1.135 2017/07/02 15:31:48 schwarze Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2012, 2014-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: July 1 2017 $
+.Dd $Mdocdate: July 2 2017 $
.Dt MANDOC 1
.Os
.Sh NAME
@@ -1097,6 +1097,24 @@ The same standard section title occurs more than once.
.Pq mdoc
A standard section header occurs in a section of the manual
where it normally isn't useful.
+.It Sy "cross reference to self"
+.Pq mdoc
+An
+.Ic \&Xr
+macro refers to a name and section matching the section of the present
+manual page and a name mentioned in an
+.Ic \&Nm
+macro in the NAME or SYNOPSIS section, or in an
+.Ic \&Fn
+or
+.Ic \&Fo
+macro in the SYNOPSIS.
+Consider using
+.Ic \&Nm
+or
+.Ic \&Fn
+instead of
+.Ic \&Xr .
.It Sy "unusual Xr order"
.Pq mdoc
In the SEE ALSO section, an