terryyin / lizard

A simple code complexity analyser without caring about the C/C++ header files or Java imports, supports most of the popular languages.
Other
1.85k stars 250 forks source link

Fail to calculate fan_in and fan_out #250

Open ishepard opened 5 years ago

ishepard commented 5 years ago

I am having problems in calculating fan_in and fan_out of the methods. I tried different languages, different approaches (analyze recursively a directory, analyze only one file, etc.), but the result is always the same: fan_in and fan_out = 0.

What am I doing wrong?

This is the code I am using:

import lizard

an = lizard.analyze_file("/path/to/HTTP.c")
# also tried analyze, analyze_file and giving the directory

print(an.filename)
for func in an.function_list:
    print(func.fan_in)
    print(func.fan_out)

the output is always 0.

terryyin commented 5 years ago

The fan_in/out feature is an extension of Lizard, and I think at this moment it’s not working.

On 22 Jan 2019, at 5:24 PM, Spadini Davide notifications@github.com wrote:

I am having problems in calculating fan_in and fan_out of the methods. I tried different languages, different approaches (analyze recursively a directory, analyze only one file, etc.), but the result is always the same: fan_in and fan_out = 0.

What am I doing wrong?

This is the code I am using:

import lizard

an = lizard.analyze_file("/path/to/HTTP.c")

also tried analyze, analyze_file and giving the directory

print(an.filename) for func in an.function_list: print(func.fan_in) print(func.fan_out) the output is always 0.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/terryyin/lizard/issues/250, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwJYkrATk1i3AsH-bbwCeu_qjTNII2yks5vFtiwgaJpZM4aMP1h.

hgn commented 5 years ago

Yes, it is not working yet. I realized that too. ;-) Beside this: thank you @terryyin for lizard and the effort in developing that tool!