microsoft / jschema
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 364 units with 5,411 lines of code in units (66.5% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (61 lines of code)
    • 7 medium complex units (550 lines of code)
    • 23 simple units (758 lines of code)
    • 333 very simple units (4,042 lines of code)
0% | 1% | 10% | 14% | 74%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cs0% | 1% | 10% | 14% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Json.Schema0% | 5% | 23% | 7% | 62%
src/Json.Schema.ToDotNet0% | 0% | 6% | 12% | 80%
src/Json.Schema.Validation0% | 0% | 10% | 26% | 62%
src/Json.Schema.ToDotNet.Cli0% | 0% | 0% | 75% | 25%
src/Json.Schema.Validation.Cli0% | 0% | 0% | 0% | 100%
src/Json.Pointer0% | 0% | 0% | 0% | 100%
src/Json.Schema.TestUtilities0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public bool Equals()
in src/Json.Schema/JsonSchema.cs
61 43 1
private static JsonSchema Collapse()
in src/Json.Schema/JsonSchema.cs
131 24 2
public JsonSchema()
in src/Json.Schema/JsonSchema.cs
92 20 1
private void AddPropertyInfoFromPropertySchema()
in src/Json.Schema.ToDotNet/PropertyInfoDictionary.cs
146 18 4
private void ValidateNumber()
in src/Json.Schema.Validation/Validator.cs
45 14 2
private void ValidateToken()
in src/Json.Schema.Validation/Validator.cs
46 12 2
public string Generate()
in src/Json.Schema.ToDotNet/DataModelGenerator.cs
62 11 1
public static SchemaType ToSchemaType()
in src/Json.Schema/JTokenTypeExtensions.cs
28 11 1
internal static bool IsIntegralType()
in src/Json.Schema.ToDotNet/ObjectExtensions.cs
21 10 1
private void ValidateArray()
in src/Json.Schema.Validation/Validator.cs
25 9 2
private ExpressionSyntax GetExpressionForValue()
in src/Json.Schema.ToDotNet/ClassGenerator.cs
41 8 2
public override void AddMembers()
in src/Json.Schema.ToDotNet/EnumGenerator.cs
42 8 0
internal static bool DeepEquals()
in src/Json.Schema.Validation/JTokenEqualityComparer.cs
22 8 2
internal static int DeepHashCode()
in src/Json.Schema.Validation/JTokenEqualityComparer.cs
22 8 1
private void ValidateObject()
in src/Json.Schema.Validation/Validator.cs
28 8 2
private void ValidateObjectPropertyValue()
in src/Json.Schema.Validation/Validator.cs
33 8 4
public override object ReadJson()
in src/Json.Schema/SchemaTypeConverter.cs
55 8 4
private void GenerateAdditionalTypeFromEnumHint()
in src/Json.Schema.ToDotNet/DataModelGenerator.cs
40 7 2
internal static SyntaxTriviaList MakeDocComment()
in src/Json.Schema.ToDotNet/SyntaxHelper.cs
45 7 4
private void ValidateString()
in src/Json.Schema.Validation/Validator.cs
27 7 2