apple / swift-package-registry-compatibility-test-suite
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 140 units with 1,568 lines of code in units (37.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (65 lines of code)
    • 5 simple units (225 lines of code)
    • 134 very simple units (1,278 lines of code)
0% | 0% | 4% | 14% | 81%
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
swift0% | 0% | 4% | 14% | 81%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Sources/PackageRegistryCompatibilityTestSuite0% | 0% | 16% | 9% | 73%
Sources/PackageRegistryCompatibilityTestSuite/APITests0% | 0% | 0% | 28% | 71%
Sources/PackageRegistryExample/Controllers0% | 0% | 0% | 39% | 60%
Sources/PackageRegistryExample/DataAccess0% | 0% | 0% | 0% | 100%
Sources/PackageRegistryExample0% | 0% | 0% | 0% | 100%
Sources/PostgresMigrations0% | 0% | 0% | 0% | 100%
Sources/DatabaseMigrations0% | 0% | 0% | 0% | 100%
Sources/PackageRegistryTool0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func execute()
in Sources/PackageRegistryCompatibilityTestSuite/Commands.swift
65 11 0
func run()
in Sources/PackageRegistryCompatibilityTestSuite/APITests/FetchPackageReleaseManifest.swift
44 8 0
func run()
in Sources/PackageRegistryCompatibilityTestSuite/APITests/CreatePackageRelease.swift
51 7 0
func readConfigAndRunTests()
in Sources/PackageRegistryCompatibilityTestSuite/Commands.swift
36 7 3
func fetchPackageReleaseInfo()
in Sources/PackageRegistryExample/Controllers/PackageReleasesController.swift
42 7 1
func fetchManifest()
in Sources/PackageRegistryExample/Controllers/PackageManifestsController.swift
52 6 1
func checkContentDispositionHeader()
in Sources/PackageRegistryCompatibilityTestSuite/APITests/APITest.swift
16 5 4
func checkContentLengthHeader()
in Sources/PackageRegistryCompatibilityTestSuite/APITests/APITest.swift
14 5 4
func run()
in Sources/PackageRegistryCompatibilityTestSuite/TestConfigurationGenerator.swift
70 5 2
func run()
in Sources/PackageRegistryTool/Tool.swift
44 5 0
func run()
in Sources/PackageRegistryCompatibilityTestSuite/APITests/DownloadSourceArchive.swift
25 4 0
func run()
in Sources/PackageRegistryCompatibilityTestSuite/APITests/LookupPackageIdentifiers.swift
22 4 0
func repositoryURL()
in Sources/PackageRegistryCompatibilityTestSuite/TestConfigurationGenerator.swift
14 4 1
func create()
in Sources/PackageRegistryExample/DataAccess/Postgres/PackageReleasesDAO+Postgres.swift
35 4 10
init()
in Sources/PackageRegistryExample/Service+API.swift
49 4 2
func checkRegistryURL()
in Sources/PackageRegistryCompatibilityTestSuite/Commands.swift
10 3 2
func linkRelations()
in Sources/PackageRegistryCompatibilityTestSuite/TestConfigurationGenerator.swift
13 3 2
func delete()
in Sources/PackageRegistryExample/Controllers/PackageReleasesController.swift
12 3 1
func downloadSourceArchive()
in Sources/PackageRegistryExample/Controllers/PackageResourcesController.swift
29 3 1
func unwrap()
in Sources/PackageRegistryExample/Helpers.swift
8 3 1