Creating a Roslyn Analyzer
In the previous chapter, we covered the use of code analyzers to detect issues in code. But what happens when your team has common issues that aren’t detected by any existing analysis rules?
It turns out that modern C# provides a means for building custom analyzers through something called Roslyn Analyzers. In this chapter, we’ll see how Roslyn Analyzers work in action by building an analyzer of our own.
This chapter covers the following topics:
- Understanding Roslyn Analyzers
- Creating a Roslyn Analyzer
- Testing Roslyn Analyzers with
RoslynTestKit
- Sharing analyzers as Visual Studio extensions