docurium icon indicating copy to clipboard operation
docurium copied to clipboard

Automatic group detection is incomplete

Open fsaintjacques opened this issue 9 years ago • 3 comments

See the libtwiddle documentation, there should be 2 distinct group called bitmap and bitmap_rle, yet they get merged into bitmap. I believe the following code makes a bold assumption where the first word splited by _ is the group name.

Would there be a way to specify the group which a function lives in? For example, in libgit2, we can see the following header in most files.

Some suggestions

  • Use a special comment in each function, say @group
  • Have the user provide a list of groups in the config file and bind a function to the longest prefix matching group in the list

fsaintjacques avatar May 09 '16 13:05 fsaintjacques

I got the same problem. I changed the naming of my functions which with rather OK in my case. The second suggestion, i.e. provide exceptions for group names in the config file, should be rather straightforward to implement, changing only docurium.rb hopefully?

niess avatar May 10 '16 07:05 niess

I would see the provided group list as the norm, and then resorting to the split trick if it doesn't match anything. This wouldn't break libgit2 current behaviour if the don't provide groups in the JSON configuration.

fsaintjacques avatar May 10 '16 11:05 fsaintjacques

Those whole-file comments in libgit2 are left-over from doxygen. docurium currently uses the clang parser, which means those aren't recorded anywhere (and the same goes for macros, unfortunately).

Having the group explicitly in the docs would be a way to solve this. We likely won't use this in libgit2 though since we have the same general policy of using underscores to namespace. So there is no incentive for me to write this feature.

carlosmn avatar May 19 '16 10:05 carlosmn