Hi Ted,

Ted Unangst wrote on Wed, Jun 21, 2017 at 08:48:48PM -0400:
> Ingo Schwarze wrote:

>> As there is no fully satisfactory option, i propose the patch below.
>> It add the "-W portable" command line option, which is a variant of
>> "-W style" hiding messages that only apply to base system manuals.

> I'm not fond of the name portable.  To me, this suggests it will check
> for things which impede portability, but that's not really what it does.

True.  That might indeed cause misunderstandings.

> Instead, I suggest shifting the names by one.  Leave -W style as the
> portable option, but introduce -W openbsd which performs the additional
> checks.  Or better, name it -W system, so as to be useful on netbsd, etc.

That's a fine idea!  I'll send a revised patch tomorrow.

Actually, i prefer calling the option -W openbsd.

In cases where you have to specify the option, -W openbsd is not
harder to type than -W system, and clearer.  It also saves you
the additional work of having to type -Ios=OpenBSD in cases where
that would be needed.  And it has the additional benefit of allowing
to explicitly request OpenBSD-specific checks even on manuals that
contain bogus .Os arguments.

In cases where you don't specify -W but only -Tlint, the system
can be picked from .Os, -Ios=, or uname(3) just like it is now.

And developers maintaining portable software can simply use
mandoc -Tlint -Wstyle to check their own manuals.  That's a nice
and clear name.

> I think this matches the actual hierarchy in practice. There's errors
> and warnings at the top.  Then there's general style warnings.
> Then below that there's the local system specific style guidelines.
> It's a matter of perspective, but the portable warnings aren't subset
> of style, rather the system warnings are a superset of style.

Makes sense.

Thanks,
  Ingo

Reply via email to