(usage: string)
| 178 | // This catches format mismatches (e.g., <name>:<value> vs <name> <value>) |
| 179 | // without tripping on abbreviation differences (e.g., <sel> vs <selector>). |
| 180 | function skeleton(usage: string): string { |
| 181 | return usage |
| 182 | .replace(/\(.*?\)/g, '') // strip parenthetical hints like (e.g., Enter, Tab) |
| 183 | .replace(/<[^>]*>/g, '<>') // normalize <param-name> → <> |
| 184 | .replace(/\[[^\]]*\]/g, '[]') // normalize [optional] → [] |
| 185 | .replace(/\s+/g, ' ') // collapse whitespace |
| 186 | .trim(); |
| 187 | } |
| 188 | |
| 189 | // Cross-check Usage: patterns in implementation against COMMAND_DESCRIPTIONS |
| 190 | test('implementation Usage: structural format matches COMMAND_DESCRIPTIONS', () => { |
no outgoing calls
no test coverage detected