(filePath: string)
| 370 | } |
| 371 | |
| 372 | private extractNameFromPath(filePath: string): string { |
| 373 | const normalizedPath = FileSystemUtils.toPosixPath(filePath); |
| 374 | const parts = normalizedPath.split('/'); |
| 375 | |
| 376 | // Look for the directory name after 'specs' or 'changes' |
| 377 | for (let i = parts.length - 1; i >= 0; i--) { |
| 378 | if (parts[i] === 'specs' || parts[i] === 'changes') { |
| 379 | if (i < parts.length - 1) { |
| 380 | return parts[i + 1]; |
| 381 | } |
| 382 | } |
| 383 | } |
| 384 | |
| 385 | // Fallback to filename without extension if not in expected structure |
| 386 | const fileName = parts[parts.length - 1] ?? ''; |
| 387 | const dotIndex = fileName.lastIndexOf('.'); |
| 388 | return dotIndex > 0 ? fileName.slice(0, dotIndex) : fileName; |
| 389 | } |
| 390 | |
| 391 | private createReport(issues: ValidationIssue[]): ValidationReport { |
| 392 | const errors = issues.filter(i => i.level === 'ERROR').length; |
no test coverage detected