From: Jonathan Corbet <corbet@lwn.net>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH v2] scripts/kernel-doc: optionally treat warnings as errors
Date: Fri, 31 Jul 2020 11:16:59 -0600 [thread overview]
Message-ID: <20200731111659.3cfe5d23@lwn.net> (raw)
In-Reply-To: <20200728162040.92467-1-pierre-louis.bossart@linux.intel.com>
On Tue, 28 Jul 2020 11:20:40 -0500
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> wrote:
> he kbuild bot recently added the W=1 option, which triggered
> documentation cleanups to squelch hundreds of kernel-doc warnings.
>
> To make sure new kernel contributions don't add regressions to
> kernel-doc descriptors, this patch suggests an option to treat
> warnings as errors in CI/automated tests.
>
> A -Werror command-line option is added to the kernel-doc script. When
> this option is set, the script will return the number of warnings
> found. The caller can then treat this positive return value as an
> error and stop the build.
>
> Using this command line option is however not straightforward when the
> kernel-doc script is called from other scripts. To align with typical
> kernel compilation or documentation generation, the Werror option is
> also set by checking the KCFLAGS environment variable, or if
> KDOC_WERROR is defined, as in the following examples:
>
> KCFLAGS="-Wall -Werror" make W=1 sound/
> KCFLAGS="-Wall -Werror" make W=1 drivers/soundwire/
> KDOC_WERROR=1 make htmldocs
>
> Note that in the last example the documentation build does not stop,
> only an additional log is provided.
>
> Credits to Randy Dunlap for suggesting the use of environment variables.
>
> Suggested-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Applied, thanks.
jon
prev parent reply other threads:[~2020-07-31 17:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-28 16:20 Pierre-Louis Bossart
2020-07-31 17:16 ` Jonathan Corbet [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200731111659.3cfe5d23@lwn.net \
--to=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=rdunlap@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®