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

Wrong to scan go func with anonymous function #297

Open
cyw3 opened this issue Aug 5, 2020 · 2 comments
Open

Wrong to scan go func with anonymous function #297

cyw3 opened this issue Aug 5, 2020 · 2 comments

Comments

@cyw3
Copy link
Contributor

cyw3 commented Aug 5, 2020

The existence of anonymous functions in function testCCN will cause function testCCN to be unrecognized and the cyclomatic complexity will be ignored.

func testCCN() {
	defer func() {
		println("")
	}()
	if true {
		println("")
	}
	if true {
		println("")
	}
}
@503440692
Copy link

503440692 commented Nov 16, 2022

In latest version, the problem seem still exists. Hope it can be fixed, thanks.

@terryyin
Copy link
Owner

What should be the proper behaviour? Count, by as a separate function, or adding to the outer function?

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

3 participants