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

Go built-in functions are not recognized when excluding functions #28

Closed
gdavison opened this issue Oct 1, 2021 · 0 comments · Fixed by #29
Closed

Go built-in functions are not recognized when excluding functions #28

gdavison opened this issue Oct 1, 2021 · 0 comments · Fixed by #29

Comments

@gdavison
Copy link
Contributor

gdavison commented Oct 1, 2021

Short summary

Go built-in functions, such as make([]string, 0, 10) are not recognized when excluding functions

Steps to reproduce the behavior

Create a function like

func example4() {
	a := make([]int, 0, 10)
	a[0] = 1
}

Run

$ go-mnd -checks=argument -ignored-functions=make`
Magic number: 10, in <argument> detected

go-mnd version or commit ref

v2.4.0

Go version (output of 'go version')

go version
go version go1.16.3 darwin/amd64

Operating system / Environment

macOS 10.15.7

Expected behavior

Arguments to make() should have been ignored

Actual behavior

Arguments to make() were checked

This issue was closed.
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

Successfully merging a pull request may close this issue.

1 participant