We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I believe the linter fails on detecting os.Setenv calls in more advanced scenarios. Here's one:
os.Setenv
func TestModelSuite(t *testing.T) { suite.Run(t, &MySuite{}) } func (s *MySuite) SetupTest() { // ... some setup code s.NoError(os.Setenv("AWS_XRAY_SDK_DISABLED", "true")) // want "some linting error to detect this" // ... more setup code }
FIY: The test suite here is from stretchr/testify should that help you pinpoint the issue.
stretchr/testify
The solution should look like this:
s.T().Setenv("AWS_XRAY_SDK_DISABLED", "true")
As you can see, T() will return the *testing.T instance. So your linter should be sensible to this case as well :)
T()
*testing.T
And just for clarity: I have the configuration parameter all set to true
all
true
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I believe the linter fails on detecting
os.Setenv
calls in more advanced scenarios. Here's one:FIY: The test suite here is from
stretchr/testify
should that help you pinpoint the issue.The solution should look like this:
As you can see,
T()
will return the*testing.T
instance. So your linter should be sensible to this case as well :)And just for clarity: I have the configuration parameter
all
set totrue
The text was updated successfully, but these errors were encountered: