flowtype / flow-for-vscode
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 132 units with 1,509 lines of code in units (62.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (163 lines of code)
    • 8 simple units (323 lines of code)
    • 121 very simple units (1,023 lines of code)
0% | 0% | 10% | 21% | 67%
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
js0% | 0% | 10% | 21% | 67%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib0% | 0% | 28% | 0% | 71%
lib/FlowLanguageClient0% | 0% | 12% | 26% | 60%
lib/utils0% | 0% | 6% | 13% | 80%
lib/utils/LanguageClient/TypeCoverageFeature0% | 0% | 0% | 56% | 43%
lib/utils/LanguageClient/StatusFeature0% | 0% | 0% | 40% | 59%
lib/common0% | 0% | 0% | 0% | 100%
lib/utils/LanguageClient0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
render()
in lib/FlowLanguageClient/StatusBarWidget.js
65 17 0
75 12 5
function getWindowsDriveLetter()
in lib/utils/uriToString.js
23 11 1
async _createClient()
in lib/FlowLanguageClient/FlowLanguageClient.js
136 9 1
render()
in lib/utils/LanguageClient/StatusFeature/Status.js
31 8 0
export function convertToStatus()
in lib/utils/LanguageClient/StatusFeature/utils.js
30 8 1
function getFlowBinDirPrefixForPlatform()
in lib/utils/getVerifiedFlowBinPath.js
9 6 0
_renderCoverage()
in lib/utils/LanguageClient/TypeCoverageFeature/TypeCoverage.js
24 6 0
_renderDiagnostics()
in lib/utils/LanguageClient/TypeCoverageFeature/TypeCoverage.js
21 6 0
_computeCoverage()
in lib/utils/LanguageClient/TypeCoverageFeature/TypeCoverage.js
30 6 1
42 6 7
provideCompletionItem()
in lib/FlowLanguageClient/createMiddleware.js
19 5 5
27 5 2
async function getFlowBinRelativePath()
in lib/utils/getVerifiedFlowBinPath.js
18 5 1
export default async function()
in lib/utils/getVerifiedFlowBinPath.js
46 5 2
function formatHoverContent()
in lib/FlowLanguageClient/createMiddleware.js
15 4 1
fillClientCapabilities()
in lib/utils/LanguageClient/ConfigureCompletionSnippetSupport.js
9 4 1
id: String()
in lib/utils/LanguageClient/StatusFeature/StatusProvider.js
23 4 1
function isAlphabet()
in lib/utils/uriToString.js
6 4 1
export default function toDiagnosticSeverity()
in lib/utils/toDiagnosticSeverity.js
15 4 2