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

Don't get fooled by non-testing variables #10

Merged

Conversation

rkennedy
Copy link
Contributor

Only calls to t.Run and t.Parallel should count. Without this, the linter might see a call to some other Run function and then complain that it contains no call to Parallel inside.

This works by capturing the name of the testing.T parameter and only recognizing calls to Run and Parallel on variables with that name. False positives might occur if the parameter gets hidden.

Fixed #9

rkennedy and others added 2 commits April 24, 2021 22:31
Only calls to t.Run and t.Parallel should count. Without this, the
linter might see a call to some other Run function and then complain
that it contains no call to Parallel inside.

This works by capturing the name of the testing.T parameter and only
recognizing calls to Run and Parallel on variables with that name. False
positives might occur if the parameter gets hidden.

Fixed kunwardeep#9
@kunwardeep kunwardeep merged commit f435dce into kunwardeep:master Sep 17, 2021
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.

Any Run(...) call is assumed to be t.Run
2 participants