File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ export async function analyzeCommand(options: AnalyzeOptions): Promise<void> {
207207
208208 // Categorize findings
209209 const topFindings = allFindings . slice ( 0 , options . top ) ;
210- const quickWins = allFindings . filter ( f => f . suggestedFix . autoFixable && f . confidence === 'high' ) ;
210+ const quickWins = allFindings . filter ( f => f . suggestedFix ? .autoFixable && f . confidence === 'high' ) ;
211211 const manualReview = allFindings . filter ( f => ! f . autoFixSafe || f . confidence !== 'high' ) ;
212212
213213 // Calculate percentage improvement
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export class ConsoleReporter {
6868
6969 // Quick Wins (unique, from otherFindings)
7070 const quickWins = otherFindings
71- . filter ( f => f . autoFixSafe || f . suggestedFix . autoFixable )
71+ . filter ( f => f . autoFixSafe || f . suggestedFix ? .autoFixable )
7272 . slice ( 0 , 5 ) ;
7373
7474 if ( quickWins . length > 0 ) {
@@ -173,9 +173,9 @@ export class ConsoleReporter {
173173 }
174174 }
175175
176- if ( finding . suggestedFix . autoFixable ) {
176+ if ( finding . suggestedFix ? .autoFixable ) {
177177 lines . push ( chalk . green ( ` Fix: ${ finding . suggestedFix . description } (auto-fixable)` ) ) ;
178- } else {
178+ } else if ( finding . suggestedFix ) {
179179 lines . push ( chalk . yellow ( ` Suggestion: ${ finding . suggestedFix . description } ` ) ) ;
180180 }
181181
@@ -187,7 +187,7 @@ export class ConsoleReporter {
187187
188188 for ( const finding of findings ) {
189189 const severityColor = this . getSeverityColor ( finding . severity ) ;
190- const autoFix = finding . suggestedFix . autoFixable ? chalk . green ( ' ✅' ) : '' ;
190+ const autoFix = finding . suggestedFix ? .autoFixable ? chalk . green ( ' ✅' ) : '' ;
191191 lines . push ( ` ${ severityColor ( '●' ) } ${ finding . title } ${ autoFix } ` ) ;
192192 }
193193
You can’t perform that action at this time.
0 commit comments