Yoyaku's docs/metrics.md is a generated snapshot of the codebase, but the generator that produces it is not in the repository, so the page can only be refreshed by hand and drifts from the code.
This adds scripts/generate-metrics.php, ported from the Orchestra module's generator and adapted to Yoyaku, and regenerates docs/metrics.md from it. The script reads cloc per-file JSON on standard input and writes the prose, tables and inline SVG charts, so nothing on the page is hand-maintained. Run it from the module root:
cloc --exclude-dir=node_modules --by-file --json --quiet . | php scripts/generate-metrics.php
Issue fork yoyaku-3611633
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mably commentedOpened MR !36. It adds scripts/generate-metrics.php (ported from the Orchestra module generator, adapted to Yoyaku) and regenerates docs/metrics.md from it, so the metrics page is generated rather than hand-maintained.
Comment #5
mably commented