@@ -253,9 +253,9 @@ export function generateAuditManifest(
253253 }
254254
255255 // Check #3: Dependencies per Symbol
256- if ( napiConfig . metrics ?. symbol ?. [ metricDependencyCount ] ) {
256+ if ( napiConfig . metrics ?. symbol ?. maxDependency ) {
257257 const value = symbol . metrics [ metricDependencyCount ] ;
258- const target = napiConfig . metrics . symbol [ metricDependencyCount ] ;
258+ const target = napiConfig . metrics . symbol . maxDependency ;
259259 if ( value > target ) {
260260 const alert : AuditAlert = {
261261 metric : metricDependencyCount ,
@@ -270,9 +270,9 @@ export function generateAuditManifest(
270270 symbolAuditManifest . alerts [ metricDependencyCount ] = alert ;
271271 }
272272 }
273- if ( napiConfig . metrics ?. symbol ?. [ metricDependentCount ] ) {
273+ if ( napiConfig . metrics ?. symbol ?. maxDependent ) {
274274 const value = symbol . metrics [ metricDependentCount ] ;
275- const target = napiConfig . metrics . symbol [ metricDependentCount ] ;
275+ const target = napiConfig . metrics . symbol . maxDependent ;
276276 if ( value > target ) {
277277 const alert : AuditAlert = {
278278 metric : metricDependentCount ,
@@ -289,9 +289,9 @@ export function generateAuditManifest(
289289 }
290290
291291 // Check #4: Cyclomatic Complexity
292- if ( napiConfig . metrics ?. symbol ?. [ metricCyclomaticComplexity ] ) {
292+ if ( napiConfig . metrics ?. symbol ?. maxCyclomaticComplexity ) {
293293 const value = symbol . metrics [ metricCyclomaticComplexity ] ;
294- const target = napiConfig . metrics . symbol [ metricCyclomaticComplexity ] ;
294+ const target = napiConfig . metrics . symbol . maxCyclomaticComplexity ;
295295 if ( value > target ) {
296296 const alert : AuditAlert = {
297297 metric : metricCyclomaticComplexity ,
0 commit comments