mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 10:29:52 +00:00
scripts/kernel-doc.py: Properly handle Werror and exit codes
The original kernel-doc script has a logic to return warnings as errors, and to report the number of warnings found, if in verbose mode. Implement it to be fully compatible with the original script. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/de33b0cebd9fdf82d8b221bcfe41db7269286222.1744106242.git.mchehab+huawei@kernel.org
This commit is contained in:
committed by
Jonathan Corbet
parent
e4b2bd908c
commit
11afeab6d7
@@ -128,11 +128,9 @@ class OutputFormat:
|
||||
|
||||
warnings = args.get('warnings', [])
|
||||
|
||||
for warning, log_msg in warnings:
|
||||
if warning:
|
||||
self.config.log.warning(log_msg)
|
||||
else:
|
||||
self.config.log.info(log_msg)
|
||||
for log_msg in warnings:
|
||||
self.config.log.warning(log_msg)
|
||||
self.config.errors += 1
|
||||
|
||||
def check_doc(self, name, args):
|
||||
"""Check if DOC should be output"""
|
||||
|
||||
Reference in New Issue
Block a user