(file: DeepnoteFile)
| 60 | } |
| 61 | |
| 62 | async function computeLintIssues(file: DeepnoteFile) { |
| 63 | // Use CLI's analysis function for consistency and comprehensive checks |
| 64 | try { |
| 65 | const { lint } = await checkForIssues(file) |
| 66 | return lint.issues.map(issue => ({ |
| 67 | severity: issue.severity, |
| 68 | message: issue.message, |
| 69 | notebook: issue.notebookName, |
| 70 | blockId: issue.blockId, |
| 71 | })) |
| 72 | } catch (error) { |
| 73 | // Return a generic error if analysis fails |
| 74 | return [ |
| 75 | { |
| 76 | severity: 'warning' as const, |
| 77 | message: `Could not analyze: ${error instanceof Error ? error.message : String(error)}`, |
| 78 | }, |
| 79 | ] |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | async function computeDagInfo(file: DeepnoteFile, notebookFilter?: string) { |
| 84 | const dagInfo: Array<{ |
no test coverage detected