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
A private static field of type TestContext causes a false positive for rule MSTEST0005:
private static
TestContext
Property 'TestContext' should be valid
The following code:
[TestClass] public class MiseCorrelationIdProviderTests { private static TestContext _context; [ClassInitialize] public static void ClassInitialize(TestContext context) => _context = context; }
causes the following warning:
A field does not trigger a rule for a property.
It does.
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" /> <PackageVersion Include="MSTest.TestAdapter" Version="3.7.0" /> <PackageVersion Include="MSTest.TestFramework" Version="3.7.0" /> <GlobalPackageReference Include="MSTest.Analyzers" Version="3.7.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </GlobalPackageReference>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
A
private static
field of typeTestContext
causes a false positive for rule MSTEST0005:Steps To Reproduce
The following code:
causes the following warning:
Expected behavior
A field does not trigger a rule for a property.
Actual behavior
It does.
Additional context
The text was updated successfully, but these errors were encountered: