Closed bmaschio closed 7 years ago
That line calculates the length of the line to be highlighted in the text. We can apply two fixes:
issue.range = helpers.rangeFromLineNumber editor, lineStart
rangeFromLineNumber
, in which case we just do not modify issue
.About the second item: rangeFromLineNumber
seems to throw an Error
when it doesn't like our input:
https://github.com/steelbrain/atom-linter/blob/master/src/index.js
We could just catch that.
You might also look into why the invalid input is being generated in the first place 😉.
That check was put in there specifically to catch bugs in linters and has resulted in many fixes to ESLint stylelint and flake8 that I know of.
The following linter command gives a range error
issue.range = helpers.rangeFromLineNumber editor, lineStart, colStart
gives the following errorThis is given by the following reasons
I have removed the line above and it seems to have no negative effect on the behavior, what is the reason to have that line? Thanks Balint