Sebastien Marie <[email protected]> writes:

> Hi,
>
> With latest commits on mandoc (particulary mdoc_validate.c r1.252), I
> have a problem with mandoc -Tlint regarding Dd macro.
>
> Some days ago, I started to validate the man page of sysclean using
> mandoc -Tlint.
>
> sysclean is a tool designed for OpenBSD, and maintained externally in a
> git repository.
>
> The current preambule for sysclean.8 (in master) is :
>
> .Dd June 18, 2017
> .Dt SYSCLEAN 8
> .Os
>
> According to mdoc(7), there are valids:
>
>    Document preamble and NAME section macros
>      Dd               document date: $Mdocdate$ | month day, year
>      Dt               document title: TITLE section [arch]
>      Os               operating system version: [system [version]]
>
> But mandoc -Tlint complains about missing Mdocdate.
>
> $ mandoc -Tlint sysclean.8
> mandoc: sysclean.8:17:5: STYLE: Mdocdate missing: Dd June

With another project, I get this warning about Dd, plus a message about
a missing RCS Id.

ritchie ~/src/ratpoison$ mandoc -Tlint doc/ratpoison.mdoc.1; echo $?
mandoc: doc/ratpoison.mdoc.1:25:5: STYLE: Mdocdate missing: Dd May
mandoc: doc/ratpoison.mdoc.1: STYLE: RCS id missing
1
ritchie ~/src/ratpoison$ grep Dd doc/ratpoison.mdoc.1
.Dd May 6, 2017

> The current check requires Dd to be in "Mdocdate" format if the Os is
> OpenBSD. It seems to me it doesn't respect the specification, which
> allow Dd to be a plain date (month day, year).
>
> Due to the fact I am not using CVS for this project, I couldn't use
> $Mdocdate$ keyword (and have the date isn't automatically filled).

Same here, ratpoison uses git for version control.

> Alternatively, I could maintain manually Dd as "$Mdocdate: month day year $",
> but it seems a limitation for me, so I prefer reported it.

I can just ignore those STYLE warnings.  Using -Wwarning to get rid of
STYLE warnings would lose quite a useful tips, right?

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

Reply via email to