Description
Hi, currently there are two options for flake8 functionality:
- the thid party plugin, pyls-flake8, which is recommended in the readme
- the internal plugin, in
pylsp/plugins/flake8_lint.py
, which is not advertised in the documentation
I would like to report some issues with these plugins.
First issue: two functionally equivalent plugins (mostly)
The first issue I would like to point out is that the two plugins are equivalent: the internal one should be preferred, and the suggestion for the third party one removed.
Actually the pip version of the external plugin is buggy as it does not respect the boolean options passed to flake8's executable. I submitted a pull request to the repository to fix this issue and it was merged, but it is not published on pypi yet. Also, some functionality is missing with respect to the inner plugin, and overall it seems a bit more crude.
Second issue: flake8 support not explicitly stated in readme
While the "Configuration" section in the readme explains how to use configuration from flake8, the "Installation" section does not mention flake8 in the "list of optional providers that will be available (if the respective dependencies are found)". I think it should be explicitly stated, as at first it is not clear.
Third issue: flake8 vs pyflakes + pycodestyle + mccabe
As flake8 is a composition of pyflakes, pycodestyle and mccabe (plus various other flake8 plugins, if installed) I think it should be the default to disable the individual components if flake8 is run, as to avoid duplicated runtimes and reports. A simpler solution might be to advertise flake8 in the readme, as per the previous issue, and explicitly state something along the lines of "Flake8: linter to detect various errors (composition of pyflakes, pycodestyle and mccabe: use a combination of the components or flake8 alone to avoid duplicated error reports)."
This is an example of duplicated messages from pylsp, using atom client: