Summary
In this chapter, we saw how Roslyn Analyzers can be extended to provide code fixes along with the diagnostic information they already provided.
Code fixes work by interpreting the tree structure of your code and making modifications to that structure, resulting in a new document or solution. Visual Studio then reacts to these changes by updating the source code.
This means that code fixes can automatically make pre-configured modifications to your code to address known issues in a repeatable and safe manner.
We also discussed how NuGet package deployment allows you to wrap up your Roslyn Analyzers into a package and share them with other developers – either other developers on your team or other developers worldwide.
This concludes Part 3 of this book. In the final part of this book, we’ll explore some of the unique challenges and opportunities found in refactoring code in real-world organizations and teams.