Skip to content

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

Closed
wants to merge 3 commits into from
Closed

Add pylint support #384

wants to merge 3 commits into from

Conversation

cbosdo
Copy link

@cbosdo cbosdo commented Jun 26, 2018

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

@palantirtech
Copy link
Member

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.

@cbosdo cbosdo force-pushed the develop branch 4 times, most recently from d91655e to 303f988 Compare June 26, 2018 13:22
Copy link
Contributor

@gatesn gatesn left a 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?

@cbosdo
Copy link
Author

cbosdo commented Jun 27, 2018

@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

@cbosdo
Copy link
Author

cbosdo commented Jul 11, 2018

@gatesn I think this fixes the problem you mentioned.

cbosdo added 3 commits July 13, 2018 16:35
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.
@cbosdo
Copy link
Author

cbosdo commented Jul 13, 2018

considered didOpen like a didSave since the document isn't edited yet

@gatesn
Copy link
Contributor

gatesn commented Mar 27, 2019

Closed by #385

@gatesn gatesn closed this Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants