Roslyn を使用して、到達不能なコードやその他のビルトイン コンパイル警告を検出することは可能ですか?
private void DoSomething()
{
string a = "TEST";
throw new Exception("Why would I throw an exception here?");
a = "This will never be reached"; //this is a compile time warning for unreachable code...Can I detect it?
}
セマンティック メソッドとシンタックス メソッドのノード プロパティを調べてみましたが、問題や警告のコレクションは見つかりませんでした。