* Get file line count (for files under size limit)
(filePath: string)
| 119 | * Get file line count (for files under size limit) |
| 120 | */ |
| 121 | private async getFileLineCount(filePath: string): Promise<number | undefined> { |
| 122 | try { |
| 123 | const stats = await fs.stat(filePath); |
| 124 | if (stats.size < FILE_SIZE_LIMITS.LINE_COUNT_LIMIT) { |
| 125 | const content = await fs.readFile(filePath, 'utf8'); |
| 126 | return TextFileHandler.countLines(content); |
| 127 | } |
| 128 | } catch (error) { |
| 129 | // If we can't read the file, return undefined |
| 130 | } |
| 131 | return undefined; |
| 132 | } |
| 133 | |
| 134 | /** |
| 135 | * Generate enhanced status message |
no test coverage detected