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

C cannot find functions in file #272

Closed alice0706 closed 5 years ago

alice0706 commented 5 years ago

when I add this in my s.c file : const unsigned long RESET_REQ_MSG_TYPE = ASN1V_MECS_id_reset + (T_TMECS_MECS_PDU_initiatingMessage << ASSEMBLE_MSGID_OFFSET); lizard analyze output is lizard -l c

NLOC CCN token PARAM length location

1 file analyzed.

NLOC Avg.NLOC AvgCCN Avg.token function_cnt file

487       0.0     0.0        0.0         0     ./s.c

when remove the const xxxx, the output is like this:

NLOC Avg.NLOC AvgCCN Avg.token function_cnt file

486      21.4     5.1      123.4        21     ./s.c

========================================================================================= !!!! Warnings (cyclomatic_complexity > 15 or length > 1000 or parameter_count > 100) !!!!

NLOC CCN token PARAM length location

 137     23    903      3     166 xx@385-550@./s.c
  24     16     66      1      24 xx@622-645@./s.c

========================================================================================== Total nloc Avg.NLOC AvgCCN Avg.token Fun Cnt Warning cnt Fun Rt nloc Rt

   486      21.4     5.1      123.4       21            2      0.10    0.36