Hi Edd,

Edd Barrett wrote on Sun, Jul 02, 2017 at 05:12:15PM +0100:

>  * mandoc linter is unhappy with the man page:
> 
>    $ mandoc -Tlint /usr/local/man/man1/lein.1 
>    mandoc: /usr/local/man/man1/lein.1:2:17: WARNING: cannot parse date, using 
> it verbatim: 2011 June 30
> 
>    Consider pathcing?

No, most definitely not!

Do not patch ports manuals except to prevent very badly broken
formatting or serious information loss, and even in those cases,
only if the problem also occurs with groff.

In the very unusual case that a mere WARNING from mandoc causes
unintelligible rendering or information loss, that's a bug in mandoc,
and then we want to patch mandoc to either format properly or at
least issue an ERROR rather than a WARNING, before even considering
to patch the port.

In this case, the string renders as "2011 June 30" (as the message
says), and that is perfectly understandable for humans.  Now that
we have the STYLE message level, i will probably downgrade this
particular message from WARNING to STYLE soon.

In the base system, we have unusually high standards for code
cleanness (because that helps developers when doing maintenance)
und uniformity of presentation (because that helps users).  So in
the base system, the number of WARNINGs is low and we try to fix
as many of them as is reasonable.  But in non-OpenBSD software, you
will have a hard time to find *anything* that does not trigger at
least a few WARNINGs.

For routine checking of a port, unless you are planning to help
upstream to get their manuals up to OpenBSD base system quality
standards, it is completely sufficient to run

  mandoc -Tlint -Werror

Even if a ports page throws ERRORs, that usually doesn't require
patching the port, but in that case, it is useful to check that
none of the ERRORs cause broken formatting or information loss.
While all ERRORs carry a potential risk of causing such damage, in
practice, only a minority of them actually does cause such damage.
If you find that kind of damage, then helping upstream to get it
fixed is definitely useful.

For more information, see

  https://www.openbsd.org/faq/ports/specialtopics.html#Mandoc

Yours,
  Ingo

Reply via email to