angular / dgeni-packages
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 263 units with 2,399 lines of code in units (45.6% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (54 lines of code)
    • 22 medium size units (726 lines of code)
    • 40 small units (603 lines of code)
    • 200 very small units (1,016 lines of code)
0% | 2% | 30% | 25% | 42%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 3% | 31% | 22% | 42%
ts0% | 0% | 26% | 30% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
base0% | 12% | 37% | 32% | 16%
jsdoc0% | 0% | 31% | 20% | 47%
typescript0% | 0% | 28% | 28% | 42%
ngdoc0% | 0% | 30% | 9% | 60%
dgeni0% | 0% | 29% | 24% | 45%
git0% | 0% | 36% | 38% | 25%
post-process-html0% | 0% | 0% | 60% | 39%
links0% | 0% | 0% | 67% | 32%
nunjucks0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
$process()
in base/processors/checkAnchorLinks.js
54 7 1
private addExportDocs()
in typescript/src/processors/readTypeScriptModules/index.ts
50 15 2
function createTagParser()
in jsdoc/processors/parse-tags.js
46 15 2
$process()
in jsdoc/processors/inline-tags.js
43 9 1
function getTypeStrings()
in jsdoc/services/transforms/extract-type.js
40 10 1
export function getExportDocType()
in typescript/src/services/TsParser/getExportDocType.ts
39 12 1
$process()
in ngdoc/processors/moduleDocs.js
39 11 1
export function getContent()
in typescript/src/services/TsParser/getContent.ts
38 14 2
$process()
in dgeni/processors/readPackageInfo.js
36 10 1
protected getMemberDocs()
in typescript/src/api-doc-types/ContainerExportDoc.ts
35 14 2
function createTagExtractor()
in jsdoc/processors/extract-tags.js
34 6 2
getFinder()
in base/services/templateFinder.js
33 4 0
function getSnapshotVersion()
in git/services/versionInfo.js
31 10 0
$process()
in ngdoc/processors/memberDocs.js
31 6 1
function extractAccessTransformImpl()
in jsdoc/services/transforms/extract-access.js
30 7 3
$process()
in base/processors/read-files.js
28 2 0
$process()
in base/processors/computeIds.js
27 6 1
parse()
in typescript/src/services/TsParser/index.ts
26 4 2
$process()
in jsdoc/processors/extractJSDocComments.js
26 4 1
$process()
in base/processors/computePaths.js
26 6 1