tm_tag_file_t has never been used by Geany so the check is unnecessary. In the latest version of Geany this tag was renamed to tm_tag_local_var_t and used for local variables which breaks compilation.
Those things that appear as big diffs on github are just unindents after the removed `if` check. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany-plugins/pull/1193
-- Commit Summary --
* geanygendoc: Remove all sanity checks testing if tag is tm_tag_file_t
-- File Changes --
M geanygendoc/src/ggd-tag-utils.c (65) M geanygendoc/src/ggd.c (2)
-- Patch Links --
https://github.com/geany/geany-plugins/pull/1193.patch https://github.com/geany/geany-plugins/pull/1193.diff
@techee pushed 1 commit.
c7e7d12df3746b131ba0f798ce85ea6b54d638d2 geanygendoc: Remove all sanity checks testing if tag is tm_tag_file_t
@techee thanks!!
LGBI
Fixes the CI build
Unless there is communication from @b4n by end of the weekend will commit, it can always be reverted if he wants to do something else.
@techee commented on this pull request.
@@ -274,7 +267,7 @@ static const struct {
{ tm_tag_externvar_t, "extern" }, { tm_tag_macro_t, "define" }, { tm_tag_macro_with_arg_t, "macro" }, - { tm_tag_file_t, "file" } + { tm_tag_local_var_t, "local variable" }
Just noticed that this change depends on the new API with renamed `tm_tag_file_t` to `tm_tag_local_var_t` so we should require that API version (and also bump API version in Geany which we didn't do).
Alternatively, and this might be a better solution, we could just remove this line. If I understand correctly the purpose of this plugin, it serves for generating documentation stubs for symbols at the top level and local variables aren't interesting for it. I checked if something in the plugin doesn't rely on the exact size of this array but this array is only accessed from `ggd_tag_type_get_name()` and `ggd_tag_type_from_name()` below and they use the real size of the array.
@elextr commented on this pull request.
@@ -274,7 +267,7 @@ static const struct {
{ tm_tag_externvar_t, "extern" }, { tm_tag_macro_t, "define" }, { tm_tag_macro_with_arg_t, "macro" }, - { tm_tag_file_t, "file" } + { tm_tag_local_var_t, "local variable" }
If its not used then there seems no point in leaving it in the array and then the plugin is API agnostic.
@techee commented on this pull request.
@@ -274,7 +267,7 @@ static const struct {
{ tm_tag_externvar_t, "extern" }, { tm_tag_macro_t, "define" }, { tm_tag_macro_with_arg_t, "macro" }, - { tm_tag_file_t, "file" } + { tm_tag_local_var_t, "local variable" }
`tm_tag_file_t` isn't used but `tm_tag_local_var_t` to which we renamed it is now. But I think `tm_tag_local_var_t` isn't interesting for the plugin so it doesn't have to be listed here (so we don't have to depend on a new Geany API version).
@elextr commented on this pull request.
@@ -274,7 +267,7 @@ static const struct {
{ tm_tag_externvar_t, "extern" }, { tm_tag_macro_t, "define" }, { tm_tag_macro_with_arg_t, "macro" }, - { tm_tag_file_t, "file" } + { tm_tag_local_var_t, "local variable" }
Agree, I meant "not used by the plugin".
@techee pushed 1 commit.
45f8ed427a69a0637bbf6efe41892b26288e4efa geanygendoc: Remove all sanity checks testing if tag is tm_tag_file_t
@techee commented on this pull request.
@@ -274,7 +267,7 @@ static const struct {
{ tm_tag_externvar_t, "extern" }, { tm_tag_macro_t, "define" }, { tm_tag_macro_with_arg_t, "macro" }, - { tm_tag_file_t, "file" } + { tm_tag_local_var_t, "local variable" }
Repushed with this line removed.
Looks good, also your reasoning!
Those things that appear as big diffs on github are just unindents after the removed `if` check.
Just in case someone didn't know: on the "Files" tab there is settings icon and when clicking on it, you'll get an option "Hide whitespace". This makes the diff a bit easier to read.
Just in case someone didn't know:
on the "Files" tab there is settings icon and when clicking on it, you'll get an option "Hide whitespace". This makes the diff a bit easier to read.
Ahh, that someone happened to be me :-). Thanks for the tip.
Merged #1193 into master.
github-comments@lists.geany.org