bazelbuild / tulsi
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 676 units with 10,992 lines of code in units (45.2% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (105 lines of code)
    • 10 medium complex units (653 lines of code)
    • 35 simple units (1,074 lines of code)
    • 630 very simple units (9,160 lines of code)
0% | <1% | 5% | 9% | 83%
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
py0% | 7% | 15% | 24% | 53%
swift0% | 0% | 4% | 7% | 88%
c0% | 0% | 0% | 57% | 42%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/TulsiGenerator0% | 2% | 12% | 15% | 69%
src/Tulsi0% | 0% | 13% | 21% | 64%
src/tools0% | 0% | 0% | 51% | 48%
src/TulsiEndToEndTests0% | 0% | 0% | 15% | 84%
src/TulsiGeneratorIntegrationTests0% | 0% | 0% | 4% | 95%
src/TulsiGeneratorTests0% | 0% | 0% | <1% | 99%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def Run()
in src/TulsiGenerator/Scripts/bazel_build.py
105 30 2
init()
in src/Tulsi/TulsiCommandlineParser.swift
83 25 0
def __init__()
in src/TulsiGenerator/Scripts/bazel_build.py
64 22 2
func productName()
in src/TulsiGenerator/PBXObjects.swift
46 22 1
func generateIndexerTargetGraphForRuleEntry()
in src/TulsiGenerator/PBXTargetGenerator.swift
121 19 1
def _RunBazelAndPatchOutput()
in src/TulsiGenerator/Scripts/bazel_build.py
93 17 2
def _ExtractLLDBInitContent()
in src/TulsiGenerator/Scripts/bootstrap_lldbinit.py
24 17 4
func generate()
in src/Tulsi/HeadlessXcodeProjectGenerator.swift
85 15 0
func generateBuildTargetsForRuleEntries()
in src/TulsiGenerator/PBXTargetGenerator.swift
78 15 3
def _InstallDSYMBundles()
in src/TulsiGenerator/Scripts/bazel_build.py
43 14 3
func canMergeWith()
in src/TulsiGenerator/PBXTargetGenerator.swift
16 11 1
func outlineView()
in src/Tulsi/OptionsEditorController.swift
45 10 3
def InstallForData()
in src/TulsiGenerator/Scripts/install_genfiles.py
17 10 2
func didClickAddBUILDFile()
in src/Tulsi/ProjectEditorPackageManagerViewController.swift
37 9 1
func updateSourcePaths()
in src/Tulsi/TulsiGeneratorConfigDocument.swift
73 9 1
func deleteConfigsNamed()
in src/Tulsi/TulsiProjectDocument.swift
34 8 1
func prepareEditorForTarget()
in src/Tulsi/OptionsEditorController.swift
43 8 1
def _IsValidArtifactArchiveRoot()
in src/TulsiGenerator/Scripts/bazel_build.py
8 8 3
def _FindEmbeddedBundle()
in src/TulsiGenerator/Scripts/bazel_build.py
21 8 4
def _UUIDInfoForBinary()
in src/TulsiGenerator/Scripts/bazel_build.py
22 8 2