Creating a custom code analyzer

The real magic of code analyzers come to the fore when you create one to suit a specific need. What would qualify as a specific need? Well anything that is specific to your own business requirements that is not covered in the out-of-the-box analyzers. Don't get me wrong; the existing analyzers that are available to developers really cover a lot of good programming practices. Just take a look on GitHub by searching for C# code analyzers.

Sometimes, however, you might have a case where something is more suited to your workflow or the way your company does business.

An example of this is could be to ensure that comments on all public methods include more information than just the standard <summary></summary>

Get C# 7 and .NET Core Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.