formatAnalysisResult method

String formatAnalysisResult(
  1. AnalysisResult result
)

Implementation

String formatAnalysisResult(AnalysisResult result) {
  final buffer = StringBuffer();

  // Header
  _writeHeader(buffer);

  // Overview
  _writeOverview(buffer, result);

  // Type breakdown with visual chart
  _writeTypeBreakdown(buffer, result);

  // Directory breakdown
  _writeDirectoryBreakdown(buffer, result);

  // Largest assets
  _writeLargestAssets(buffer, result);

  // Issues and suggestions
  if (result.hasIssues()) {
    _writeIssues(buffer, result);
  }

  return buffer.toString();
}