Linux kernel stable tree
Go to file
Pierre-Louis Bossart 2c12c8103d scripts/kernel-doc: optionally treat warnings as errors
The 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>
Link: https://lore.kernel.org/r/20200728162040.92467-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-07-31 11:11:17 -06:00
arch docs: move other kAPI documents to core-api 2020-06-26 11:33:42 -06:00
block Kbuild updates for v5.8 (2nd) 2020-06-13 13:29:16 -07:00
certs .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
crypto docs: crypto: convert asymmetric-keys.txt to ReST 2020-06-19 14:03:46 -06:00
Documentation docs: ia64: correct typo 2020-07-31 11:09:09 -06:00
drivers Replace HTTP links with HTTPS ones: LVM 2020-07-05 14:28:27 -06:00
fs Replace HTTP links with HTTPS ones: CIFS 2020-07-05 14:23:38 -06:00
include docs: fix references for DMA*.txt files 2020-06-26 10:01:32 -06:00
init docs: move nommu-mmap.txt to admin-guide and rename to ReST 2020-06-26 11:33:35 -06:00
ipc mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
kernel docs: fix references for DMA*.txt files 2020-06-26 10:01:32 -06:00
lib docs: move remaining stuff under Documentation/*.txt to Documentation/staging 2020-06-19 14:17:05 -06:00
LICENSES LICENSES: Rename other to deprecated 2019-05-03 06:34:32 -06:00
mm docs: move nommu-mmap.txt to admin-guide and rename to ReST 2020-06-26 11:33:35 -06:00
net net: dev: add a missing kernel-doc annotation 2020-06-26 10:00:20 -06:00
samples docs: move remaining stuff under Documentation/*.txt to Documentation/staging 2020-06-19 14:17:05 -06:00
scripts scripts/kernel-doc: optionally treat warnings as errors 2020-07-31 11:11:17 -06:00
security Add additional LSM hooks for SafeSetID 2020-06-14 11:39:31 -07:00
sound Kbuild updates for v5.8 (2nd) 2020-06-13 13:29:16 -07:00
tools selftests/vm/keys: fix a broken reference at protection_keys.c 2020-06-26 10:01:12 -06:00
usr bpfilter: match bit size of bpfilter_umh to that of the kernel 2020-05-17 18:52:01 +09:00
virt MIPS: 2020-06-12 11:05:52 -07:00
.clang-format block: add bio_for_each_bvec_all() 2020-05-25 11:25:24 +02:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore modpost: generate vmlinux.symvers and reuse it for the second modpost 2020-06-06 23:38:12 +09:00
.mailmap mailmap: add entry for <alobakin@marvell.com> 2020-07-31 11:07:42 -06:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS CREDITS: Replace HTTP links with HTTPS ones 2020-07-23 14:53:58 -06:00
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS MAINTAINERS: adjust kprobes.rst entry to new location 2020-07-27 16:22:17 -06:00
Makefile Linux 5.8-rc1 2020-06-14 12:45:04 -07:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.