(itemId: string, baseMessage: string)
| 356 | } |
| 357 | |
| 358 | private enrichTopLevelError(itemId: string, baseMessage: string): string { |
| 359 | const msg = baseMessage.trim(); |
| 360 | if (msg === VALIDATION_MESSAGES.CHANGE_NO_DELTAS) { |
| 361 | return `${msg}. ${VALIDATION_MESSAGES.GUIDE_NO_DELTAS}`; |
| 362 | } |
| 363 | if (msg.includes('Spec must have a Purpose section') || msg.includes('Spec must have a Requirements section')) { |
| 364 | return `${msg}. ${VALIDATION_MESSAGES.GUIDE_MISSING_SPEC_SECTIONS}`; |
| 365 | } |
| 366 | if (msg.includes('Change must have a Why section') || msg.includes('Change must have a What Changes section')) { |
| 367 | return `${msg}. ${VALIDATION_MESSAGES.GUIDE_MISSING_CHANGE_SECTIONS}`; |
| 368 | } |
| 369 | return msg; |
| 370 | } |
| 371 | |
| 372 | private extractNameFromPath(filePath: string): string { |
| 373 | const normalizedPath = FileSystemUtils.toPosixPath(filePath); |
no outgoing calls
no test coverage detected