Repository navigation
Description
Summary
While resolving the c tri-comparison ledger backlog (#1876), found CTAGS_CLASS_KINDS["c"] was struct-only when GitGalaxy's own C class_start regex covers struct|union|enum -- fixed by adding g/u (enum/union) kinds.
tests/tools/ctags_reader.py's CTAGS_CLASS_KINDS["cpp"] has the same shape of gap, unfixed:
"cpp": {"c", "s"}, # class, structGitGalaxy's own C++ class_start regex (gitgalaxy/standards/language_standards.py:3186-3191) matches class|struct|union|enum class|enum struct -- union is real, matched syntax GitGalaxy detects, but ctags' u (union) kind isn't in the map. Confirmed ctags --list-kinds-full=C++ has a real u union kind, same as C's.
Nuance -- NOT a copy-paste of the C fix
Unlike C's plain enum, GitGalaxy's C++ regex only matches scoped enums (enum class Foo/enum struct Foo), not a bare enum Foo { ... }. ctags' g (enum) kind almost certainly doesn't distinguish scoped from unscoped -- naively adding "g" the way C's fix added it could introduce a NEW mismatch (ctags counting plain enums GitGalaxy correctly excludes) rather than fix one. This needs verification against real C++ corpus data (does language-crucible/data/cpp/ have real union declarations currently missing from the tri-comparison? does it have plain-vs-scoped enums to check the "g" kind against?) before deciding whether "g" belongs in the map at all.
Suggested scope
- Add
"u"toCTAGS_CLASS_KINDS["cpp"]-- low-risk, matches the confirmed-safe C precedent exactly. - Investigate (don't assume) whether
"g"should also be added, and if so, whether it needs a scoped-vs-unscoped filter analogous to how_get_node_name/similar per-language special-casing already exists elsewhere in this codebase.
Scope note
Same category as the C fix -- this is test-harness/tri-comparison-tooling accuracy (tests/tools/ctags_reader.py), not GitGalaxy's own engine or a risk-scoring concern.
🤖 Found while capstone-reviewing the c language sweep, tri-comparison-ledger-sweep skill
Activity
Add capstone step: write up a language once its backlog clears (#1878)
squid-protocol commentedon Aug 22, 2026
Fixed as part of a broader tri-comparison-ledger-sweep on cpp (2026-08-21), landed in PR #2015.
CTAGS_CLASS_KINDS["cpp"]is now{"c", "s", "u", "g"}(class, struct, union, enum).Your predicted nuance was exactly right: "g" (enum) needed the scoped-vs-unscoped guard, since ctags' "g" kind doesn't distinguish
enum class Foo/enum struct Foo(which GitGalaxy's own class_start regex counts) from a plainenum Foo {}(which it doesn't). Implemented as_is_cpp_unscoped_enumintests/tools/ctags_reader.py— checks the tag's own verbatim matched source line for a scoped-enum keyword before admitting it, gated per-tag rather than blanket-adding the kind.Confirmed via real corpus data:
godot/node.h'sunion MTFlag/MTNumericandgodot/object.h'senum class AncestralClass(plus several sibling scoped enums acrosspowertoys/FancyZones.cpp/mlir/flatbuffer_export.cc) were all previously invisible to ctags in the tri-comparison and are now correctly matched.