dstroy0 / InputHandler

Arduino input handler
https://dstroy0.github.io/InputHandler/
GNU General Public License v3.0
1 stars 0 forks source link

breathe .. doxygenvariable:: directive and PROGMEM issue #56

Closed dstroy0 closed 1 year ago

dstroy0 commented 1 year ago

Using the directive on valid C++11 variable declaration statements that contain the PROGMEM macro throws an invalid C++ warning because it does not find the end of the statement. Looking for a workaround, tried moving the PROGMEM macro to after var type with same results.

2bndy5 commented 1 year ago

I often use a predefined macro to force documentation to show for non-x86[_64] platforms (like Arduino).

PREDEFINED             = DOXYGEN_FORCED

then I can force things to show in the docs with

#if defined(ARDUINO) || defined(DOXYGEN_FORCED)
    /** some docs */
    void func_for_arduino();
#endif
dstroy0 commented 1 year ago

Ok, it's not just PROGMEM it's any var with an attribute. That tells me something is not correct in the Doxyfile probably.

2bndy5 commented 1 year ago

sounds like a preprocessing problem on behalf of doxygen. Doxygen has some detailed explanations in their manual: https://www.doxygen.nl/manual/preprocessing.html

dstroy0 commented 1 year ago

It was a few things.

  1. doxygen thought it was inside of a group still at the end of the document because it picked up comments it shouldn't have.
  2. using @name inside of a group freaks out doxygen.
  3. the predefined syntax is very particular, and I had to have expand macros set to true.
2bndy5 commented 1 year ago

Yeah, grouping in Doxygen is without a doubt one of the worst implementations it has (second only to the archaic HTML output).

dstroy0 commented 1 year ago

It looks like I only have to keep the namespace in a group so I will go through the codebase, remove all of the groups except that one, do docs build regression testing and then close this issue if it checks out.

dstroy0 commented 1 year ago

Everything looks good, I was able to pull the namespace out and use the @namespace Doxygen directive, and pull it out with breathe's doxygennamespace directive.