reviewdog/action-eslint

Cannot read property 'split' of undefined [v1.10.0]

blaiseIT opened this issue · 4 comments

The latest version of action-eslint is failing on a mostly empty pull request. The test passes when forcing v1.9.0 but fails on v1.10.0.

Oops! Something went wrong! :(

ESLint: 7.5.0

TypeError: Cannot read property 'split' of undefined
    at /formatter.js:82:39
    at Array.forEach (<anonymous>)
    at module.exports (/formatter.js:79:11)
    at Object.format (/github/workspace/node_modules/eslint/lib/eslint/eslint.js:603:24)
    at printResults (/github/workspace/node_modules/eslint/lib/cli.js:176:30)
    at async Object.execute (/github/workspace/node_modules/eslint/lib/cli.js:307:13)
    at async main (/github/workspace/node_modules/eslint/bin/eslint.js:142:24)
reviewdog: parse error: failed to unmarshal rdjson (DiagnosticResult): proto: syntax error (line 1:1): unexpected token

v1.9.0: https://github.com/blaiseIT/olympus-backgammon-backend/runs/1306424049
v1.10.0: https://github.com/blaiseIT/olympus-backgammon-backend/runs/1306429926

I'm experiencing the same thing 🤔

If there are no errors, the "source" may not exist

at /formatter.js:82:39
const sourceLines = result.source.split('\n');

The same issue happens for me

Thanks for the report. I merged #50 and released a new version.