Skip to content

Commit

Permalink
feat: report file position of warning
Browse files Browse the repository at this point in the history
  • Loading branch information
plantain-00 committed Apr 29, 2021
1 parent 1c4d74d commit 5fc20aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,8 @@ export function checkNode(node: ts.Node | undefined, context: FileContext): void
checkNode(node.name, context)
return
}
console.log(`warning: unhandled node kind: ${node.kind}`)
const { line, character } = ts.getLineAndCharacterOfPosition(context.sourceFile, node.getStart(context.sourceFile))
console.log(`warning: unhandled node kind: ${node.kind} in ${context.file}:${line + 1}:${character + 1}`)
}

const skippedNodeKinds = new Set([
Expand Down

0 comments on commit 5fc20aa

Please sign in to comment.