-
Notifications
You must be signed in to change notification settings - Fork 284
Add pylint support #384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pylint support #384
Conversation
Thanks for your interest in palantir/python-language-server, @cbosdo! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request. |
d91655e
to
303f988
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! However, the reason this hasn’t been done before is because there’s no obvious way of having pylint run against the in-memory documents.
This linter will return results for the contents on disk, regardless of what the user has typed but not yet saved.
Given this isn’t likely to be resolved, perhaps we want to separate out onChange linting and onSave linting then only run pylint onSave?
@gatesn hum... you're right. I guess that should be another PR? I'm not sure I'll have time soon to work on it. May be during SUSE Hackweek 17 in early July |
@gatesn I think this fixes the problem you mentioned. |
The Language Server Protocol specifies that line numbers start at 0, while mccabe starts at 1. Fix both the plugin and its test to match this.
Some linters like pylint are unable to handle in-memory documents. In order to use them, we need to be able to run lints differently on didChange and didSave events.
pylint is used in a big number of python projects, let's support it.
considered didOpen like a didSave since the document isn't edited yet |
Closed by #385 |
While testing onivim and python support to hack on salt, I discovered that there is no pylint support for the python-language-server. As hacking on salt requires it, I just added it.
I also fixed a line number bug in the mccabe plugin