Commit 40d9f63
committed
Scale complexity based on overage
This mimics the algorithm from Classic analysis to determine the
remediation points for a complex function. The formula is
baseCost + (costPer * (score - threshold))
With this, a complexity score at the threshold will be 1,000,000 points,
with 100,000 points for every additional branch within the function.1 parent ca37389 commit 40d9f63
2 files changed
+25
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
30 | 52 | | |
31 | | - | |
| 53 | + | |
| 54 | + | |
32 | 55 | | |
0 commit comments