qemu-cr16/scripts/qapi
Vladimir Sementsov-Ogievskiy 8107ba47fd qapi: Add documentation format validation
Add explicit validation for QAPI documentation formatting rules:

1. Lines must not exceed 70 columns in width (including '# ' prefix)
2. Sentences must be separated by two spaces

Example sections and literal :: blocks (seldom case) are excluded, we
don't require them to be <= 70, that would be too restrictive. Anyway,
they share common 80-columns recommendations (not requirements).

Add two simple tests, illustrating the change.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-ID: <20251031183129.246814-1-vsementsov@yandex-team.ru>

The detection of example and literal blocks isn't quite correct, but
it works well enough, and we can improve on top.

Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Comments, error messages, and test file names tweaked]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2025-11-04 13:55:27 +01:00
..
__init__.py
backend.py qapi: Add some pylint ignores 2025-06-05 12:08:53 -04:00
commands.py qapi/command: Avoid generating unused qmp_marshal_output_T() 2025-11-04 13:34:20 +01:00
common.py qapi: Smarter camel_to_upper() to reduce need for 'prefix' 2024-09-10 13:22:47 +02:00
error.py treewide: remove unnessary "coding" header 2025-10-01 11:22:07 -04:00
events.py qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
expr.py treewide: remove unnessary "coding" header 2025-10-01 11:22:07 -04:00
features.py qapi: expose all schema features to code 2025-02-10 15:45:04 +01:00
gen.py treewide: remove unnessary "coding" header 2025-10-01 11:22:07 -04:00
introspect.py qapi/introspect: Use @dataclass to simplify 2025-03-06 10:09:25 +01:00
main.py scripts/qapi/backend: Clean up create_backend()'s failure mode 2025-03-11 10:26:52 +01:00
parser.py qapi: Add documentation format validation 2025-11-04 13:55:27 +01:00
pylintrc python: add qapi static analysis tests 2025-06-05 12:09:43 -04:00
schema.py treewide: remove unnessary "coding" header 2025-10-01 11:22:07 -04:00
source.py qapi/source: allow multi-line QAPISourceInfo advancing 2025-03-11 10:10:57 +01:00
types.py qapi: expose all schema features to code 2025-02-10 15:45:04 +01:00
visit.py qapi: expose all schema features to code 2025-02-10 15:45:04 +01:00