-
Notifications
You must be signed in to change notification settings - Fork 24
Ability to exclude symbols/namespaces by regex match #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We will look at adding this. One potential problem with this feature is that regexes are computationally expensive and checking if every symbol matches a regex is likely going to add a noticeable performance hit. Would just a simple substring match work well enough for your usecase? It's not as flexible, but it carries significantly lower computational costs. Thank you for supplying the configuration file example, that is a concise way of adding that option to the file, and if we adopt this feature we will likely use the same/similar syntax. Naming things is hard and your example makes it way easier :) |
Substring matching would probably be fine, I just think that eventually it becomes a limitation for some edge case. My intuition would be that regular expressions would be plenty fast (unless someone tries to intentionally construct a slow one) even on a large project like LLVM — slow to compile, maybe, but fast to execute once compiled. Haven’t tried it though! |
We'll do some testing interally to determine the performance impact. Sadly the C++ regex library has a reputation for being very slow so I'm hoping it doesn't nuke performance. |
I think, like the example above, regex wouldn't be needed. Mostly you want to exclude a specific namespaces (detail/internal) or maybe annotate the code section to be explicit excluded (@Private in doxygen). But I am also looking forward this feature! |
I was going to request an annotation to omit a given thing from documentation, I'd be happy with doing this in the code itself, kinda like https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html but in a comment rather than an attribute. |
Feature request: I would like to be able to exclude certain symbols, or symbols under certain namespaces, from the documentation and search index.
This is one of the only remaining things I have to maintain in a patch: https://github.com/foxglove/mcap/blob/a85bd00295255b134f3083efbc5d2274294a83df/cpp/hdoc.patch
It would be great to specify an exclusion pattern in the config file, preferably using regular expressions for maximum flexibility. As an example:
The text was updated successfully, but these errors were encountered: