I hit this while reviewing a recent diff:

  ritchie /usr/src/usr.sbin/ospf6d$ mandoc -Tlint ospf6d.conf.5
  mandoc: ospf6d.conf.5:211:5: STYLE: typo in section name: Sh AREAS instead of 
CAVEATS

which is a false positive.  The distance between "AREAS" and "CAVEATS"
is 3, maybe it's a bit much to warn about possible typos?

While I don't think this is a big deal, here's a possible tweak to
make the message less assertive.

Thoughts?


Index: mandoc.1
===================================================================
RCS file: /d/cvs/src/usr.bin/mandoc/mandoc.1,v
retrieving revision 1.143
diff -u -p -r1.143 mandoc.1
--- mandoc.1    7 Sep 2017 14:22:58 -0000       1.143
+++ mandoc.1    10 Nov 2017 18:12:57 -0000
@@ -875,7 +875,7 @@ A single manual page contains two copies
 the same operating system.
 Consider deleting the later instance and moving the first one up
 to the top of the page.
-.It Sy "typo in section name"
+.It Sy "possible typo in section name"
 .Pq mdoc
 Fuzzy string matching revealed that the argument of an
 .Ic \&Sh
Index: mandoc.h
===================================================================
RCS file: /d/cvs/src/usr.bin/mandoc/mandoc.h,v
retrieving revision 1.187
diff -u -p -r1.187 mandoc.h
--- mandoc.h    8 Jul 2017 14:51:01 -0000       1.187
+++ mandoc.h    10 Nov 2017 18:12:57 -0000
@@ -58,7 +58,7 @@ enum  mandocerr {
        MANDOCERR_DATE_LEGACY, /* legacy man(7) date format: Dd ... */
        MANDOCERR_TITLE_CASE, /* lower case character in document title */
        MANDOCERR_RCS_REP, /* duplicate RCS id: ... */
-       MANDOCERR_SEC_TYPO,  /* typo in section name: Sh ... */
+       MANDOCERR_SEC_TYPO,  /* possible typo in section name: Sh ... */
        MANDOCERR_ARG_QUOTE, /* unterminated quoted argument */
        MANDOCERR_MACRO_USELESS, /* useless macro: macro */
        MANDOCERR_BX, /* consider using OS macro: macro */
Index: read.c
===================================================================
RCS file: /d/cvs/src/usr.bin/mandoc/read.c,v
retrieving revision 1.164
diff -u -p -r1.164 read.c
--- read.c      20 Jul 2017 14:36:32 -0000      1.164
+++ read.c      10 Nov 2017 18:12:57 -0000
@@ -94,7 +94,7 @@ static        const char * const      mandocerrs[MAN
        "legacy man(7) date format",
        "lower case character in document title",
        "duplicate RCS id",
-       "typo in section name",
+       "possible typo in section name",
        "unterminated quoted argument",
        "useless macro",
        "consider using OS macro",


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to