(p: T)
| 46 | } |
| 47 | |
| 48 | export function insertWorkspaceName<T extends string | undefined>(p: T): string | (undefined extends T ? undefined : never) { |
| 49 | if (typeof p !== "string") |
| 50 | return undefined as (undefined extends T ? undefined : never); |
| 51 | |
| 52 | return p.replace(/\${workspaceName}/ig, filenameSafe(workspace.name ?? "unnamed-workspace")); |
| 53 | } |
| 54 | |
| 55 | export function isAnalyzable(file: { uri: Uri, isUntitled?: boolean, languageId?: string }): boolean { |
| 56 | if (file.isUntitled || !fsPath(file.uri) || file.uri.scheme !== "file") |
no test coverage detected