* Format files grouped by the package that owns them
(
projectRoot: string,
files: { path: string; language: string; nodeCount: number }[],
includeMetadata: boolean
)
| 8846 | * Format files grouped by the package that owns them |
| 8847 | */ |
| 8848 | private formatFilesByPackage( |
| 8849 | projectRoot: string, |
| 8850 | files: { path: string; language: string; nodeCount: number }[], |
| 8851 | includeMetadata: boolean |
| 8852 | ): string { |
| 8853 | const groups = groupFilesByPackage(projectRoot, files); |
| 8854 | const lines: string[] = [`**${packageListingTitle(groups)}**`, '']; |
| 8855 | |
| 8856 | for (const group of groups) { |
| 8857 | lines.push(`**${packageGroupTitle(group)}**`); |
| 8858 | for (const file of group.files) { |
| 8859 | if (includeMetadata) { |
| 8860 | lines.push(`- ${file.path} (${file.language}, ${file.nodeCount} symbols)`); |
| 8861 | } else { |
| 8862 | lines.push(`- ${file.path}`); |
| 8863 | } |
| 8864 | } |
| 8865 | lines.push(''); |
| 8866 | } |
| 8867 | |
| 8868 | return lines.join('\n'); |
| 8869 | } |
| 8870 | |
| 8871 | /** |
| 8872 | * Format files as a tree structure |
no test coverage detected