fmontesi / linter-jolie

A Jolie linter for Atom (via Atom Linter)
MIT License
1 stars 1 forks source link

Error if more then a file opened in Atom #6

Closed bmaschio closed 7 years ago

bmaschio commented 8 years ago

The following linter command gives a range error

issue.range = helpers.rangeFromLineNumber editor, lineStart, colStart gives the following error

image

This 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

fmontesi commented 8 years ago

That line calculates the length of the line to be highlighted in the text. We can apply two fixes:

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.

Arcanemagus commented 7 years ago

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.