golang / oauth2
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 127 units with 1,977 lines of code in units (63.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (253 lines of code)
    • 27 simple units (884 lines of code)
    • 96 very simple units (840 lines of code)
0% | 0% | 12% | 44% | 42%
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
go0% | 0% | 12% | 44% | 42%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
google0% | 0% | 14% | 51% | 33%
jwt0% | 0% | 93% | 0% | 6%
internal0% | 0% | 0% | 64% | 35%
jira0% | 0% | 0% | 70% | 29%
ROOT0% | 0% | 0% | 19% | 80%
jws0% | 0% | 0% | 35% | 64%
clientcredentials0% | 0% | 0% | 68% | 31%
hipchat0% | 0% | 0% | 0% | 100%
endpoints0% | 0% | 0% | 0% | 100%
authhandler0% | 0% | 0% | 0% | 100%
microsoft0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func NewSDKConfig()
in google/sdk.go
66 16 1
func()
in jwt/jwt.go
80 15 1
func()
in google/internal/externalaccount/urlcredsource.go
46 12 1
func()
in google/google.go
61 11 1
func RetrieveToken()
in internal/token.go
28 10 6
func()
in google/internal/externalaccount/aws.go
47 10 1
func exchangeToken()
in google/internal/externalaccount/sts_exchange.go
48 10 6
func()
in jira/jira.go
54 9 1
func doTokenRoundTrip()
in internal/token.go
54 9 2
func()
in jws/jws.go
32 9 1
func()
in google/internal/externalaccount/aws.go
32 9 1
func()
in google/internal/externalaccount/basecredentials.go
49 9 1
func()
in google/internal/externalaccount/filecredsource.go
35 9 1
func parseINI()
in google/sdk.go
26 8 1
func()
in google/google.go
40 8 1
func()
in google/downscope/downscoping.go
53 8 1
func()
in google/internal/externalaccount/impersonate.go
43 8 1
func()
in google/internal/externalaccount/clientauth.go
19 8 1
func()
in token.go
21 7 1
func()
in clientcredentials/clientcredentials.go
28 7 1