(value: string, name: string)
| 130 | } |
| 131 | |
| 132 | function validateCppIdentifier(value: string, name: string): string { |
| 133 | if (!/^[A-Z_a-z]\w*$/.test(value)) |
| 134 | throw new Error( |
| 135 | `${name} must be a valid C++ identifier (letters, digits, underscores, not starting with a digit): ${value}` |
| 136 | ); |
| 137 | return value; |
| 138 | } |
| 139 | |
| 140 | export function validateBasePath(value: string): string { |
| 141 | if (value === '') return value; |
no outgoing calls
no test coverage detected