Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lizard --sort cyclomatic_complexity --CCN 10 shows a file with CCN score of 1 #356

Open
huornlmj opened this issue May 16, 2022 · 0 comments

Comments

@huornlmj
Copy link

Taking a well known and popular network port mapper's source code and scanning it with:

lizard --sort cyclomatic_complexity --CCN 10

The following is shown at the end of the report. I had expected there to only be files with cyclomatic complexity of above 10 shown, but as you can see there is a file included with a CCN of 1.

$ lizard --sort cyclomatic_complexity --CCN 10
--SNIP--
      34     11    222      2      48 ScanProgressMeter::printStatsIfNecessary@568-615@./timing.cc
      53     11    455      1      63 l_dnet_get_interface_info@49-111@./nse_dnet.cc
      46     11    295      3      56 test2str@492-547@./osscan.cc
      29     11    236      2      39 NetBlockIPv6Netmask::next@535-573@./TargetGroup.cc
      32     11    178      0      51 FingerPrintResults::OmitSubmissionFP@132-182@./FingerPrintResults.cc
      34     11    211      0      50 FingerPrintResults::populateClassification@207-256@./FingerPrintResults.cc
      21     11    164      0      30 parse_resolvdotconf@945-974@./nmap_dns.cc
      23     11    194      1      31 parse_etchosts@977-1007@./nmap_dns.cc
      48     11    288      3      57 mmapfile@595-651@./utils.cc
      27     11    112      2      27 against_name@297-323@./nse_main.lua
      33     11    203      0      34 Thread@518-551@./nse_main.lua
      43     11    275      1      43 lzstream_decompress@549-591@./nse_zlib.cc
      37     11    301     13      51 build_tcp@631-681@./tcpip.cc
      58     11    433      3      64 receive_buf@673-736@./nse_nsock.cc
    1348      1   7764      0    1348 load_fp_matches@2491-3838@./FPModel.cc
==========================================================================================
Total nloc   Avg.NLOC  AvgCCN  Avg.token   Fun Cnt  Warning cnt   Fun Rt   nloc Rt
------------------------------------------------------------------------------------------
    308332      18.8     5.1      124.8    12308         1186      0.10    0.46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant