Search code examples
pythonvisual-studio-codevscode-python

Can I stop linters from clearing the Problems tab before they have results?


Is it possible to prevent linters in VSCode from clearing the current list of errors/warnings before they have the results ready?

I find myself using pylint a lot, but it can be very slow (3-5 seconds for a large file). Unfortunately, every time a file is saved or a problem is resolved, pylint will be re-run to analyse the code and while it executes the command, it clears the list of errors/warnings which is only repopulated after its finished.

I am using the VSCode-Python extension (v 2019.8.30787), however, this behaviour has been constant in each version I've used in the past.

Is there a way to stop this from happening? It would seriously save so much time if the list of problems remains there until pylint (or other linter) is finished.


Solution

  • There is an open issue on microsoft/vscode-python github: https://github.com/microsoft/vscode-python/issues/6579

    And a suggested work-around for this is to not have linting on save. That way you can manually run the linters when you're ready to check again.