@@ -297,7 +297,7 @@ xychart-beta
297297
298298---
299299
300- ### Issue Penalty Scoring Details
300+ ### Issue Penalty Scoring
301301
302302Combines threshold limits with diagnostic penalties for comprehensive scoring.
303303
@@ -341,21 +341,37 @@ Bundle size + ESLint errors, page load time + accessibility warnings, complexity
341341| ` we ` | Weight per error (default 1) |
342342| ` ww ` | Weight per warning (default 0.5) |
343343
344- $$ \text{thresholdScore} = \begin{cases} 1, & S \leq M \\[4pt] \max(0, 1 - \frac{S-M}{M}), & S > M \end{cases} $$
344+ ##### Size score
345345
346- $$ \text{penalty} = w_e \times E + w_w \times W $$
346+ $`
347+ \mathrm{sizeScore} =
348+ \begin{cases}
349+ 1, & S \le M\\ [ 6pt]
350+ \max\bigl(0,\; 1 - \tfrac{S - M}{M}\bigr), & S > M
351+ \end{cases}
352+ `$
347353
348- $$ \text{finalScore} = \max\left(0, \text{thresholdScore} - \frac{\text{penalty}}{w_e + w_w}\right) $$
354+ ##### Issues penalty
355+
356+ $`
357+ \mathrm{penalty} = we \times E \; +\; ww \times W
358+ `$
359+
360+ ##### Final blended score
361+
362+ $`
363+ \mathrm{finalScore} = \max\! \Bigl(0,\; \mathrm{sizeScore} - \frac{\mathrm{penalty}}{we + ww}\Bigr)
364+ `$
349365
350366** Example:** Value=15 (threshold: 10), 1 error, 2 warnings → thresholdScore = 0.5, penalty = 2, finalScore = 0
351367
352368** Chart:**
353369
354370``` mermaid
355371xychart-beta
356- title "Issue Penalty Score (M=10, 1 error, 2 warnings )"
357- x-axis "Value" [0,2,4,6,8,10,12,14,16,18,20 ]
372+ title "Score vs Artifact Size (with penalty shift )"
373+ x-axis [0, 1, 1.25, 1.5, 1.75, 2 ]
358374 y-axis "Score" 0 --> 1
359- line "Threshold Only" [1,1,1,1,1,1,0.83,0.71,0.6,0.5,0.4 ]
360- line "With Penalties" [0,0,0,0,0,0,0,0,0,0, 0]
375+ line Original [1, 1, 0.75, 0.5, 0.25, 0 ]
376+ line Penalized [0.5, 0.5, 0.25, 0, 0, 0]
361377```
0 commit comments