GerritCodeReview / plugins_codemirror-editor
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 21 units with 185 lines of code in units (55.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (22 lines of code)
    • 6 small units (87 lines of code)
    • 14 very small units (76 lines of code)
0% | 0% | 11% | 47% | 41%
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% | 12% | 48% | 39%
java0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
gr-editor0% | 0% | 12% | 48% | 39%
java/com/googlesource/gerrit/plugins/codemirror0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
getCodeMirrorParams()
in gr-editor/gr-editor.js
22 5 3
_initialize()
in gr-editor/codemirror-element.js
20 5 0
function importHref()
in gr-editor/gr-editor.js
18 4 3
_initializeMirror()
in gr-editor/gr-editor.js
15 1 0
_addEventListeners()
in gr-editor/codemirror-element.js
12 3 0
const errorListener = function()
in gr-editor/gr-editor.js
11 3 1
_addEventListeners()
in gr-editor/gr-editor.js
11 1 0
static get properties()
in gr-editor/gr-editor.js
10 1 0
const loadListener = function()
in gr-editor/gr-editor.js
9 2 1
static get template()
in gr-editor/gr-editor.js
8 1 0
function whenImportsReady()
in gr-editor/gr-editor.js
7 2 1
_importCodeMirror()
in gr-editor/gr-editor.js
7 1 0
static get properties()
in gr-editor/codemirror-element.js
5 1 0
protected void configure()
in java/com/googlesource/gerrit/plugins/codemirror/CodemirrorModule.java
4 1 0
const cleanup = function()
in gr-editor/gr-editor.js
4 1 0
connectedCallback()
in gr-editor/gr-editor.js
4 1 0
ready()
in gr-editor/codemirror-element.js
4 1 0
attached()
in gr-editor/codemirror-element.js
4 1 0
setParams()
in gr-editor/codemirror-element.js
4 1 1
static get is()
in gr-editor/gr-editor.js
3 1 0