GerritCodeReview / plugins_startblock
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 30 units with 248 lines of code in units (78.0% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (82 lines of code)
    • 0 medium size units (0 lines of code)
    • 4 small units (60 lines of code)
    • 25 very small units (106 lines of code)
0% | 33% | 0% | 24% | 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% | 40% | 0% | 16% | 43%
java0% | 0% | 0% | 61% | 38%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ui0% | 40% | 0% | 16% | 43%
javatests/com/google/gerrit/plugins/startblock0% | 0% | 0% | 76% | 23%
java/com/google/gerrit/plugins/startblock0% | 0% | 0% | 47% | 52%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
static get template()
in ui/plugin.js
82 1 0
19 1 0
public void blocksWhenBlockSubmissionHashtagIsPresent()
in javatests/com/google/gerrit/plugins/startblock/BlockSubmissionHashtagRuleIT.java
16 1 0
checkIfValid()
in ui/rules.js
14 8 0
private Optional notReady()
in java/com/google/gerrit/plugins/startblock/BlockSubmissionHashtagRule.java
11 1 0
9 3 1
_computeRules()
in ui/plugin.js
8 1 1
removeRule()
in ui/plugin.js
7 2 1
toString()
in ui/rules.js
6 4 1
public Optional evaluate()
in java/com/google/gerrit/plugins/startblock/BlockSubmissionHashtagRule.java
6 2 1
constructor()
in ui/rules.js
5 1 2
_addSelectedRule()
in ui/plugin.js
5 1 0
5 1 1
public void doesNothingByDefault()
in javatests/com/google/gerrit/plugins/startblock/BlockSubmissionHashtagRuleIT.java
5 1 0
setUpAutoSubmit()
in ui/plugin.js
4 1 0
_confirmRules()
in ui/plugin.js
4 1 0
get description()
in ui/rules.js
3 1 0
get inputs()
in ui/rules.js
3 1 0
get format()
in ui/rules.js
3 1 0
format()
in ui/rules.js
3 2 1