angular / tsickle
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 225 units with 4,231 lines of code in units (80.1% of code).
    • 3 very long units (313 lines of code)
    • 18 long units (1,300 lines of code)
    • 39 medium size units (1,202 lines of code)
    • 55 small units (801 lines of code)
    • 110 very small units (615 lines of code)
7% | 30% | 28% | 18% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts7% | 30% | 28% | 18% | 14%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src7% | 30% | 28% | 18% | 14%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function emit()
in src/tsickle.ts
107 21 7
function visitFunctionLikeDeclaration()
in src/jsdoc_transformer.ts
104 23 1
private translateAnonymousType()
in src/type_translator.ts
102 27 1
function createMemberTypeDeclaration()
in src/jsdoc_transformer.ts
98 28 2
93 24 3
function writeType()
in src/externs.ts
91 24 2
91 20 4
90 25 3
private extractTsmesStatement()
in src/ts_migration_exports_shim.ts
88 20 0
function visitor()
in src/enum_transformer.ts
80 15 1
export function transformFileoverviewCommentFactory()
in src/fileoverview_comment_transformer.ts
66 18 2
function visitor()
in src/jsdoc_transformer.ts
65 30 1
function visitExportDeclaration()
in src/jsdoc_transformer.ts
64 19 1
function transformClassDeclaration()
in src/decorator_downlevel_transformer.ts
64 18 1
63 19 1
private extractGoogExports()
in src/ts_migration_exports_shim.ts
61 13 1
function transformClassElement()
in src/decorator_downlevel_transformer.ts
60 12 1
function visitVariableStatement()
in src/jsdoc_transformer.ts
59 13 1
private translateObject()
in src/type_translator.ts
58 20 1
export function typeToDebugString()
in src/type_translator.ts
57 11 1