- Ratio of number of lines with more than 80 columns over all lines :
R_80C - Ratio of source files with more than 100 lines orver all files :
R_100L - Nesting depth for each of
{},(),[]and<>:N$where$is{},(),[]or<>- Average nesting depth :
Avg_N$ - Maximum nesting depth :
Max_N$ - Ratio of nested blocks with Ndepth$ more than 4 over all nested blocks of the same type :
R_4N$
- Average nesting depth :
- Length of a sequence that appears X times for X > 1, multiplied by X (within min. edit distance < one third of the length of it) :
QX(Edit distance: add/remove/replace will count as 1 character edits)- Total QX for sequences with QX > 50 :
T_QX50 - Ratio of T_QX50 over total number of characters in source :
R_T_QX50
- Total QX for sequences with QX > 50 :
- Number of member functions in a class :
CFAvg_CFMax_CF- Ratio of classes with more than 6 member functions over all classes :
R_CF6
- Number of list items that are spearated by commas in a list : I
Avg_IMax_I- Ratio of lists with more than 3 items over all lists :
R_I3
R_80C< 0.1%R_100L< 5%Avg_N$< 4Max_N$< 6R_4N$< 10%R_T_QX50< 1%Avg_CF< 6Max_CF< 10R_CF6< 10%Avg_I< 3Max_I< 6R_I3< 20%
- Every single successful merge into the "main" branches MUST improve the metrics.
- No merge can make any of the metrics worse.
- If characteristics do not hold (i.e. codebase is not clean), a refactoring merge that improves two of the metrics by at least 50% (only in refactoring diff) must be done before doing a new merge. The refactoring merge needs to modify at least the same number of lines as the new merge.