Is it possible to detect unreachable code or other built-in compilation warnings using Roslyn?
private void DoSomething()
{
string a = "TEST";
throw new Exception("Why would I throw an exception here?");
a = "This will never be reached";
}
I tried to examine the properties of node in semantics and syntax methods, but did not see any problems or collections of warnings.
source
share