milos-linux/tools/lib/python/kdoc
Mauro Carvalho Chehab 99ec67a998 docs: kdoc: better handle source when producing YAML output
The current logic was storing symbols source code on a list,
not linked to the actual KdocItem. While this works fine when
kernel-doc markups are OK, on places where there is a "/**"
without a valid kernel-doc markup, it ends that the 1:1 match
between source code and KdocItem doesn't happen, causing
problems to generate the YAML output.

Fix it by storing the source code directly into the KdocItem
structure.

This shouldn't affect performance or memory footprint, except
when --yaml option is used.

While here, add a __repr__() function for KdocItem, as it
helps debugging it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <77902dafabb5c3250486aa2dc1568d5fafa95c5b.1774256269.git.mchehab+huawei@kernel.org>
2026-03-25 13:36:46 -06:00
..
__init__.py
c_lex.py docs: kdoc: add c_lex to generated documentation 2026-03-22 15:10:40 -06:00
enrich_formatter.py docs: kdoc: enrich_formatter: Improve docstrings and comments 2026-01-23 11:37:38 -07:00
kdoc_files.py docs: kdoc: better handle source when producing YAML output 2026-03-25 13:36:46 -06:00
kdoc_item.py docs: kdoc: better handle source when producing YAML output 2026-03-25 13:36:46 -06:00
kdoc_output.py docs: kdoc_output: fix handling of simple tables 2026-03-25 13:36:46 -06:00
kdoc_parser.py docs: kdoc: better handle source when producing YAML output 2026-03-25 13:36:46 -06:00
kdoc_re.py docs: kdoc_re: better represent long regular expressions 2026-03-22 15:10:40 -06:00
kdoc_yaml_file.py docs: kdoc: better handle source when producing YAML output 2026-03-25 13:36:46 -06:00
latex_fonts.py docs: kdoc: latex_fonts: Improve docstrings and comments 2026-01-23 11:37:38 -07:00
parse_data_structs.py docs: kdoc: parse_data_structs: Improve docstrings and comments 2026-01-23 11:37:38 -07:00
python_version.py docs: kdoc: python_version: Improve docstrings and comments 2026-01-23 11:37:38 -07:00
xforms_lists.py docs: xforms_lists: use CMatch for all identifiers 2026-03-22 15:02:29 -06:00