The existing xUnit.net analyzers that are errors are helping define the most important set of "did I remember to test for this?" in the code generators, because they almost all end up creating generated code that won't compile (e.g., m Member data pointing at a non-public member). Almost all of the rest inform what conditions need to be validated in the generated code (e.g. incorrect number of values in a data row vs. number of parameters to the test method).

#DotNet #UnitTest #NativeAOT

There's another reason I'm doing this: I want the code generators to return the exact same errors as the analyzers, so that we don't end up with duplicates when you have the analyzers enabled in an AOT project. If they both report the same thing, the user will only see it once (at least, that's how it's working right now in Visual Studio; I haven't tried VS Code yet).

There's no point in doubling up the documentation burden, either. 😄