-
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
Linting reports incorrect file locations for lint errors / warnings #7020
Comments
Can you please paste the file content? Unfortunately, I am not able to reproduce this just with any file.
Are the line numbers and column numbers reported in the output correct? |
@karrtikr Unfortunately I won't be able to post a full file, and to be honest I don't know how useful a single file will be. The issue occurs in all open files regardless of whether or not an actual linting violation exists in that file. I haven't had the time to reproduce a minimal repo, but I would really like to see this fixed so I will do my best if we are still unable to pinpoint the issue. Here is some more info to help track down:
Note: this appears to be caused by the default python linting in vscode. Not sure why the default is running when I have another linter enabled. tox.ini
settings.json
Here's another screenshot of a 4 line file I created to demonstrate. This was the only function in the file the other being the import. VSCode highlights lint violations originating from multiple other files. |
Python Language server Intellisense provider also provides linting. It's because of setting Btw do linters other that |
It appears to be only |
I expect with As I am not able to reproduce this, it's hard to pin point the issue, so I have to close this issue for now. If you can come up with a reproducible case, I'll happy to reopen the issue and work on this. |
@karrtikr the jedi server doesn't work well for me. I would rather use the Microsoft Language Server with the linting disabled. Is this possible? I'll also try to find the time to produce a minimal repo highlighting the issue with flake8. |
You can always disable linting (from command palette) and use Microsoft language server. |
Environment data
VSCode
2019.8.30787
2.7
virtualenv
flake8 v3.7.7
Expected behaviour
I expect the
Problems
tab to point to correct locations. I expect red underlines to appear where the linting errors are reported.Actual behaviour
Red underlines appear in any open file when any lint errors are reported. Correct locations of linting failures are not shown. The below screenshot shows the line
import random
underlined as red for the incorrect error. Every lint error is highlighted in every open file making it impossible to determine the actual location of the errors.Logs
(truncated to remove proprietary code)
Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)Duplicate logs removed, paths changed
The text was updated successfully, but these errors were encountered: