AtomLinter / linter-reek

An Atom Linter package for Reek, the Ruby code smell detector.
https://atom.io/packages/linter-reek
MIT License
7 stars 5 forks source link

reek plugin keeps emitting stack traces #92

Open bronson opened 7 years ago

bronson commented 7 years ago

While I'm editing code, I might temporarily have unbalanced parentheses... When I do, Reek starts hitting me with Atom errors, over and over.

Is there any way to make Reek stop doing this? Listing the errors at the bottom of the editor window is fine.

screen shot 2016-10-13 at 1 50 44 pm
Arcanemagus commented 7 years ago

That's coming from the stderr output of reek, does it work for you on the CLI?

bronson commented 7 years ago

Yes, it seems to work fine.

When the file doesn't contain a syntax error, everything runs with no output.

When I'm editing the file, reek might output:

$ reek --version
reek 4.4.2
$ reek bin/config.rb 
bin/config.rb:5:8: error: unexpected token tDOT
bin/config.rb:5: unless .include?(branch)
bin/config.rb:5:        ^                
bin/config.rb: Parser::SyntaxError: unexpected token tDOT

Which is correct, but I'm in the middle of editing the file.

Arcanemagus commented 7 years ago

Hmm, maybe reek has changed their output recently to show syntax errors differently?

dathagerty commented 7 years ago

@bronson how do you have the Linter package set up to run your different linters? If you have it set to run automatically as you type, this is what will happen. You're not the first person to report this sort of thing happening, and honestly at this point I'm thinking of having linter-reek only run when a file is saved, rather than following Linter's settings.

bronson commented 7 years ago

Just checked, I don't have it set to lint-as-you-type.

However, I DO have the atom/autosave plugin enabled (which I think is the default?) So my editors get saved whenever they lose focus, which can be quite often.

bronson commented 7 years ago

Sorry, nope. It's disabled by default.

But I really like it. I'd prefer to keep it enabled. :)

dathagerty commented 7 years ago

@bronson I'm going to work on a way to still alert the user to invalid syntax, but by showing a more severe version of the regular output of the linter.