Skip to content

Instantly share code, notes, and snippets.

Created February 21, 2013 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5003895 to your computer and use it in GitHub Desktop.
Save anonymous/5003895 to your computer and use it in GitHub Desktop.
//...
var compareContext = codeBaseNew.CreateCompareContextWithOlder(codeBaseOld);
//...
var methodsThatBecameMoreComplex = from m in compareContext.NewerCodeBase.Methods where
!m.IsAbstract &&
compareContext.IsPresentInBothBuilds(m) &&
compareContext.CodeWasChanged(m)
let oldCC = compareContext.OlderVersion(m).CyclomaticComplexity
where oldCC > 6 && m.CyclomaticComplexity > oldCC
select new { m,
oldCC ,
newCC = m.CyclomaticComplexity ,
oldLoc = compareContext.OlderVersion(m).NbLinesOfCode,
newLoc = m.NbLinesOfCode,
};
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment