O'Reilly logo

Professional Application Lifecycle Management with Visual Studio 2013 by Martin Woodward, Brian Keller, Brian Keller, Brian A. Randell, Martin Hinshelwood, Mickey Gousset

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 20Code Analysis, Code Metrics, Code Clone Analysis, and CodeLens

What's in this chapter?

  • Enabling and running code analysis in Visual Studio 2013
  • Correcting code analysis rule violations
  • Understanding code metrics and how to use them
  • Using Code Clone Analysis to find similar code fragments in the code base
  • Using CodeLens to better understand the code base

Wrox.com Code Downloads for this Chapter

The wrox.com code downloads for this chapter are found at www.wrox.com/go/proalm3ed on the Download Code tab. The files are in the Chapter 20 download folder and individually named as shown throughout this chapter.

This chapter describes the code analysis, code metrics, code clone analysis, and CodeLens features included with the Visual Studio 2013. Code analysis is available in Visual Studio 2013 Professional and higher SKUs. Code metrics and code clone analysis are available in Visual Studio 2013 Premium and higher SKUs. And CodeLens is available in Visual Studio 2013 Ultimate. These tools can quickly and easily inspect your code to find common mistakes, make suggestions for improvements, and even indicate violations of standards.

The discussion begins by examining the origins of the Code Analysis tool. You find out about Microsoft's .NET “Design Guidelines for Class Library Developers” and how it is related to the tools. You also take a brief look at what is new with these tools in Visual Studio 2013.

Then you explore the code analysis a bit and learn how to take advantage ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required