lizard icon indicating copy to clipboard operation
lizard copied to clipboard

Failed do detect go func

Open yql70 opened this issue 4 years ago • 0 comments

lizard 1.17.7 If there is an anonymous function with a return value type in the testCCN function, it will cause the testCCN function to be undetected. Even when the latter function testC has a receiver argument, the testC function is not recognized too.

code:

func testCCN() {
	sort.SliceStable(Cells, func(i, j int) bool {
		return Cells[i].SortValue < Cells[j].SortValue
	})
	if true {
		println("")
	}
	if true {
		println("")
	}
}

func(v Vertex) testC()
{
	if true {
		println("")
	}
} 
 ~/Documents/install/lizard %python3 lizard.py test.go -l go
================================================
  NLOC    CCN   token  PARAM  length  location  
------------------------------------------------
       3      1     24      0       3 bool@[email protected]
1 file analyzed.

yql70 avatar Nov 13 '20 03:11 yql70