Summary
In this chapter, we discussed some important tips for writing safe code. This chapter introduced a tool for analyzing code metrics so that you can manage the complexity and maintainability of the software you are developing. To finish, we presented some good tips to guarantee that your software will not crash due to memory leaks and exceptions. In real life, a software architect will always be asked to solve this kind of problem.
The chapter also presented tools that can be used to apply the best practices of coding we discussed. We looked at the Roslyn compiler, which enables code analysis while the developer is coding, and we looked at a use case, evaluating C# code prior to publishing an application, which implements code analysis during the Azure DevOps building process using Sonar Cloud.
When you apply everything you have learned in this chapter to your projects, you will find that code analysis will give you the opportunity to improve the quality of the code...