-
-
Save anonymous/3770883ec2b5d818760b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <Name>From now, all methods added or refactored should respect basic quality principles</Name> | |
warnif count > 0 from m in JustMyCode.Methods where | |
// *** Only new or modified methods since Baseline for Comparison *** | |
(m.WasAdded() || m.CodeWasChanged()) && | |
// Low Quality methods// Metrics' definitions | |
( m.NbLinesOfCode > 30 || // http://www.ndepend.com/Metrics.aspx#NbLinesOfCode | |
m.NbILInstructions > 200 || // http://www.ndepend.com/Metrics.aspx#NbILInstructions | |
m.CyclomaticComplexity > 20 || // http://www.ndepend.com/Metrics.aspx#CC | |
m.ILCyclomaticComplexity > 50 || // http://www.ndepend.com/Metrics.aspx#ILCC | |
m.ILNestingDepth > 4 || // http://www.ndepend.com/Metrics.aspx#ILNestingDepth | |
m.NbParameters > 5 || // http://www.ndepend.com/Metrics.aspx#NbParameters | |
m.NbVariables > 8 || // http://www.ndepend.com/Metrics.aspx#NbVariables | |
m.NbOverloads > 6 ) | |
select new { m, m.NbLinesOfCode, m.NbILInstructions, m.CyclomaticComplexity, | |
m.ILCyclomaticComplexity, m.ILNestingDepth, | |
m.NbParameters, m.NbVariables, m.NbOverloads } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment