(argNode: SyntaxNode, source: string)
| 36 | } |
| 37 | |
| 38 | function getStaticImportPath(argNode: SyntaxNode, source: string): string | null { |
| 39 | let current = argNode; |
| 40 | while (current.type === 'parenthesized_expression') { |
| 41 | const inner = current.namedChild(0); |
| 42 | if (!inner) break; |
| 43 | current = inner; |
| 44 | } |
| 45 | |
| 46 | let text = getNodeText(current, source).trim(); |
| 47 | if ( |
| 48 | ((text.startsWith('"') && text.endsWith('"')) || |
| 49 | (text.startsWith("'") && text.endsWith("'"))) && |
| 50 | text.length >= 2 |
| 51 | ) { |
| 52 | text = text.slice(1, -1); |
| 53 | } |
| 54 | |
| 55 | return isStaticProjectPath(text) ? text : null; |
| 56 | } |
| 57 | |
| 58 | function isReturnedAttrsetMember(node: SyntaxNode): boolean { |
| 59 | let current: SyntaxNode | null = node; |
no test coverage detected