|
| 1 | +colorizer: |
| 2 | + metrics: |
| 3 | + |
| 4 | + # Metrics of class |
| 5 | + class: |
| 6 | + |
| 7 | + # https://learn.microsoft.com/en-us/visualstudio/code-quality/code-metrics-class-coupling?view=vs-2022 |
| 8 | + # https://phpmd.org/rules/design.html#couplingbetweenobjects |
| 9 | + # https://pdepend.org/documentation/software-metrics/coupling-between-objects.html |
| 10 | + cbo: |
| 11 | + green: [ 0, 12 ], |
| 12 | + red+bold: [ 13, null ] |
| 13 | + |
| 14 | + # https://phpmd.org/rules/codesize.html#excessiveclasslength |
| 15 | + loc: |
| 16 | + green: [ 0, 999 ] |
| 17 | + red+bold: [ 1000, null ] |
| 18 | + |
| 19 | + # https://phpmd.org/rules/codesize.html#excessivepubliccount |
| 20 | + # https://pdepend.org/documentation/software-metrics/class-interface-size.html |
| 21 | + # https://pdepend.org/documentation/software-metrics/class-size.html |
| 22 | + cis: |
| 23 | + green: [ 0, 44 ] |
| 24 | + red+bold: [ 45, null ] |
| 25 | + |
| 26 | + # https://phpmd.org/rules/codesize.html#toomanymethods |
| 27 | + nom: |
| 28 | + green: [ 0, 24 ] |
| 29 | + red+bold: [ 25, null ] |
| 30 | + |
| 31 | + # https://phpmd.org/rules/codesize.html#toomanypublicmethods |
| 32 | + npm: |
| 33 | + green: [ 0, 9 ] |
| 34 | + red+bold: [ 10, null ] |
| 35 | + |
| 36 | + # https://phpmd.org/rules/codesize.html#toomanyfields |
| 37 | + vars: |
| 38 | + green: [ 0, 14 ], |
| 39 | + red+bold: [ 15, null ] |
| 40 | + |
| 41 | + # https://phpmd.org/rules/codesize.html#excessiveclasscomplexity |
| 42 | + # https://pdepend.org/documentation/software-metrics/weighted-method-count.html |
| 43 | + wmc: |
| 44 | + green: [ 0, 49 ] |
| 45 | + red+bold: [ 50, null ] |
| 46 | + |
| 47 | + # https://learn.microsoft.com/ru-ru/visualstudio/code-quality/code-metrics-depth-of-inheritance?view=vs-2022 |
| 48 | + # https://phpmd.org/rules/design.html#depthofinheritance |
| 49 | + dit: |
| 50 | + green: [ 0, 5 ] |
| 51 | + red+bold: [ 6, null ] |
| 52 | + |
| 53 | + # https://phpmd.org/rules/design.html#numberofchildren |
| 54 | + nocc: |
| 55 | + green: [ 0, 14 ] |
| 56 | + red+bold: [ 15, null ] |
| 57 | + |
| 58 | + # Metrics of method |
| 59 | + method: |
| 60 | + |
| 61 | + # https://learn.microsoft.com/ru-ru/visualstudio/code-quality/code-metrics-cyclomatic-complexity?view=vs-2022 |
| 62 | + # https://phpmd.org/rules/codesize.html#cyclomaticcomplexity |
| 63 | + ccn: |
| 64 | + green: [ 1, 7 ] |
| 65 | + yellow+bold: [ 8, 10 ] |
| 66 | + red+bold: [ 11, null ] |
| 67 | + |
| 68 | + # https://stackoverflow.com/questions/27954015/cyclomatic-complexity-and-variants |
| 69 | + ccn2: |
| 70 | + green: [ 1, 7 ] |
| 71 | + yellow+bold: [ 8, 10 ] |
| 72 | + red+bold: [ 11, null ] |
| 73 | + |
| 74 | + # https://phpmd.org/rules/codesize.html#npathcomplexity |
| 75 | + # https://modess.io/npath-complexity-cyclomatic-complexity-explained/ |
| 76 | + npath: |
| 77 | + green: [ 1, 199 ] |
| 78 | + red+bold: [ 200, null ] |
| 79 | + |
| 80 | + # https://learn.microsoft.com/en-us/visualstudio/code-quality/code-metrics-maintainability-index-range-and-meaning?view=vs-2022 |
| 81 | + # https://habr.com/en/articles/111524/ |
| 82 | + # https://forum.itvdn.com/t/o-chyom-govorit-metrika-maintainability-index/2423 |
| 83 | + # https://verifysoft.com/en_maintainability.html |
| 84 | + # https://www.ijert.org/research/maintainability-index-over-multiple-releases-a-case-study-php-open-source-software-IJERTV1IS6424.pdf |
| 85 | + mi: |
| 86 | + green: [ 60, 100 ] |
| 87 | + yellow+bold: [ 50, 60 ] |
| 88 | + red+bold: [ 0, 50 ] |
| 89 | + |
| 90 | + # https://phpmd.org/rules/codesize.html#excessivemethodlength |
| 91 | + loc: |
| 92 | + green: [ 0, 99 ] |
| 93 | + red+bold: [ 100, null ] |
| 94 | + |
| 95 | + # https://en.wikipedia.org/wiki/Halstead_complexity_measures |
| 96 | + hb: |
| 97 | + green: [ 0, 0.09 ] |
| 98 | + yellow+bold: [ 0.10, 0.19 ] |
| 99 | + red+bold: [ 0.20, null ] |
| 100 | + |
| 101 | + # https://en.wikipedia.org/wiki/Halstead_complexity_measures |
| 102 | + # https://github.com/escomplex/complexity-report/blob/master/.complexrc.example |
| 103 | + hd: |
| 104 | + green: [ 0, 15 ] |
| 105 | + yellow+bold: [ 15, 20 ] |
| 106 | + red+bold: [ 20, null ] |
| 107 | + |
| 108 | + # https://en.wikipedia.org/wiki/Halstead_complexity_measures |
| 109 | + hv: |
| 110 | + green: [ 0, 400 ] |
| 111 | + yellow+bold: [ 400, 500 ] |
| 112 | + red+bold: [ 500, null ] |
| 113 | + |
| 114 | + # https://en.wikipedia.org/wiki/Halstead_complexity_measures |
| 115 | + he: |
| 116 | + green: [ 0, 4000 ] |
| 117 | + yellow+bold: [ 4000, 5000 ] |
| 118 | + red+bold: [ 5000, null ] |
| 119 | + |
| 120 | + # https://www.artima.com/weblogs/viewpost.jsp?thread=210575 |
| 121 | + # https://stackoverflow.com/questions/4731774/how-to-read-improve-c-r-a-p-index-calculated-by-php |
| 122 | + crap0: |
| 123 | + green: [ 0, 29 ] |
0 commit comments