Lint, or a linter, is a tool that analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs. It helps you to reduce errors while still writing code, and makes sure you conform to the Style Guide.
<aside>
💡 A linter is not installed via the Extension library, but has to be installed to your site-packages using a package installer like pip.
</aside>
You can search in the Command Pallete for Select Linter, and then select the one you prefer. I recommend using either pylint or flake8, which are the most popular ones. Select the entry, and you might get a message popup that linting is not yet installed. Go ahead and click on Install, which will install the chosen linter with pip.
Now when you start writing code and make mistakes or stylistic errors, you see the orange or red hints next to the repsonsible code. You can then hover over these marks and see what exactly is wrong, and can immediately fix it.
<aside> 💡 Video of how to install and use a Linter in VSCode. Look for extension in VSCode!
</aside>
A good overview about useful extensions is listed here !
In der Regel ist nur ein Linter automatisch aktiviert.
Flake8 can be found in the marketplace.
Command-line utility for enforcing style consistency across Python projects. Für .py-files.
Das heißt, es ist kein code-checker sondern ein code-formatter! Hilft schönen Code zu schreiben.