aws / codelyzer
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 322 units with 3,452 lines of code in units (65.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (226 lines of code)
    • 18 simple units (566 lines of code)
    • 299 very simple units (2,660 lines of code)
0% | 0% | 6% | 16% | 77%
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% | 0% | 6% | 16% | 77%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Analysis/Codelyzer.Analysis.CSharp0% | 0% | 11% | 18% | 70%
src/Analysis/Codelyzer.Analysis0% | 0% | 18% | 12% | 69%
src/Analysis/Codelyzer.Analysis.Model0% | 0% | 7% | 2% | 90%
src/Analysis/Codelyzer.Analysis.Build0% | 0% | 0% | 28% | 71%
src/Analysis/Codelyzer.Analysis.Common0% | 0% | 0% | 0% | 100%
tst/Projects/FrameworkEncoreProject0% | 0% | 0% | 0% | 100%
tst/Projects/CodelyzerDummy0% | 0% | 0% | 0% | 100%
tst/Projects/SdkNetStandardProjectWithConstants0% | 0% | 0% | 0% | 100%
tst/Projects/SdkNetStandardProject0% | 0% | 0% | 0% | 100%
tst/Projects/LegacyFrameworkProject0% | 0% | 0% | 0% | 100%
tst/Projects/SdkNetCoreProject0% | 0% | 0% | 0% | 100%
tst/Projects/LegacyFrameworkProjectWithPackageReference0% | 0% | 0% | 0% | 100%
tst/Projects/SdkNetCoreProjectWithReference0% | 0% | 0% | 0% | 100%
tst/Projects/SdkNetCoreProjectImport0% | 0% | 0% | 0% | 100%
tst/Projects/SdkNetStandardProjectImport0% | 0% | 0% | 0% | 100%
tst/Projects/SdkNetStandardProjectWithPackageReference0% | 0% | 0% | 0% | 100%
tst/Projects/SdkNetCoreProjectWithImportedProps0% | 0% | 0% | 0% | 100%
tst/Projects/LegacyFrameworkProjectWithReference0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public bool Equals()
in src/Analysis/Codelyzer.Analysis.Model/InvocationExpression.cs
19 13 1
private void SetMetaData()
in src/Analysis/Codelyzer.Analysis.CSharp/Handlers/InvocationExpressionHandler.cs
57 13 1
public void HandleCommand()
in src/Analysis/Codelyzer.Analysis/AnalyzerCLI.cs
64 12 1
public static UstNode GetObject()
in src/Analysis/Codelyzer.Analysis.Model/ModelFactory.cs
39 11 1
private void SetMetaData()
in src/Analysis/Codelyzer.Analysis.CSharp/Handlers/ObjectCreationExpressionHandler.cs
47 11 1
public static void AddMethodProperties()
in src/Analysis/Codelyzer.Analysis.CSharp/SemanticHelper.cs
12 9 2
public void Build()
in src/Analysis/Codelyzer.Analysis.Build/WorkspaceBuilderHelper.cs
81 9 0
private ProjectAnalysisResult BuildIncremental()
in src/Analysis/Codelyzer.Analysis.Build/WorkspaceBuilderHelper.cs
47 8 1
private void BuildSolution()
in src/Analysis/Codelyzer.Analysis.Build/WorkspaceBuilderHelper.cs
67 8 1
public static string GetSemanticType()
in src/Analysis/Codelyzer.Analysis.CSharp/SemanticHelper.cs
23 7 3
public static string GetSemanticType()
in src/Analysis/Codelyzer.Analysis.CSharp/SemanticHelper.cs
23 7 3
public static string GetSemanticType()
in src/Analysis/Codelyzer.Analysis.CSharp/SemanticHelper.cs
23 7 3
private void SetMetaData()
in src/Analysis/Codelyzer.Analysis.CSharp/Handlers/MethodDeclarationHandler.cs
29 7 1
private EnvironmentOptions GetEnvironmentOptions()
in src/Analysis/Codelyzer.Analysis.Build/WorkspaceBuilderHelper.cs
33 7 1
static async Task Main()
in src/Analysis/Codelyzer.Analysis/Program.cs
41 7 1
public bool Equals()
in src/Analysis/Codelyzer.Analysis.Model/BaseMethodDeclaration.cs
10 6 1
public bool Equals()
in src/Analysis/Codelyzer.Analysis.Model/ClassDeclaration.cs
10 6 1
public static ISymbol GetSemanticSymbol()
in src/Analysis/Codelyzer.Analysis.CSharp/SemanticHelper.cs
18 6 3
public static INamedTypeSymbol GetDeclaredSymbol()
in src/Analysis/Codelyzer.Analysis.CSharp/SemanticHelper.cs
18 6 3
public static ISymbol GetDeclaredOriginalSymbol()
in src/Analysis/Codelyzer.Analysis.CSharp/SemanticHelper.cs
18 6 3