in reply to code analysis graph
I created a static call graph generation script out of desperation, to untangle an undocumented part of a 30,000-line legacy script, in order to implement an urgent bug fix.
It reads the source code(s), uses GraphViz to generate a png, and then displays the image on-screen.
Since it uses simple line-by-line regexes, the formatting must be "sane" so that nesting can be determined (perltidy is useful here if the formatting is in bad shape).
Also, don't expect miracles such as parsing dynamic function calls, BEGIN blocks, etc.
The silver lining of a simple regex engine is that it can easily be extended for other languages.
The tool now supports awk, bash, basic, dart, fortran, go, lua, javascript, kotlin, matlab, pascal, perl, php, python, r, raku, ruby, rust, scala, swift, and tcl.
https://github.com/koknat/callGraph