Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Tue, 21 Nov 2023 13:50:25 UTC Commit: 3af0bf5117a1143b20286f5ee9fb0a2c35916d6b https://github.com/geany/geany-plugins/commit/3af0bf5117a1143b20286f5ee9fb0a...
Log Message: ----------- geanygendoc: Add support for local variables
Since Geany 2.0 a lot of those are reported for several languages, including C. Those should usually not be documented, but their parent should be instead, otherwise they "get in the way" of triggering documentation of their parent.
Add support for the "local" match rule for local variables, and update the default rules to use the FORWARD policy for them. It's not actually the parent documenting the child, but the effect is the same as the user probably wanted to document the parent rather than the local.
Modified Paths: -------------- geanygendoc/data/filetypes/c.conf geanygendoc/docs/manual.rst geanygendoc/src/ggd-tag-utils.c
Modified: geanygendoc/data/filetypes/c.conf 5 lines changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -41,6 +41,8 @@ doctypes = { struct.prototype.policy = FORWARD; member.policy = FORWARD; enumval.policy = FORWARD; + # usually, locals are just not documented and get in the way + local.policy = FORWARD;
function = { template = "/**\n * {symbol}:\n{for arg in argument_list} * @{arg}: {cursor}\n{end} * \n * {cursor}\n{if returns} * \n * Returns: \n{end}{if write_since}{if returns} * \n{end} * Since: \n{end} */\n"; @@ -73,6 +75,9 @@ doctypes = { }
doxygen = { + # usually, locals are just not documented and get in the way + local.policy = FORWARD; + function.template = "/**\n * {doxygen_prefix}brief {cursor}\n{for a in argument_list} * {doxygen_prefix}param {a} \n{end}{if returns} * {doxygen_prefix}returns \n{end}{if write_since} * {doxygen_prefix}since \n{end} * \n * \n */\n"; macro.template = "/**\n * {doxygen_prefix}brief {cursor}\n{for a in argument_list} * {doxygen_prefix}param {a} \n{end}{if returns} * {doxygen_prefix}returns \n{end}{if write_since} * {doxygen_prefix}since \n{end} * \n * \n */\n"; struct.member = {
Modified: geanygendoc/docs/manual.rst 2 lines changed, 2 insertions(+), 0 deletions(-) =================================================================== @@ -348,6 +348,8 @@ Known types A function. ``interface`` An interface. +``local`` + A local variable. ``member`` A member (of a structure for example). ``method``
Modified: geanygendoc/src/ggd-tag-utils.c 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -255,6 +255,7 @@ static const struct { { tm_tag_field_t, "field" }, { tm_tag_function_t, "function" }, { tm_tag_interface_t, "interface" }, + { tm_tag_local_var_t, "local" }, { tm_tag_member_t, "member" }, { tm_tag_method_t, "method" }, { tm_tag_namespace_t, "namespace" },
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).