News for hackers. Stuff that matters.
Re:A Preview of C# 8 [video] by ajennings on Wednesday September 06, 2017 @06:53PM (#15187795)
I wrote a compiler extension to help me:

https://github.com/abjennings/EnumAnalyzer

It doesn't analyze the control flow or anything like that. It just looks for places where I throw a certain exception, then checks the surrounding code block to make sure all the defined enum values are mentioned at least once.

It definitely doesn't handle all the corner cases. But I think it's 90% of the benefit for 10% of the cost. Also, I learned to write compiler extensions...

There are no comments on this comment yet.