{"push_id":1249657539,"size":1,"distinct_size":1,"ref":"refs/heads/check-invalid-source","head":"a6fa4fc4eb4fd517c2bfacabb542e99cef21f2df","before":"776c49d6f554c51f07c397aed9427f9162bb5754","commits":[{"sha":"a6fa4fc4eb4fd517c2bfacabb542e99cef21f2df","author":{"name":"rhysd","email":"c15d1d0d4d055b71064da63090ac98134d322f7c@yahoo.co.jp"},"message":"Improve an error message on invalid source file\n\nWhen input file is not a TypeScript code, `getSourceFile()` returns\n`undefined` but tslint doesn't handle it properly.  As the result,\ntslint raises an error which is not easy to understand when invalid\nsoruce file is passed.\n\n```\n$ tslint mocha.opts\n```\n\nIt raised below error:\n\n```\n/path/to/node_modules/tslint/lib/language/walker/ruleWalker.js:18\n        this.limit = this.sourceFile.getFullWidth();\n```\n\nI improved this error message by checking returned value from\n`getSourceFile` is valid or not.\nImproved error message is below:\n\n```\nError: Invalid source code: test/mocha.opts\n```\n\nI didn't write a test for this yet because I couldn't find where I\nshould add tests for `src/tslint.ts`.","distinct":true,"url":"https://api.github.com/repos/rhysd/tslint/commits/a6fa4fc4eb4fd517c2bfacabb542e99cef21f2df"}]}
{"actor":{"display_login":"rhysd"}}