microsoft / MSBuildSdks
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 41 units with 540 lines of code in units (33.6% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (84 lines of code)
    • 2 medium complex units (105 lines of code)
    • 3 simple units (61 lines of code)
    • 35 very simple units (290 lines of code)
0% | 15% | 19% | 11% | 53%
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% | 15% | 19% | 11% | 53%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Artifacts/Tasks0% | 21% | 27% | 15% | 35%
src/Shared0% | 0% | 0% | 0% | 100%
src/Artifacts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public bool IsMatch()
in src/Artifacts/Tasks/RobocopyMetadata.cs
84 34 3
private void CopySearch()
in src/Artifacts/Tasks/Robocopy.cs
36 11 5
public static bool TryParse()
in src/Artifacts/Tasks/RobocopyMetadata.cs
69 11 4
private string DumpString()
in src/Artifacts/Tasks/RobocopyMetadata.cs
27 7 2
private void CopyItems()
in src/Artifacts/Tasks/Robocopy.cs
23 6 2
public bool ShouldCopy()
in src/Artifacts/Tasks/RobocopyMetadata.cs
11 6 3
private void CopyFile()
in src/Artifacts/Tasks/Robocopy.cs
29 5 4
protected virtual void Dispose()
in src/Shared/MSBuildSdkTestBase.cs
25 5 1
private void LogCopyFailureAndSleep()
in src/Artifacts/Tasks/Robocopy.cs
20 4 3
private bool Verify()
in src/Artifacts/Tasks/Robocopy.cs
12 4 3
public override bool Execute()
in src/Artifacts/Tasks/Robocopy.cs
13 3 0
private void CopyItems()
in src/Artifacts/Tasks/Robocopy.cs
16 3 1
private void CreateDirectoryWithRetries()
in src/Artifacts/Tasks/Robocopy.cs
15 3 1
public string GetMatchString()
in src/Artifacts/Tasks/RobocopyMetadata.cs
6 3 0
public static bool GetMetadataBoolean()
in src/Artifacts/ExtensionMethods.cs
9 2 3
private string GetMatchString()
in src/Artifacts/Tasks/Robocopy.cs
9 2 1
protected DirectoryInfo CreateFiles()
in src/Shared/MSBuildSdkTestBase.cs
10 2 2
protected string GetTempFile()
in src/Shared/MSBuildSdkTestBase.cs
8 2 1
public void CopyMetadataTo()
in src/Shared/MockTaskItem.cs
7 2 1
public string GetMetadata()
in src/Shared/MockTaskItem.cs
8 2 1