golang / oauth2
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 127 units with 1,977 lines of code in units (63.5% of code).
    • 0 very long units (0 lines of code)
    • 6 long units (368 lines of code)
    • 29 medium size units (886 lines of code)
    • 26 small units (386 lines of code)
    • 66 very small units (337 lines of code)
0% | 18% | 44% | 19% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 18% | 44% | 19% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
google0% | 15% | 60% | 11% | 13%
jwt0% | 93% | 0% | 0% | 6%
internal0% | 28% | 14% | 35% | 20%
jira0% | 70% | 0% | 22% | 7%
ROOT0% | 0% | 27% | 46% | 26%
jws0% | 0% | 35% | 47% | 16%
clientcredentials0% | 0% | 68% | 0% | 31%
hipchat0% | 0% | 77% | 0% | 22%
authhandler0% | 0% | 0% | 78% | 21%
endpoints0% | 0% | 0% | 0% | 100%
microsoft0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func()
in jwt/jwt.go
80 15 1
func NewSDKConfig()
in google/sdk.go
66 16 1
func()
in google/google.go
61 11 1
func()
in jira/jira.go
54 9 1
func doTokenRoundTrip()
in internal/token.go
54 9 2
func()
in google/downscope/downscoping.go
53 8 1
func()
in google/internal/externalaccount/basecredentials.go
49 9 1
func exchangeToken()
in google/internal/externalaccount/sts_exchange.go
48 10 6
func()
in google/internal/externalaccount/aws.go
47 10 1
func()
in google/internal/externalaccount/urlcredsource.go
46 12 1
func()
in google/internal/externalaccount/impersonate.go
43 8 1
func()
in google/google.go
40 8 1
func ConfigFromJSON()
in google/google.go
38 5 2
func()
in google/internal/externalaccount/filecredsource.go
35 9 1
func()
in google/internal/externalaccount/basecredentials.go
34 7 1
func()
in jws/jws.go
32 9 1
32 7 2
func()
in google/internal/externalaccount/aws.go
32 9 1
func()
in clientcredentials/clientcredentials.go
28 7 1
func RetrieveToken()
in internal/token.go
28 10 6