ricardofbarros / linter-js-standard

Atom linter plugin for JavaScript, using JavaScript Standard Style
https://atom.io/packages/linter-js-standard
MIT License
99 stars 48 forks source link

Only one lint error showing at a time #11

Closed skkeeper closed 9 years ago

skkeeper commented 9 years ago

I'm new to Atom so I might be missing something, but after installing the "linter" and "linter-js-standard" packages and opening a javascript file I only get one linter error at a time.

So if I have a file with semicolons all over the place it only marks the first until I fix it and so on.

I've tried this in two different machines and can provide more info if needed.

ricardofbarros commented 9 years ago

Maybe you have a syntax error? Unexpected *something*

When Standard catches a syntax error it stops linting.

ricardofbarros commented 9 years ago

Could you send a screenshot?

skkeeper commented 9 years ago

Just to be safe I did a clean reinstall of Atom and just installed the packages I mention and I still have this issue.

Both machines I've tested run Windows 7 64 bits and the most recent version of Atom.

I've taken this screenshot with code that runs fine with Node.

http://i.imgur.com/AGZDOOW.png

Notice how there is only one error highlighted when if I run the CLI tool there are multiple.

ricardofbarros commented 9 years ago

Hmm nice catch this could be an issue with the regex because in windows you have [Driver Letter]:\ ..., nice catch :smile: I will review shortly the regex to take in account the windows users.

ricardofbarros commented 9 years ago

Hmm strange the regex works fine on windows, but this is certainly an issue on windows users, I'll try to look into this very soon.

ricardofbarros commented 9 years ago

btw,

brotip: you can drag your screenshot into the input text box and it will automatically upload your screenshot.

skkeeper commented 9 years ago

Thanks I'll keep it in mind in any future reports.

Also if you need me to test any potential fix let me know.

skkeeper commented 9 years ago

Take this with a huge grain of salt since I'm not familiar with Atom plugin development or coffeescript. With that said I don't think it's the regex code, I've been stepping through the Linter class and comparing the output from stdout from your plugin and linter-jshint. What I found is that in your plugin on my system the output only includes the first line coming out of the linter while on linter-jshint everything is there before going into the regex.

I'll investigate later when I get more time. Hope it helps.

ricardofbarros commented 9 years ago

Hmm, nice catch, I recently got a windows at dispose I will test and fix this soon.

ricardofbarros commented 9 years ago

Hey @skkeeper, could you confirm if this is still happening?

skkeeper commented 9 years ago

I haven't touched Atom in a while, today I did a clean install again to make sure I could test this properly.

Apparently all linters that expand the Linter package that I've tested no longer work, so now it's probably an issue with that project.

ricardofbarros commented 9 years ago

Yeah AtomLinter changed a lot of stuff lately and some of linters aren't following the progress. I will close this issue for now.

skkeeper commented 9 years ago

Version 2.2.0 seems to have fixed this issue on my end.

ricardofbarros commented 9 years ago

Yeah changing from filePath to stdin was the best choice :)