Open underyx opened 8 years ago
Thanks for reporting this issue! A coalaian will look at it soon.
Would you consider pyflakes acceptable? It also reports unused import/variable, but generally stays strictly away from style issues.
:+1: if it does the job
Maybe if we can add the possibility of a syntax_only = yes
option. I'd
like to give people with crappy codebases the ability to start using coala
with useful checks without changing a single line of code.
On Wed, Sep 14, 2016, 5:21 PM Lasse Schuirmann notifications@github.com wrote:
👍 if it does the job
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/coala-analyzer/coala-bears/issues/753#issuecomment-247049556, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAuVPq0qKBMMNHwQyd0Mr0604liwWlWks5qqBEDgaJpZM4JyEhW .
Nod. I expected you were wanting a less noisy tool. We would need to filter the pyflakes output to achieve that, and it is a reasonable request.
Jedi linting is still unstable, but looks like a serious option anyway. I suspect astroid is not much better than the ast module at detecting SyntaxError's.
@sadovnychyi, do you have an idea on how good/stable jedi is now at identifying syntax errors. I havent played with it very much, and it was a while ago, so I could be very wrong.
@jayvdb No idea, sorry. AFAIK Jedi just ignores syntax errors if possible. I'm not aware of any APIs which would allow to only check the syntax.
Citation from here:
You might ask now: "Why didn't you use the ``ast``
module for this? Well, ``ast`` does a very good job understanding proper Python
code, but fails to work as soon as there's a single line of broken code.
Seems like the whole idea of Jedi's custom parser is to ignore any possible syntax errors.
There is a new release of pylint and astroid, which should stablise quickly. That might be worth investigating.
But, IMO it is worth-while improving PyflakesBear to add syntax_only = yes
which ignores the various error codes which are not syntax related, or maybe just reduce the severity of results that are not errors.
It's probably possible to use the builtin
ast
module for this.Or maybe https://github.com/PyCQA/astroid or https://github.com/davidhalter/jedi