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

Support dynamic parameters #77

Closed AutonomicPerfectionist closed 2 years ago

AutonomicPerfectionist commented 2 years ago

Description Adds support to CMinx to document dynamically generated function and macro parameter names. For example:

set(MyFunctionParamName "Name_Of_A_Param")

#[[[
# This is a documented function, but the first parameter name
# is dynamically assigned.
#]]
function("function_with_var_param_name" "${MyFunctionParamName}")
endfunction()

The above will now be documented as the following RST:

.. function:: "function_with_var_param_name"("${MyFunctionParamName}")

   This is a documented function, but the first parameter name
   is dynamically assigned.

This has been verified to work with Sphinx version 4.5.0 with the default theme

codecov[bot] commented 2 years ago

Codecov Report

Merging #77 (ecb6f61) into master (6b8b9c3) will increase coverage by 0.08%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
+ Coverage   95.32%   95.40%   +0.08%     
==========================================
  Files           5        5              
  Lines         663      675      +12     
==========================================
+ Hits          632      644      +12     
  Misses         31       31              
Flag Coverage Δ
unittests 95.40% <100.00%> (+0.08%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cminx/parser/aggregator.py 92.88% <100.00%> (+0.37%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6b8b9c3...ecb6f61. Read the comment docs.