scottrogowski / code2flow

Pretty good call graphs for dynamic languages
MIT License
3.98k stars 295 forks source link

Can I edit the call graph? #84

Closed SJaffa closed 1 year ago

SJaffa commented 1 year ago

I am working with a big mess of Python code that used a lot of async functions and locks so in the call graph many functions show up as calling only the locked_exec and not the function they are actually calling, and those functions in turn appear to be called by nothing. Is there a way to get code2flow to output it's results as a dot file and I can manually reconnect those missed function calls before it generates the image of the call chart?

SJaffa commented 1 year ago

Aha figured it out, you just give the name of the output file a .dot extension. This isn't very clear from your docs, might be worth adding an example. E.g.

To generate the call graph image: code2flow --output ../call_graph.png --language py <files and folders> or to generate the dot file: code2flow --output ../call_graph.dot --language py <files and folders>

johntnk commented 6 months ago

That's what i'm looking for.