diff --git a/pkg/cli/compile_batch_operations.go b/pkg/cli/compile_batch_operations.go index 3977625f316..aefaa496f94 100644 --- a/pkg/cli/compile_batch_operations.go +++ b/pkg/cli/compile_batch_operations.go @@ -136,8 +136,6 @@ func purgeOrphanedLockFiles(workflowsDir string, expectedLockFiles []string, ver if verbose { fmt.Fprintln(os.Stderr, console.FormatSuccessMessage(fmt.Sprintf("Purged %d orphaned .lock.yml files", len(orphanedFiles)))) } - } else if verbose { - fmt.Fprintln(os.Stderr, console.FormatInfoMessage("No orphaned .lock.yml files found to purge")) } compileBatchOperationsLog.Printf("Purged %d orphaned lock files", len(orphanedFiles)) diff --git a/pkg/cli/compile_stats.go b/pkg/cli/compile_stats.go index f3c76c594e3..722b7f6ea7f 100644 --- a/pkg/cli/compile_stats.go +++ b/pkg/cli/compile_stats.go @@ -93,12 +93,12 @@ func collectWorkflowStats(lockFilePath string) (*WorkflowStats, error) { // displayStatsTable displays workflow statistics in a sorted table func displayStatsTable(statsList []*WorkflowStats) { - compileStatsLog.Printf("Displaying stats table: workflow_count=%d", len(statsList)) if len(statsList) == 0 { - fmt.Fprintln(os.Stderr, console.FormatWarningMessage("No workflow statistics to display")) return } + compileStatsLog.Printf("Displaying stats table: workflow_count=%d", len(statsList)) + // Sort by file size (descending) sort.Slice(statsList, func(i, j int) bool { return statsList[i].FileSize > statsList[j].FileSize diff --git a/pkg/cli/compile_stats_test.go b/pkg/cli/compile_stats_test.go index b78e1414206..1f2a2e56158 100644 --- a/pkg/cli/compile_stats_test.go +++ b/pkg/cli/compile_stats_test.go @@ -26,8 +26,8 @@ func TestDisplayStatsTable_Empty(t *testing.T) { buf.ReadFrom(r) output := buf.String() - if !strings.Contains(output, "No workflow statistics to display") { - t.Errorf("Expected warning message for empty stats list, got: %s", output) + if output != "" { + t.Errorf("Expected no output for empty stats list, got: %s", output) } }