Posts about Static Analysis

Cyclomatic Complexity in .NET Core

Cyclomatic complexity is a simple code metric, commonly used to identify complex methods which are difficult to maintain and therefore good candidates for refactoring. It is one of the five code metrics built into Visual Studio 2017, but it isn't available for .NET Core and .NET Standard projects. Let's look at third party extensions which you can use instead.

Improve ReSharper Static Analysis Using Annotation Attributes

August 18th 2014 ReSharper Static Analysis C#

Static code analysis is a very useful feature of ReSharper. The generated warnings can help you fix bugs which might otherwise remain unnoticed. Unfortunately static analysis is not perfect and it might detect false positives. There are a couple of ways to tell it not to warn us about specific ones any more.

Using NDepend to Analyze Your Code

Recently I got my hands on the full version of NDepend and I decided to take advantage of that by trying it out on a couple of projects I am working on, both personally and professionally. It turned out that NDepend isn't all that easy to use if you want to make the most out of it. In this post I'll go over the steps I made to set everything up and reconfigure it in a way that made the results more meaningful to me.

Book Review: StyleCop Code Analysis How-to

the book should be more than enough to get you going even if you've never used StyleCop before. Based on the table of contents I was still hoping for more in-depth information on creating custom rules.