zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.6k stars 6.49k forks source link

Improve API headers documentation #30466

Open gmarull opened 3 years ago

gmarull commented 3 years ago

Is your enhancement proposal related to a problem? Please describe.

Driver API headers, i.e. include/drivers/*.h files, have slight differences when it comes to Doxygen docstrings:

In my opinion one of the key points of high-quality code is homogeneity when it comes to coding conventions, including docstrings.

Describe the solution you'd like

Describe alternatives you've considered

N/A

Additional context

N/A

gmarull commented 3 years ago

cc: @carlescufi @nashif

carlescufi commented 3 years ago

cc: @carlescufi @nashif

Thanks for raising this. I think we should do this in the context of the "Guidelines" rework that we've started discussing in the API meetings. First come up with a standardized set of guidelines and then go through the APIs to enforce them. This of course would include the doxygen and style inconsistencies that you refer to.

nashif commented 2 years ago

same #17616

nashif commented 2 years ago

related https://github.com/zephyrproject-rtos/zephyr/issues/6781

nashif commented 2 years ago

same https://github.com/zephyrproject-rtos/zephyr/issues/6810

martinjaeger commented 2 years ago

@carlescufi I suggest to put this on the agenda of next API meeting if possible. I'm happy to support cleaning up some header files once we have decided on a strategy.

Even if we can't immediately come up with a complete "Guideline", just being clear about the point whether internal driver APIs should be exposed in the docs would be very useful already. (in my opinion they should not)

carlescufi commented 2 years ago

API meeting:

Use can.h as a reference, @henrikbrixandersen to update it according to the

Draft guidelines for Doxygen usage:

henrikbrixandersen commented 2 years ago

44162 removes the @typedef Doxygen commands from the CAN API documentation.