CMakePP / CMinx

Generates API documentation for CMake functions and macros
https://cmakepp.github.io/CMinx/
Apache License 2.0
14 stars 5 forks source link

Add `:cminx: no-doc` directive #159

Closed JackNoordhuis closed 2 months ago

JackNoordhuis commented 2 months ago

Is this pull request associated with an issue(s)? There are no issues associated with these changes. The changes are proposed as a feature addition for consideration by maintainers.

Description Intended to be used with configuration options: include_undocumented_function: true include_undocumented_macro: true CMake files may contain internal methods/macros that should not appear in end-user documentation, but not all end-user methods/macros contain explicit documentation (yet? – aim to ease adoption.)

The use case that inspired these changes comes from an internal CMake module where steps of a large function are broken into smaller macros. The chosen approach allows all documentation comments to remain consistent by respecting a declaration that tells CMinx it should not generate documentation for a certain construct. An alternate approach would be similar to existing configuration options. A regex could be supplied to match a prefix, conveying meaning to CMinx that documentation should not be generated for matching constructs. In contrast to jumping through external files and mentally parsing regex expressions – an explicit directive conveys meaning directly in the source code for maintainers working on the affected code.

Summary of changes

CLAassistant commented 2 months ago

CLA assistant check
All committers have signed the CLA.

ryanmrichard commented 2 months ago

@JackNoordhuis Thanks for the contribution. Unfortunately, I'm pretty busy at the moment so I probably won't have a chance to look at this until maybe Friday or early next week.

@AutonomicPerfectionist I know you've moved on to other things, but if you have a couple cycles I would love some help reviewing this. If you don't have the time, no worries.

AutonomicPerfectionist commented 2 months ago

@ryanmrichard yep I can take a quick look in a bit

ryanmrichard commented 2 months ago

Converted this PR to issue #160