(file: DeepnoteFile)
| 41 | } |
| 42 | |
| 43 | function computeStats(file: DeepnoteFile) { |
| 44 | // Use CLI's analysis function for consistency |
| 45 | const stats = computeProjectStats(file) |
| 46 | |
| 47 | // Convert block type summary to simple counts object for backwards compatibility |
| 48 | const blockCounts: Record<string, number> = {} |
| 49 | for (const bt of stats.blockTypesSummary) { |
| 50 | blockCounts[bt.type] = bt.count |
| 51 | } |
| 52 | |
| 53 | return { |
| 54 | totalLines: stats.totalLinesOfCode, |
| 55 | uniqueImports: stats.imports, |
| 56 | importCount: stats.imports.length, |
| 57 | blockCounts, |
| 58 | totalBlocks: stats.totalBlocks, |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | async function computeLintIssues(file: DeepnoteFile) { |
| 63 | // Use CLI's analysis function for consistency and comprehensive checks |
no test coverage detected