Skip to content

Conversation

@Dieterbe
Copy link

@Dieterbe Dieterbe commented Dec 27, 2017

i'm new to all the go loader / ast stuff and this tool, but this seems to fix #13

@caarlos0
Copy link

caarlos0 commented Jun 6, 2018

ping @remyoudompheng

@ryboe
Copy link

ryboe commented Jun 17, 2018

This is a serious bug. Thanks for the PR @Dieterbe! I hope this will be reviewed soon.

if !used[obj] && (pkg.Pkg.Name() == "main" || !ast.IsExported(name)) {
_, isSig := obj.Type().(*types.Signature)
pos := ctx.pos(obj.Pos())
isTestMethod := isSig && strings.HasPrefix(obj.Name(), "Test") && strings.HasSuffix(pos.Filename, "_test.go")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, need to check Example and Benchmark prefixes

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 this pull request may close these issues.

deadcode: TestXXX is unused ?

4 participants