(file)
| 133 | } |
| 134 | |
| 135 | async function lintFile(file) { |
| 136 | const text = await readFile(file, 'utf8'); |
| 137 | const blocks = extractBlocks(text); |
| 138 | const errors = []; |
| 139 | for (const block of blocks) { |
| 140 | try { |
| 141 | await mermaid.parse(block.body); |
| 142 | } catch (err) { |
| 143 | errors.push(formatError(err, file, block)); |
| 144 | } |
| 145 | } |
| 146 | return errors; |
| 147 | } |
| 148 | |
| 149 | async function main() { |
| 150 | const args = process.argv.slice(2); |
nothing calls this directly
no test coverage detected