Home > Blockchain >  How to enable linting for flake8 plugins in VSCode?
How to enable linting for flake8 plugins in VSCode?

Time:09-13

I am having flake8 installed and VSCode is able to detect default checks with the squiggly lines. Now, I installed flake8-docstring but VSCode is not warning on missing docstring.

For example, running below command in powershell, gives expected output.

>> python flake8 abc.py
abc.py:1:1: D100 Missing docstring in public module

But in VSCode, it is not showing the squiggly lines.

CodePudding user response:

In VSCode, press Ctrl Shift P, and type Select Linter:

Select Linter

Then select the linter of your choice, e.g flake8: Choose linter

Hope this helps!

CodePudding user response:

Different linter will produce different effects, it is recommended that you use pylint.

  1. First enable linting

    enter image description here

  2. Then select pylint

    enter image description here

  3. Effect

    enter image description here

  • Related