86cba21743
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> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201117165312.118257-11-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
---|---|---|
.. | ||
ci | ||
coccinelle | ||
codeconverter | ||
coverity-scan | ||
kvm | ||
modules | ||
oss-fuzz | ||
performance | ||
qapi | ||
qemu-guest-agent | ||
qemugdb | ||
qmp | ||
simplebench | ||
tracetool | ||
travis | ||
analyse-9p-simpletrace.py | ||
analyse-locks-simpletrace.py | ||
analyze-inclusions | ||
analyze-migration.py | ||
archive-source.sh | ||
block-coroutine-wrapper.py | ||
check_sparse.py | ||
checkpatch.pl | ||
clean-header-guards.pl | ||
clean-includes | ||
cleanup-trace-events.pl | ||
cocci-macro-file.h | ||
coverity-model.c | ||
decodetree.py | ||
device-crash-test | ||
disas-objdump.pl | ||
dump-guest-memory.py | ||
extract-vsssdk-headers | ||
feature_to_c.sh | ||
fix-multiline-comments.sh | ||
gensyscalls.sh | ||
get_maintainer.pl | ||
git-submodule.sh | ||
git.orderfile | ||
hxtool | ||
hxtool-conv.pl | ||
kernel-doc | ||
make-release | ||
meson.build | ||
minikconf.py | ||
mtest2make.py | ||
nsis.py | ||
qapi-gen.py | ||
qemu-binfmt-conf.sh | ||
qemu-gdb.py | ||
qemu-trace-stap | ||
qemu-version.sh | ||
refresh-pxe-roms.sh | ||
render_block_graph.py | ||
replay-dump.py | ||
shaderinclude.pl | ||
show-fixed-bugs.sh | ||
signrom.py | ||
simpletrace.py | ||
switch-timer-api | ||
tap-driver.pl | ||
tap-merge.pl | ||
test-driver.py | ||
tracetool.py | ||
u2f-setup-gen.py | ||
undefsym.py | ||
update-linux-headers.sh | ||
update-mips-syscall-args.sh | ||
update-syscalltbl.sh | ||
vmstate-static-checker.py |