* Format files grouped by the package that owns them
(
projectRoot: string,
files: { path: string; language: string; nodeCount: number }[],
includeMetadata: boolean
)
| 9019 | * Format files grouped by the package that owns them |
| 9020 | */ |
| 9021 | private formatFilesByPackage( |
| 9022 | projectRoot: string, |
| 9023 | files: { path: string; language: string; nodeCount: number }[], |
| 9024 | includeMetadata: boolean |
| 9025 | ): string { |
| 9026 | const groups = groupFilesByPackage(projectRoot, files); |
| 9027 | const lines: string[] = [`**${packageListingTitle(groups)}**`, '']; |
| 9028 | |
| 9029 | for (const group of groups) { |
| 9030 | lines.push(`**${packageGroupTitle(group)}**`); |
| 9031 | for (const file of group.files) { |
| 9032 | if (includeMetadata) { |
| 9033 | lines.push(`- ${file.path} (${file.language}, ${file.nodeCount} symbols)`); |
| 9034 | } else { |
| 9035 | lines.push(`- ${file.path}`); |
| 9036 | } |
| 9037 | } |
| 9038 | lines.push(''); |
| 9039 | } |
| 9040 | |
| 9041 | return lines.join('\n'); |
| 9042 | } |
| 9043 | |
| 9044 | /** |
| 9045 | * Format files as a tree structure |
no test coverage detected