You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Relevant/affected Python packages and their versions: flake8: 3.7.8, flake8_isort: 2.3
Jedi or Language Server?: Language Server
Expected behaviour
VSCode fully lints a file using flake8 and the flake8_isort plugin and highlight errors, warnings and information as appropriate.
Actual behaviour
When using flake8 as a linter in vscode, if flake8 finds a reported error, warning or info that has a location line number of 0, vscode throws the error "llegal argument: line must be non-negative" and does not complete linting.
This happens for example when using when using the flake8-isort extension, as I002 specifies there is no isort configuration found, and the Info location line number is 0.
This is also an issue if using the wemake-python-styleguide as there are several rules which report a line location of 0.
Steps to reproduce:
Install flake8 and the flake8-isort plugin
Set VSCode to use flake8 as the linter
Run flake8 linting on any file through vscode, ensuring there is no isort config file in the same folder that can be detected
Logs
Output for Python in the Output panel
##########Linting Output - flake8##########
0,1,I,I002:no configuration found (.isort.cfg or [isort] in configs)
Output from Console under the Developer Tools panel:
notificationsAlerts.ts:38 Error: Illegal argument: line must be non-negative
at Object.t.illegalArgument (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:13:195)
at new g (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:350:768)
at new g (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:350:44)
at w.createDiagnostics (c:\Users\Arran.vscode\extensions\ms-python.python-2019.9.34911\out\client\extension.js:119:490471)
at w.lintDocument (c:\Users\Arran.vscode\extensions\ms-python.python-2019.9.34911\out\client\extension.js:119:489854)
The text was updated successfully, but these errors were encountered:
Environment data
Expected behaviour
VSCode fully lints a file using flake8 and the flake8_isort plugin and highlight errors, warnings and information as appropriate.
Actual behaviour
When using flake8 as a linter in vscode, if flake8 finds a reported error, warning or info that has a location line number of 0, vscode throws the error "llegal argument: line must be non-negative" and does not complete linting.
This happens for example when using when using the flake8-isort extension, as I002 specifies there is no isort configuration found, and the Info location line number is 0.
This is also an issue if using the wemake-python-styleguide as there are several rules which report a line location of 0.
Steps to reproduce:
Logs
Output for
Python
in theOutput
panel##########Linting Output - flake8##########
0,1,I,I002:no configuration found (.isort.cfg or [isort] in configs)
Output from
Console
under theDeveloper Tools
panel:notificationsAlerts.ts:38 Error: Illegal argument: line must be non-negative
at Object.t.illegalArgument (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:13:195)
at new g (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:350:768)
at new g (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:350:44)
at w.createDiagnostics (c:\Users\Arran.vscode\extensions\ms-python.python-2019.9.34911\out\client\extension.js:119:490471)
at w.lintDocument (c:\Users\Arran.vscode\extensions\ms-python.python-2019.9.34911\out\client\extension.js:119:489854)
The text was updated successfully, but these errors were encountered: