vscode-flake8 icon indicating copy to clipboard operation
vscode-flake8 copied to clipboard

Linting silently fails when required plugin is missing

Open n4nn31355 opened this issue 1 year ago • 2 comments

Expectations:

  • code linting works
  • we have a distinct error message if required plugin is not installed

Actual behavior:

  • vscode-flake8 silently fails linting when flake8 is missing a plugin specified in require-plugins
  • no linting
  • no errors

Flake8 config:

[flake8]
require-plugins =
  flake8-bugbear
  non-existent-plugin

vscode-flake8 output:

2023-10-26 18:39:52.809 [info] file:///***.py :
There was a critical error during execution of Flake8:
required plugins were not installed!
- installed: flake8, flake8-bugbear, mccabe, pycodestyle, pyflakes
- expected: flake8-bugbear, non-existent-plugin
- missing: non-existent-plugin

Manual flake8 execution:

$ flake8; echo -e  "\nExit code: $?"
There was a critical error during execution of Flake8:
required plugins were not installed!
- installed: flake8, flake8-bugbear, mccabe, pycodestyle, pyflakes
- expected: flake8-bugbear, non-existent-plugin
- missing: non-existent-plugin

Exit code: 1

Versions:

vscode = 1.83.1
vscode-flake8  = v2023.8.0
flake8 = 6.1.0
python = 3.10.13

n4nn31355 avatar Oct 26 '23 14:10 n4nn31355

There is flake8.showNotification that can be set to error. The plan for the future is to show a error in the problems view when things like this happen.

karthiknadig avatar Oct 26 '23 17:10 karthiknadig

Yep. I have flake8.showNotification set to warning. But as you can see in vscode-flake8 output, somehow it's considered [info]

n4nn31355 avatar Oct 26 '23 19:10 n4nn31355