MSohm
(Mark Sohm)
1
Hi,
I see that @_documentation(visibility: ...) is available and I have it working for swift source files when using DocC.
My question is how to do the same thing for .c/.h source? I haven't been able to find a way to exclude methods or variables in c code from the documentation DocC creates. I'd also be fine with excluding c header files entirely from DocC.
Is this available? If so, how could it be done?
I know renaming methods and variables to start with an underscore will work, but for this project would mean modifying a large chunk of open source code. So I'm hoping to use tags instead.
birdwell
(Josh Birdwell)
2
@MSohm did you ever find a solution for opting out .c / .h sources?
if you want to exclude c headers, could you simply skip doc generation for the c language targets entirely?
birdwell
(Josh Birdwell)
4
How would you specify to the doc generation to skip targets?
MSohm
(Mark Sohm)
5
If a function or member name in a .c or .h file starts with an underscore it's not included in the docs. So I renamed everything to accommodate this.
birdwell
(Josh Birdwell)
6
@MSohm we have a thirty-party dependency that is in our libraries folder. That is an objc library that references a c++ class. It has many .h and .m. I'd love to ignore the whole libraries folder or ignore that thirty-party dependency as a whole.
Here is the error upon attempting to build the documentation. That is the first of many c++ files. I'm sure it would fail on others once that one was amended.