You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've created a repro solution with this issue https://github.com/AndrewNikolin/cs8618-repro
Also here is a warning in the build log 0>Test1.cs(6,23): Warning CS8618 : Non-nullable field '_testClass' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
Warning in IDE
Missing analyzer
Expected behavior
CS8618 is suppressed
Actual behavior
CS8618 warning is surfaced
Additional context
I wanted to try fix issue myself, but my first attempt to run some tests in the project didn't succeed in a limited time, so I might give another try when I have some more free time. Logging this in the meanwhile, if anyone else is able to pick this up
The text was updated successfully, but these errors were encountered:
Describe the bug
I've just installed
MSTest.Analyzers
into multiple test projects, yet don't see the CS8618 been suppressed in those. The code of https://github.com/microsoft/testfx/blob/main/src/Analyzers/MSTest.Analyzers/NonNullableReferenceNotInitializedSuppressor.cs looks somewhat suspicious to me as I see some doc comments and properties reference the resources for a different suppressor, which might also be the cause this suppressor doesn't surface in Visual Studio/Rider analyzers.Steps To Reproduce
I've created a repro solution with this issue https://github.com/AndrewNikolin/cs8618-repro
Also here is a warning in the build log
0>Test1.cs(6,23): Warning CS8618 : Non-nullable field '_testClass' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
Warning in IDE
Missing analyzer
Expected behavior
CS8618 is suppressed
Actual behavior
CS8618 warning is surfaced
Additional context
I wanted to try fix issue myself, but my first attempt to run some tests in the project didn't succeed in a limited time, so I might give another try when I have some more free time. Logging this in the meanwhile, if anyone else is able to pick this up
The text was updated successfully, but these errors were encountered: