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
I have a project with a virtualenv (within a home directory, outside of project root) and want to use flake8 linter. Unfortunately, collected problems look to have messed/lost file information.
I use "Python - Run linter" command to run the linter and it outlines all the problems for each (it looks like) open file. Moreover, for each file it lists all the errors causing lots of false positives.
Example, there are two open files: file1.py and file2.py, they both contain lint errors. "Problems" tab will show all errors for each file. Clearly, file1.py shouldn't have the error from file2.py and vice versa.
The behaviour is changed if flake8Args are dropped (because they specify folder to run against).
Python version (& distribution if applicable, e.g. Anaconda): 3.6.5
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv
Relevant/affected Python packages and their versions: N/A
Actual behavior
All errors are collected and each open file in "Problems" tab lists them all. Clicking on some errors won't necessary navigate to the error.
Expected behavior
All errors are collected and each problematic file in "Problems" tab lists only its errors. Clicking on an error navigate to the corresponding line.
Steps to reproduce:
Open some project with "File: Open folder", use workspace settings from the example above, introduce some errors and perform a lint operation with "Run linter".
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
I have 5 files opened (hence five linting output sections)
##########Linting Output - flake8##########
2,1,F,F401:'django.conf.settings' imported but unused
32,1,W,W391:blank line at end of file
7,32,C,C812:missing trailing comma
##########Linting Output - flake8##########
2,1,F,F401:'django.conf.settings' imported but unused
32,1,W,W391:blank line at end of file
7,32,C,C812:missing trailing comma
2,1,F,F401:'django.conf.settings' imported but unused
##########Linting Output - flake8##########
2,1,F,F401:'django.conf.settings' imported but unused
32,1,W,W391:blank line at end of file
7,32,C,C812:missing trailing comma
7,32,C,C812:missing trailing comma
##########Linting Output - flake8##########
2,1,F,F401:'django.conf.settings' imported but unused
32,1,W,W391:blank line at end of file
7,32,C,C812:missing trailing comma
##########Linting Output - flake8##########
2,1,F,F401:'django.conf.settings' imported but unused
32,1,W,W391:blank line at end of file
7,32,C,C812:missing trailing comma
Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)
I have a project with a virtualenv (within a home directory, outside of project root) and want to use flake8 linter. Unfortunately, collected problems look to have messed/lost file information.
I use "Python - Run linter" command to run the linter and it outlines all the problems for each (it looks like) open file. Moreover, for each file it lists all the errors causing lots of false positives.
Example, there are two open files: file1.py and file2.py, they both contain lint errors. "Problems" tab will show all errors for each file. Clearly, file1.py shouldn't have the error from file2.py and vice versa.
The behaviour is changed if
flake8Argsare dropped (because they specify folder to run against).Workspace settings:
{ "python.pythonPath": "/home/ramp/.venv/cash-out-gate/bin/python", "python.linting.enabled": true, "python.linting.lintOnSave": true, "python.linting.flake8Enabled": true, "python.linting.flake8Args": [ "cash_out_gate", "tests" ], "python.linting.pylintEnabled": false, "python.linting.pylintArgs": [ "--load-plugins", "pylint_quotes", "cash_out_gate", "tests" ], "python.linting.mypyEnabled": false, "python.linting.mypyArgs": [ "--config", "mypy.ini", "cash_out_gate", "tests" ], }Environment data
Actual behavior
All errors are collected and each open file in "Problems" tab lists them all. Clicking on some errors won't necessary navigate to the error.
Expected behavior
All errors are collected and each problematic file in "Problems" tab lists only its errors. Clicking on an error navigate to the corresponding line.
Steps to reproduce:
Open some project with "File: Open folder", use workspace settings from the example above, introduce some errors and perform a lint operation with "Run linter".
Logs
Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)I have 5 files opened (hence five linting output sections)
Output from
Consoleunder theDeveloper Toolspanel (toggle Developer Tools on underHelp)No output