projen / projen-go
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 2,747 units with 29,207 lines of code in units (79.2% of code).
    • 14 very long units (5,048 lines of code)
    • 1 long units (80 lines of code)
    • 1 medium size units (34 lines of code)
    • 211 small units (2,330 lines of code)
    • 2,520 very small units (21,715 lines of code)
17% | <1% | <1% | 7% | 74%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go17% | <1% | <1% | 7% | 74%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
projen21% | 0% | 0% | 7% | 71%
projen/awscdk13% | 0% | 0% | 9% | 77%
projen/github31% | 0% | 0% | 3% | 65%
projen/web12% | 0% | 0% | 9% | 78%
projen/javascript21% | 0% | 0% | 9% | 68%
projen/python20% | 0% | 0% | 1% | 77%
projen/typescript11% | 0% | 0% | 9% | 78%
projen/gitlab29% | 0% | 0% | 9% | 61%
projen/cdk13% | 0% | 0% | 9% | 77%
projen/cdk8s11% | 0% | 0% | 9% | 79%
projen/java19% | 0% | 0% | 1% | 79%
projen/release30% | 0% | 0% | 9% | 59%
projen/cdktf11% | 0% | 0% | 9% | 78%
projen/vscode0% | 27% | 0% | 11% | 60%
projen/build0% | 0% | 27% | 8% | 63%
projen/jsii0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
func init()
in projen/projen.init.go
1001 1 0
func init()
in projen/awscdk/awscdk.init.go
606 1 0
func init()
in projen/javascript/javascript.init.go
492 1 0
func init()
in projen/web/web.init.go
492 1 0
func init()
in projen/github/github.init.go
377 1 0
func init()
in projen/python/python.init.go
336 1 0
func init()
in projen/typescript/typescript.init.go
325 1 0
func init()
in projen/gitlab/gitlab.init.go
321 1 0
func init()
in projen/cdk/cdk.init.go
243 1 0
func init()
in projen/cdk8s/cdk8s.init.go
208 1 0
func init()
in projen/java/java.init.go
207 1 0
func init()
in projen/github/workflows/workflows.init.go
199 1 0
func init()
in projen/release/release.init.go
139 1 0
func init()
in projen/cdktf/cdktf.init.go
102 1 0
func init()
in projen/vscode/vscode.init.go
80 1 0
func init()
in projen/build/build.init.go
34 1 0
func()
in projen/projen.go
14 2 1
func()
in projen/projen.go
14 2 1
func()
in projen/github/github.go
14 2 1
func()
in projen/vscode/vscode.go
11 2 1