10000 Merge pull request #40 from codeclimate/pb-fix · codeclimate/codeclimate-fixme@493aff8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 493aff8

Browse files
authored
Merge pull request #40 from codeclimate/pb-fix
Ignore unparsable stdout
2 parents ce2b15a + 38d83ab commit 493aff8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/fix-me.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ FixMe.prototype.find = function(paths, strings, callback) {
4444
var path = parts[0].replace(/^\/code\//, '');
4545
var lineNumber = parseInt(parts[1], 10);
4646
var matchedString = parts[2];
47+
48+
if (!path || !lineNumber || !matchedString) {
49+
process.stderr.write("Ignoring malformed output: " + line + "\n");
50+
return;
51+
}
52+
4753
var issue = {
4854
'categories': ['Bug Risk'],
4955
'check_name': matchedString,

0 commit comments

Comments
 (0)
0