koknat / callGraph

A multi-language tool which parses source code for function definitions and calls
GNU General Public License v3.0
245 stars 28 forks source link

Specify path + function name with -start option #6

Closed niklr closed 2 years ago

niklr commented 2 years ago

Hello @koknat thank you very much for this tool!

Is it somehow possible to specify the path to the file in combination with the function name in the -start option? e.g. ./callGraph . -start 'src/subfolder/main.go#update' -language 'go'

I would like to generate a call graph for a specific function but the same name is used in different files of my application.

koknat commented 2 years ago

Assuming that the filename is 'main.go', and the function name is 'update', this should work: ./callGraph . -start 'src/subfolder/main.go:update' -language 'go' or ./callGraph . -start 'main.go:update' -language 'go'

niklr commented 2 years ago

Awesome, this works indeed. Thank you @koknat!