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

Finds as function calls in text strings that look like function calls #10

Closed 9mjb closed 2 years ago

9mjb commented 2 years ago

python def function_name(): print('Trace: Called function_name()') # ERROR.. this will show as a function call when it is just a string

koknat commented 2 years ago

Sorry, but I don't have bandwidth to add special handling for the corner case of function_name() within a constant string. It may work correctly if your print statement doesn't include the '()' at the end of 'Called function_name()' Alternately, you could preprocess your .py script before running it through callGraph, to do the same.

9mjb commented 2 years ago

That's what I started doing... omitting the (). Thanks for the attention. (again) :-) .. I wanted to make sure you knew of the issue.

On Fri, Jul 8, 2022 at 12:58 PM Chris Koknat @.***> wrote:

Sorry, but I don't have bandwidth to add special handling for the corner case of function_name() within a constant string. It may work correctly if your print statement doesn't include the '()' at the end of 'Called function_name()' Alternately, you could preprocess your .py script before running it through callGraph, to do the same.

— Reply to this email directly, view it on GitHub https://github.com/koknat/callGraph/issues/10#issuecomment-1179237658, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4TUMYWREFHRGZEE2JRDT3VTBT4JANCNFSM525WXVGA . You are receiving this because you authored the thread.Message ID: @.***>

koknat commented 2 years ago

Closing as there is a workaround for this corner case