metric-gardener import creates flat file hierarchy
Bug
Running ccsh metricgardenerimport on an existing metric-gardener JSON file produces a CodeCharta file with none of the file structure preserved — all files are shown as direct children of the root node.
This prevents these files from being usable for analysis.
Steps to Reproduce the Problem
This is reproducible using the metric-gardener repo:
metric-gardener parse . -o /tmp/mg.json --relative-paths
ccsh metricgardenerimport --is-json-file /tmp/mg.json -o /tmp/mg.cc.json
ccsh modify -p 2 /tmp/mg.cc.json.gz | less
Note that no 2nd level children are printed.
Specifications
/tmp » ccsh --version
CodeCharta ccsh
version "1.127.0"
Copyright(c) 2024, MaibornWolff GmbH
Thank you for your report. MetricGardner is right now still in experimental use and we don't have anyone in the MG team right now working on it, which should change in a couple of weeks. 👍
now after a couple of months, we decided to migrate the treesitter approach that is part of MetricGardener to CodeCharta. I will close this issue as we are now actively working on counting metrics via treesitter.