Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: kdoc: move the return values to the helper message

It makes sense to describe what kernel-doc is expected to return
on its help message. Move such messages to argparse epilog.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <3bcfa48016770929fcd073376515e3ff0b777ea8.1768823489.git.mchehab+huawei@kernel.org>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
32e9a424 eba6ffd1

+15 -12
+15 -12
tools/docs/kernel-doc
··· 166 166 neither here nor at the original Perl script. 167 167 """ 168 168 169 + EPILOG = """ 170 + The return value is: 171 + 172 + - 0: success or Python version is not compatible with 173 + kernel-doc. If -Werror is not used, it will also 174 + return 0 if there are issues at kernel-doc markups; 175 + 176 + - 1: an abnormal condition happened; 177 + 178 + - 2: argparse issued an error; 179 + 180 + - 3: When -Werror is used, it means that one or more unfiltered parse 181 + warnings happened. 182 + """ 169 183 170 184 class MsgFormatter(logging.Formatter): 171 185 """Helper class to format warnings in a similar way to kernel-doc.pl.""" ··· 192 178 """ 193 179 Main program. 194 180 195 - By default, the return value is: 196 - 197 - - 0: success or Python version is not compatible with 198 - kernel-doc. If -Werror is not used, it will also 199 - return 0 if there are issues at kernel-doc markups; 200 - 201 - - 1: an abnormal condition happened; 202 - 203 - - 2: argparse issued an error; 204 - 205 - - 3: -Werror is used, and one or more unfiltered parse warnings happened. 206 181 """ 207 182 208 183 parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, 209 - description=DESC) 184 + description=DESC, epilog=EPILOG) 210 185 211 186 # 212 187 # Normal arguments