groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: All caps .TH page title


From: Alejandro Colomar
Subject: Re: All caps .TH page title
Date: Tue, 2 Aug 2022 11:55:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.1.0

Hi Bjarni,

On 8/2/22 02:13, Bjarni Ingi Gislason wrote:

   It is simpler to use a filter, like

#!/bin/dash

mandoc -T lint $* | sed -e '/cannot parse date, using it verbatim:/d' \
-e '/empty block: UR$/d' \
-e '/: \.so is fragile, better use ln/,+3 d' \
-e '/: ignoring macro in table: /d' \
-e '/: invalid escape sequence: /d' \
-e '/: lower case character in document title: /d' \
-e '/: unsupported roff request: /d' \
-e '/: missing date, using today/d' \
-e '/: line scope broken: BR breaks SM/d' | \
   sort -t: -k3n,3n

Yes, filtering out the unwanted text is trivial.

The thing is that I'm running mandoc(1) from a Makefile, which means that not only stdout/stderr is important, but also the exit status. There's no trivial way to ignore mandoc(1)'s error code for certain warnings. Also, I run it for a few thousands of manual pages, so I don't want make(1) to stop at every page that triggers an unwanted warning. But I do want make(1) to stop at errors/warnings in general.

<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/lib/lint-man.mk#n54>

I can still run something like what I ran yesterday to have an overview of the warnings:

$ make -i lint-man-mandoc \
  | grep -v UNSUPP.*ignoring.macro.in.table

But that's not ideal, because I want make(1) to stop at errors.


Cheers,

Alex

--
Alejandro Colomar
<http://www.alejandro-colomar.es/>

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]