Detect the impact of changes in the application

I have an assignment which is to create a method to detect the impact of changes in the application. Can anyone help me with some instructions? I don't know where to start and someone needs to put me on the right track.

+3


source to share


1 answer


For the .NET framework, you can use the NDepend tool to determine the impact of changes to a .NET application (Disclaimer: I am the lead developer for this tool).

NDepend provides the ability to write C # LINQ queries to query your codebase as well as query the difference between two different versions of your codebases. There are around 200 standard LINQ queries (code rules) and are easy to write yourself.

For example, the code codes below are list methods that got more complex between the two versions:

// <Name>Avoid making complex methods even more complex (Source CC)</Name>
// To visualize changes in code, right-click a matched method and select:
//  - Compare older and newer versions of source file
//  - Compare older and newer versions disassembled with Reflector

warnif count > 0 
from m in JustMyCode.Methods where
 !m.IsAbstract &&
  m.IsPresentInBothBuilds() &&
  m.CodeWasChanged()

let oldCC = m.OlderVersion().CyclomaticComplexity
where oldCC > 6 && m.CyclomaticComplexity > oldCC 

select new { m,
    oldCC ,
    newCC = m.CyclomaticComplexity ,
    oldLoc = m.OlderVersion().NbLinesOfCode,
    newLoc = m.NbLinesOfCode,
}

      



The result can be shown live in Visual Studio or in HTML + js reports:

Diff complexity with NDepend

In groups of rules Regression code quality and Summary koda> many other rules of the default code will help you to transfer the impact of differences / changes in terms of the quality of the code, the code structure and ease of code maintenance. A 14-day, fully functional version is available for download .

0


source







All Articles