Microsoft splits VS Code Python extension to separate functions

Microsoft recently issued an announcement saying that it has independently split the linting function in the Python extension of Visual Studio Code and formed an independent Pylint extension. The purpose of this split is to improve performance and stability, and will no longer This tool is required to be installed in the Python environment, and the split functionality can also be updated individually in the form of extensions.

This new extension uses the Language Server Protocol to provide support for linting processing and comes with the latest version of pylint (currently version 2.13.4).

Although the name of this extension released by Microsoft is Pylint, and it also comes with the latest version of pylint, it is still very different from the well-known pylint in Python development (Microsoft is very confusing in naming).

The latter, pylint, is an open source static code analysis tool and is highly configurable. Users can extend pylint in a certain way according to their needs. As a very useful tool, pylint is integrated in editors such as Emacs, Vim, and Atom, while the former only supports Visual Studio Code.

It also provides additional methods to configure the severity level of issues reported through pylint, for example:

“pylint.severity” : {
    "convention": "Information",
    "error": "Error",
    "fatal": "Error",
    "refactor": "Hint",
    "warning": "Warning",
    "info": "Information",
    "W0611": "Error", //per error code
    "unused-import": "Error" //per error diagnostic
}

One caveat for now though: if the developer also has pylint enabled in the Python extension, they may see two entries for the same issue in the issues panel. You can disable the built-in linting functionality by setting "python.linting.pylintEnabled": false.

Developers can try out this new extension today by installing it from the VS Code Marketplace. If you have any questions or feature requests, you can ask them in the Pylint extension's GitHub repository.

Guess you like

Origin www.oschina.net/news/189877/visual-studio-code-pylint