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

wrong CCN in such situation #181

Closed robutcher closed 7 years ago

robutcher commented 7 years ago

xxx.c

typedef struct tagAAA {

}AAA;

int func_a(int size) { if(ccc() && ddd() && eee()) { return 1; } }

NLOC Avg.NLOC AvgCCN Avg.token function_cnt file

 10       7.0     2.0       26.0         1     xxx.c

after typedef struct tagAAA removed

NLOC Avg.NLOC AvgCCN Avg.token function_cnt file

  7       7.0     4.0       26.0         1     xxx.c
terryyin commented 7 years ago

Hi @robutcher,

Thanks for the report and sorry for the delayed reply. Just had a two week trip. The bug was introduced when adding support for cpp r-value reference. The problem is fixed on the trunk and I will create a new release once I’m reconnected to the internet again.

Terry

On 14 Apr 2017, at 3:15 PM, robutcher notifications@github.com wrote:

xxx.c

typedef struct tagAAA {

}AAA;

int func_a(int size) { if(ccc() && ddd() && eee()) { return 1; } }

NLOC Avg.NLOC AvgCCN Avg.token function_cnt file

10 7.0 2.0 26.0 1 xxx.c after typedef struct tagAAA removed

NLOC Avg.NLOC AvgCCN Avg.token function_cnt file

7 7.0 4.0 26.0 1 xxx.c — 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/181, or mute the thread https://github.com/notifications/unsubscribe-auth/AAwJYmlAAe685Fm1f05UKX0JXDxtEG4Cks5rvw8TgaJpZM4M9fT0.