Skip to content

Detect function return is broken by extlinks module #1660

@pevik

Description

@pevik

Problem

I'm trying to use https://docs.kernel.org/doc-guide/kernel-doc.html#function-documentation

conf.py

extlinks = {
    'man3': ('https://man7.org/linux/man-pages/man3/%s.3.html', '%s(3)'),
}
/**
 * foo() - ... :man3:`system` ...
 * 
 * Return: The :man3:`system` return code.
 */
int foo();

Leads to error: [kernel-doc WARN] : no description found for return-value of function 'foo()'.

Having a comment like Return: The system() return code. works as expected.

Using it in the first line (function signature) it works as expected, see https://linux-test-project.readthedocs.io/en/latest/developers/api_c_tests.html#tst-system.

Reproducible Project

See https://github.com/linux-test-project/ltp/blob/master/include/tst_cmd.h#L106, on a checkaut code is compiled in doc directory.

Result is also online: https://linux-test-project.readthedocs.io/en/latest/developers/api_c_tests.html#tst-system.

Error Logs/Results

[kernel-doc WARN] : no description found for return-value of function 'foo()'

Expected Results

Using it in the first line (function signature) it works as expected, see https://linux-test-project.readthedocs.io/en/latest/developers/api_c_tests.html#tst-system where it works in the first line (function signature).

Environment Info

  • Python Version: locally tested on 3.13.7, but IMHO not python related
  • Sphinx Version: 7.2.6
  • RTD Theme Version: 2.0.0 (but tested it's broken also on the latest 3.0.2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions