Search code examples
visual-studio-codewarningspylint

VS code with pylint: hide whitespace warning if other warnings exist


I am currently running VS code with pylint attached for python linting. One of the warnings pylint will give is that if a line ends in whitespace then it will complain and VS code will add it in to the problems count.

If there are errors present then no warnings will be displayed until all errors are resolved, I want to add the reverse to trailing-whitespace. trailing-whitespace will display only if no other warnings are present.

I will accept answers that change VS code or pylint I do not care which. I do not have a dedicated server for pylint.


Solution

  • It's possible to make vs-code fix trailing white spaces automatically. See https://stackoverflow.com/a/30884298/2519059