microsoft / cla-assistant
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 336 units with 5,485 lines of code in units (58.3% of code).
    • 2 very long units (1,499 lines of code)
    • 4 long units (315 lines of code)
    • 59 medium size units (1,762 lines of code)
    • 68 small units (976 lines of code)
    • 203 very small units (933 lines of code)
27% | 5% | 32% | 17% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js27% | 5% | 32% | 17% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/client/assets98% | 0% | 0% | <1% | <1%
src/server/services8% | 15% | 48% | 15% | 10%
ROOT0% | 100% | 0% | 0% | 0%
src/server/api0% | 0% | 66% | 21% | 12%
src/client/controller0% | 0% | 18% | 40% | 41%
src/server/webhooks0% | 0% | 80% | 11% | 8%
src/server/middleware0% | 0% | 77% | 8% | 14%
src/client0% | 0% | 38% | 29% | 31%
src/client/services0% | 0% | 65% | 14% | 19%
src/server/passports0% | 0% | 52% | 27% | 19%
src/client/modals0% | 0% | 13% | 29% | 57%
src/server/graphQueries0% | 0% | 55% | 30% | 14%
src/server/controller0% | 0% | 50% | 0% | 50%
src/server0% | 0% | 0% | 83% | 16%
src/server/documents0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
(function (compId)()
in src/client/assets/js/CLA_signature_MouseOver_edge.js
1382 2 1
async checkPullRequestSignatures()
in src/server/services/cla.js
117 29 2
99 1 1
async getPRCommitters()
in src/server/services/repo.js
99 31 1
module.exports = function()
in src/server/services/url.js
64 11 0
async getAll()
in src/server/services/cla.js
53 13 1
async function updateStatusAndComment()
in src/server/webhooks/pull_request.js
48 20 2
function()
in src/client/app.js
47 1 3
async validateAllPullRequests()
in src/server/api/cla.js
45 7 2
async getSignedCLA()
in src/server/services/cla.js
45 5 1
async badgeComment()
in src/server/services/pullRequest.js
45 12 5
function storeRequest()
in src/server/webhooks/pull_request.js
43 11 4
async sign()
in src/server/services/cla.js
41 7 2
function()
in src/client/controller/cla.js
38 9 12
getGistContent: function()
in src/client/services/utils.js
36 5 4
async function checkToken()
in src/server/passports/github.js
36 10 2
getCustomFields()
in src/client/controller/settings.js
35 10 4
create: async()
in src/server/api/repo.js
35 10 1
$scope.link = function()
in src/client/controller/home.js
34 8 0
async countCLA()
in src/server/api/cla.js
34 14 1