microsoft / sarif-visualstudio-extension
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 626 units with 8,098 lines of code in units (47.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 12 medium complex units (768 lines of code)
    • 64 simple units (2,020 lines of code)
    • 550 very simple units (5,310 lines of code)
0% | 0% | 9% | 24% | 65%
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% | 9% | 24% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/Sarif.Viewer.VisualStudio.Core0% | 0% | 10% | 25% | 63%
src/Sarif.Sarifer.Core0% | 0% | 0% | 20% | 79%
src/Sarif.Viewer.VisualStudio.Interop0% | 0% | 0% | 16% | 83%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public static async Task ProcessLogFileCoreAsync()
in src/Sarif.Viewer.VisualStudio.Core/ErrorList/ErrorListService.cs
143 25 5
internal void RemapFilePath()
in src/Sarif.Viewer.VisualStudio.Core/Models/SarifErrorListItem.cs
81 19 2
internal void PopulateAdditionalPropertiesIfNot()
in src/Sarif.Viewer.VisualStudio.Core/Models/SarifErrorListItem.cs
54 18 0
public bool NavigateTo()
in src/Sarif.Viewer.VisualStudio.Core/ResultTextMarker.cs
72 17 2
public bool TryResolveFilePath()
in src/Sarif.Viewer.VisualStudio.Core/CodeAnalysisResultManager.cs
67 14 5
internal string CreateFileFromContents()
in src/Sarif.Viewer.VisualStudio.Core/CodeAnalysisResultManager.cs
52 13 2
private int WriteRunToErrorList()
in src/Sarif.Viewer.VisualStudio.Core/ErrorList/ErrorListService.cs
64 13 3
internal void AddSuppressionToSarifLog()
in src/Sarif.Viewer.VisualStudio.Core/CodeAnalysisResultManager.cs
52 12 1
private void MenuItemCallback()
in src/Sarif.Viewer.VisualStudio.Core/ErrorList/ErrorListCommand.cs
40 12 2
internal static async Task ProcessSarifLogAsync()
in src/Sarif.Viewer.VisualStudio.Core/ErrorList/ErrorListService.cs
54 12 4
public static string ExtractSnippet()
in src/Sarif.Viewer.VisualStudio.Core/Sarif/Location.Extensions.cs
31 11 3
private static List GetMessageInlinesHelper()
in src/Sarif.Viewer.VisualStudio.Core/SdkUiUtilities.cs
58 11 2
internal bool TryResolveFilePathFromSourceControl()
in src/Sarif.Viewer.VisualStudio.Core/CodeAnalysisResultManager.cs
45 10 5
internal static string MakeFullPath()
in src/Sarif.Viewer.VisualStudio.Core/SdkUiUtilities.cs
31 10 3
public bool Equals()
in src/Sarif.Viewer.VisualStudio.Core/Tags/TextViewCaretListener.cs
24 10 2
internal bool TryResolveFilePathFromSolution()
in src/Sarif.Viewer.VisualStudio.Core/CodeAnalysisResultManager.cs
38 9 4
internal bool VerifyFileWithArtifactHash()
in src/Sarif.Viewer.VisualStudio.Core/CodeAnalysisResultManager.cs
44 9 6
public static IProjectionBuffer CreateProjectionBufferWithoutIndentation()
in src/Sarif.Viewer.VisualStudio.Core/Fixes/ProjectionBufferFactoryServiceExtensions.cs
50 9 5
internal void SetVerbosity()
in src/Sarif.Viewer.VisualStudio.Core/Models/AnalysisStepNode.cs
43 9 1
private void LocationCollection_CollectionChanged()
in src/Sarif.Viewer.VisualStudio.Core/Models/LocationCollection.cs
29 9 2