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

Nested range causes false positive "Range statement [..] does not reinitialise the variable" #12

Closed
prashantv opened this issue Oct 26, 2021 · 2 comments

Comments

@prashantv
Copy link

Repro:
https://gist.github.com/prashantv/9febe96e7df2b0d5311fa3b4aedb3059

Using the latest release of paralleltest (1.0.3) raises an incorrect issue:

[...]/foo_test.go:27:2: Range statement for test TestFoo does not reinitialise the variable tt2

tt2 is reinitialized:
https://gist.github.com/prashantv/9febe96e7df2b0d5311fa3b4aedb3059#file-foo_test-go-L31

This seems related to #8 (though the last comment on the issue indicates the issue is fixed)

@kunwardeep
Copy link
Owner

Hey @prashantv, unfortunately, I am not doing active development on this., but I would be more than happy to look at a PR if you have one.

@kunwardeep
Copy link
Owner

Hey @prashantv would you be able to test this with the latest fix?

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

2 participants