( _program: Command )
| 52 | * Creates the analyze action - comprehensive project analysis. |
| 53 | */ |
| 54 | export function createAnalyzeAction( |
| 55 | _program: Command |
| 56 | ): (path: string | undefined, options: AnalyzeOptions) => Promise<void> { |
| 57 | return async (path, options) => { |
| 58 | try { |
| 59 | debug(`Analyzing: ${path}`) |
| 60 | const result = await analyzeFile(path, options) |
| 61 | outputAnalysis(result, options) |
| 62 | } catch (error) { |
| 63 | handleError(error, options) |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | async function analyzeFile(path: string | undefined, options: AnalyzeOptions): Promise<AnalyzeResult> { |
| 69 | const { absolutePath } = await resolvePathToDeepnoteFile(path) |
no test coverage detected