Skip to content

Enable asyncronous linting for pylint#3204

Closed
oliverwiegers wants to merge 3 commits intodense-analysis:masterfrom
oliverwiegers:master
Closed

Enable asyncronous linting for pylint#3204
oliverwiegers wants to merge 3 commits intodense-analysis:masterfrom
oliverwiegers:master

Conversation

@oliverwiegers
Copy link
Contributor

When pylint.vim was written pylint wasn't able to read from stdin. As mentioned in issue 590 this causes the A.L.E. linting using pylint to not be async.

Since Pull request 2746 is merged, pylint is able to read from stdin.

I added the pylint flag --from-stdin to the pylint call and changed ale_linters/python/pylint.vim so that ale is continuously linting python files using pylint.

I haven't written additional tests, because the existing tests do cover my changes.
I have edited test/command_callback/test_pylint_command_callback.vader to call pylint the right way from pipenv.

@stale
Copy link

stale bot commented Aug 13, 2020

This pull request has been automatically marked as stale because it has not been updated recently. Make sure to write tests and document your changes. See :help ale-dev for information on writing tests.
If your pull request is good to merge, bother w0rp or another maintainer again, and get them to merge it.

@stale stale bot added the stale PRs/Issues no longer valid label Aug 13, 2020
@oliverwiegers
Copy link
Contributor Author

Hello the bot marked this PR as stale. The test ran successfully, but the Travis CI is stuck.

@stale stale bot removed the stale PRs/Issues no longer valid label Aug 13, 2020
@lithammer
Copy link
Contributor

If your pull request is good to merge, bother w0rp or another maintainer again, and get them to merge it.

Ping @w0rp (sorry, don't know who the other maintainers are)

@w0rp
Copy link
Member

w0rp commented Aug 13, 2020

This will work with pylint 2.5.0, but will break with earlier versions. Not everyone will have updated, so we should check the version for a while.

Another issue is that you can't mark a linter as optionally being one that only lints when you save a file or on any text edit. I've thought about making it so you can dynamically compute if a file can be checked or not, and I think I know how to make that possible now. I'll open an issue for that, do that first, and update this to use a version check.

@w0rp w0rp self-assigned this Aug 13, 2020
@w0rp
Copy link
Member

w0rp commented Aug 13, 2020

I've opened #3285 to support this. I want to get that one done now. It will open up a lot of new possibilities.

@oliverwiegers
Copy link
Contributor Author

Okay, is there currently any todo for me?

@w0rp
Copy link
Member

w0rp commented Aug 13, 2020

No, I'll take care of it. You need some support from me to get this done. The stale bot should be configured to let things stay open if someone leaves a comment, so this PR should remain open now.

@w0rp
Copy link
Member

w0rp commented Sep 9, 2020

I've merged parts of this in the command line now. I had to fix how lint_file works, but I've tested it with different pylint, and it works with both the old and new versions.

Cheers! 🍻

@w0rp w0rp closed this Sep 9, 2020
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