Skip to content

Instantly share code, notes, and snippets.

@yetanotherchris
Created July 31, 2013 20:36
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 yetanotherchris/6125916 to your computer and use it in GitHub Desktop.
Save yetanotherchris/6125916 to your computer and use it in GitHub Desktop.
NDepend LCOM, LOC, Cyclomatic complexity queries
// <Name>LCOM</Name>
from t in JustMyCode.Types where t.LCOM > 0
orderby t.LCOM descending
select new { t, t.LCOM }
// <Name>LOC</Name>
from a in JustMyCode.Assemblies
select new { a, a.NbLinesOfCode, a.NbILInstructions }
// <Name>Cyclomatic complexity</Name>
from m in JustMyCode.Methods
where m.CyclomaticComplexity > 0
orderby m.CyclomaticComplexity descending
select new { m, m.ParentType.Name, m.CyclomaticComplexity }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment