Based on "thou shalt not report diagnostics from source generators" (a rule the Roslyn team wrote down, but I somehow missed), I've been moving all the diagnostics over to the analyzers project. This is somewhat tedious, but it has the advantage that these rules typically apply to non-AOT projects, so everybody wins from more rules (and these are all errors, so really everybody wins at seeing problems because you even try to run your tests).
I'm not writing any fixers, but I'm sure some of them will be easy to write and for someone to come in and fill in later, if they're looking to dabble in the world of source analysis.

Hmm, just hit the first analyzer that needs relatively new version of Roslyn because of a new language feature I need to support (collection expression syntax) and now I'm not sure what to do. The existing analyzers target Roslyn 3.11 to support VS2019 16.11, which is very much not capable of running that. We'll need Roslyn 4.8, with a minimum supported VS version of 2022 17.8.

Time to bump up the minimum? What happens if I try to run Roslyn 4.8 analyzers in 2019? 🤔

#DotNet #Roslyn #Analyzers