-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop specifying a default linter #974
Comments
We will also need to address the following:
|
There is also tailoring the defaults rules. It should be noted that pyflakes doesn't let you control the rules, it's all or nothing. Under flake8, though, you can set the rules, but we can't just use all of pyflakes checkers because data scientists love to use |
FWIW, I've found |
I firmly support Flake8. The major flaw with pylint is that it's too strict and produces too many errors. People can still add #noqa comments to their code. When I exceed 79 chars on a line for readability reasons, I will do this. Also, flake8 is pyflakes plus pep8 (pycodestyle). So the core linter popularity tilts even further towards pyflakes (2x downloads according to the stats posted above). |
Elaborating slightly:
|
The two main reason we are looking at changing the linter is performance and less strickness. The current extension blindly uses pylint (always). The plan is to offer the choice to the user, with the default being flake8. |
My main concern with most of the linters is that majority of the issues they report as errors are not really "errors". Terrible style will not cause a program to crash. I think most people would be happy if pylint/flake8/whatever only reported potential crashes as errors and had the rest split between warnings and notices. If VS Code or the Python extension allowed you to select the level of reporting (just errors/errors and warnings/everything) some people could disable everything but errors (when they'd like to know that an import is missing but couldn't care less about an unused one) while others (like me) could opt to be notified about everything.
|
Do keep in mind and we do have a set of default rules which we use to tailor Pylint's behaviour in the extension when you make no personal changes. The same would be for flake8, so this isn't really an argument between which linter offer the most rules, but who has the rules we want in a default rule set to detect errors, and then which is faster. |
To add to the importance of considering this (or dropping linters for a parso+LSP solution), Pylint is about to drop Python 2 support, so we would have to start having people install a specific version depending on what version of Python they are running (which we have to be careful of as the latest release doesn't support Python 3.7), switch to flake8, or stop installing linters by default. /cc @qubitron |
Hey folks, chiming in here just to mention that, although it would be sad to see That being said, thanks for the honest feedback, we'll try to address these concerns as much as possible. |
@PCManticore and we appreciate all the hard work put into Pylint! Chances are, though, that long-term we will move to our own solution and simply make Pylint -- and all other linters -- a supported option but not something we have users install by default (to make the setup process smoother). |
Fix for microsoft#974 - Pylint is easily enabled for workspaces that have it available
Fix for microsoft#974 - Pylint is easily enabled for workspaces that have it available
Fix for microsoft#974 - Pylint is easily enabled for workspaces that have it available
Fix for microsoft#974 - Pylint is easily enabled for workspaces that have it available
Looks good to me! |
The prompting to install Pylint is still occurring when the language server is on. |
Yes, this is expected at the current time. Until we turn Jedi off by default the current behaviour will remain, as per the request by @qubitron. Once we resolve issue #3007 this will behave properly, but not until then. |
To resolve this issue then, one must change the setting to |
I can verify that the right thing is done when pylint is installed but no settings have been provided. But I can also verify that the wrong thing is done when pylint is not installed and there are no settings provided. @d3r3kk I thought you said you could detect when a value for a setting came from the default set versus from a user's setting somewhere? |
Not quite -- to clarify, the request was that we don't prompt to install pylint when jediEnabled is set to false. That way:
|
We would like to get the language server providing base error detection such that there isn't a need to specify a linter for such things.
The text was updated successfully, but these errors were encountered: