microsoft / grunt-generate-license-data
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 17 units with 330 lines of code in units (103.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 7 medium size units (231 lines of code)
    • 6 small units (81 lines of code)
    • 4 very small units (18 lines of code)
0% | 0% | 70% | 24% | 5%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 70% | 24% | 5%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tasks0% | 0% | 69% | 22% | 8%
ROOT0% | 0% | 100% | 0% | 0%
lib0% | 0% | 51% | 48% | 0%
Alternative Visuals
Longest Units
Top 17 longest units
Unit# linesMcCabe index# params
function createNodeLicenseEntry()
in tasks/generate-license-data.js
42 8 8
41 1 1
function accumulateNodeLicenses()
in tasks/generate-license-data.js
39 6 4
module.exports = function()
in lib/LicenseFinder.js
33 1 1
function exportToCsv()
in tasks/generate-license-data.js
29 5 2
url: findNodeHomepage()
in tasks/generate-license-data.js
24 3 4
function findNodeLicense()
in tasks/generate-license-data.js
23 4 4
function discoverLicense()
in lib/LicenseFinder.js
19 6 4
function exportAppRoots()
in tasks/generate-license-data.js
16 2 3
function extractLicenseName()
in lib/LicenseFinder.js
12 3 1
function nodeTreeWalkUp()
in tasks/generate-license-data.js
12 4 2
function findAttribute()
in tasks/generate-license-data.js
11 3 2
function findNodeHomepage()
in tasks/generate-license-data.js
11 4 4
license: findNodeLicense()
in tasks/generate-license-data.js
7 3 4
function nodePackageExists()
in tasks/generate-license-data.js
4 1 2
function findNodeAttribute()
in tasks/generate-license-data.js
4 1 3
module.exports = function()
in tasks/generate-license-data.js
3 3 1