util/find-doc-nits: read full declarations as one line in name_synopsis()
authorRichard Levitte <levitte@openssl.org>
Wed, 15 Jul 2020 06:33:08 +0000 (08:33 +0200)
committerRichard Levitte <levitte@openssl.org>
Sun, 19 Jul 2020 16:45:30 +0000 (18:45 +0200)
commitd3cb5904f3ca62f23c95248f951477d322159bbb
tree7ce57fe9b75a44a439179c9022d1baef5353ffc0
parent43b3ab6f872ef64622d98ab0e3c88e312453c089
util/find-doc-nits: read full declarations as one line in name_synopsis()

name_synopsis was reading physical SYNOPSIS lines.  This changes it to
consider a declaration at a time, so we treat a C declaration that's
been broken up in several lines as one.

This makes it mandatory to end all C declarations in the SYNOPSIS with
a semicolon.  Those can be detected in two ways:

1.  Parsing an individual .pod file outputs this error:

    doc/man3/SOMETHING.pod:1: Can't parse rest of synopsis:

     int SOMETHING_status(SOMETHING *s)
     int SOMETHING_start(SOMETHING *s)

    (declarations not ending with a semicolon (;)?)

2.  Errors like this:

    doc/man3/SOMETHING.pod:1: SOMETHING_status missing from SYNOPSIS
    doc/man3/SOMETHING.pod:1: SOMETHING_start missing from SYNOPSIS

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12452)
util/find-doc-nits