|
| 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, 13 ] |
| 12 | + red+bold: [ 14, null ] |
| 13 | + |
| 14 | + # https://phpmd.org/rules/codesize.html#excessiveclasslength |
| 15 | + loc: |
| 16 | + green: [ 0, 1000 ] |
| 17 | + red+bold: [ 1001, 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, 45 ] |
| 24 | + red+bold: [ 46, null ] |
| 25 | + |
| 26 | + # https://phpmd.org/rules/codesize.html#toomanymethods |
| 27 | + nom: |
| 28 | + green: [ 0, 25 ] |
| 29 | + red+bold: [ 26, null ] |
| 30 | + |
| 31 | + # https://phpmd.org/rules/codesize.html#toomanypublicmethods |
| 32 | + npm: |
| 33 | + green: [ 0, 20 ] |
| 34 | + red+bold: [ 21, null ] |
| 35 | + |
| 36 | + # https://phpmd.org/rules/codesize.html#toomanyfields |
| 37 | + vars: |
| 38 | + green: [ 0, 15 ] |
| 39 | + red+bold: [ 16, 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, 50 ] |
| 45 | + red+bold: [ 51, 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, 6 ] |
| 51 | + red+bold: [ 7, null ] |
| 52 | + |
| 53 | + # https://phpmd.org/rules/design.html#numberofchildren |
| 54 | + nocc: |
| 55 | + green: [ 0, 15 ] |
| 56 | + red+bold: [ 16, 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, 200 ] |
| 78 | + red+bold: [ 201, 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, 100 ] |
| 93 | + red+bold: [ 101, null ] |
| 94 | + |
| 95 | + # https://en.wikipedia.org/wiki/Halstead_complexity_measures |
| 96 | + hb: |
| 97 | + green: [ 0, 0.09 ] |
| 98 | + yellow+bold: [ 0.10, null ] |
| 99 | + |
| 100 | + # https://en.wikipedia.org/wiki/Halstead_complexity_measures |
| 101 | + # https://github.com/escomplex/complexity-report/blob/master/.complexrc.example |
| 102 | + hd: |
| 103 | + green: [ 0, 20 ] |
| 104 | + yellow+bold: [ 20, null ] |
| 105 | + |
| 106 | + # https://en.wikipedia.org/wiki/Halstead_complexity_measures |
| 107 | + hv: |
| 108 | + green: [ 0, 400 ] |
| 109 | + yellow+bold: [ 400, null ] |
| 110 | + |
| 111 | + # https://en.wikipedia.org/wiki/Halstead_complexity_measures |
| 112 | + he: |
| 113 | + green: [ 0, 5000 ] |
| 114 | + yellow+bold: [ 5000, null ] |
| 115 | + |
| 116 | + # https://www.artima.com/weblogs/viewpost.jsp?thread=210575 |
| 117 | + # https://stackoverflow.com/questions/4731774/how-to-read-improve-c-r-a-p-index-calculated-by-php |
| 118 | + crap0: |
| 119 | + green: [ 0, 29 ] |
| 120 | + yellow+bold: [ 30, null ] |
0 commit comments