question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Highlight in linters not worked, only underline one character

See original GitHub issue

Environment data

  • VS Code version: 1.60.0
  • Extension version: v2021.9.1218897484
  • OS and version: Windows_NT x64 10.0.19042
  • Python version : 3.7.9
  • Type of virtual environment used: Global and venv
  • Value of the python.languageServer setting: Pylance

Expected behaviour

linter gives errors and warnings when running or when running Run Linting

Actual behaviour

Nothing happens. In a global environment and in venv But if you run it manually in the console pylint test.py, for example, then everything will work. VScode preference in global environment: python.linting.enabled: true python.linting.pylintArgs: [] python.linting.pylintEnabled: true python.linting.pylintPath: “pylint” python.linting.pylintUseMinimalCheckers: true

file test.py in C:\debug\ folder

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

[2021-09-13 18:45:05.452] [exthost] [error] [ms-python.python] provider FAILED
[2021-09-13 18:45:05.453] [exthost] [error] Canceled: Canceled
	at _.makeCancelError (c:\Users\a.bukreev\.vscode\extensions\ms-python.python-2021.9.1218897484\out\client\extension.js:9:152754)
	at _.handleFailedRequest (c:\Users\a.bukreev\.vscode\extensions\ms-python.python-2021.9.1218897484\out\client\extension.js:9:152605)
	at c:\Users\a.bukreev\.vscode\extensions\ms-python.python-2021.9.1218897484\out\client\extension.js:9:116539
	at async w.provideDocumentHighlights (c:\Users\a.bukreev\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:94:167255)
[2021-09-13 18:45:05.479] [exthost] [error] [ms-python.python] provider FAILED
[2021-09-13 18:45:05.479] [exthost] [error] Canceled: Canceled
	at _.makeCancelError (c:\Users\a.bukreev\.vscode\extensions\ms-python.python-2021.9.1218897484\out\client\extension.js:9:152754)
	at _.handleFailedRequest (c:\Users\a.bukreev\.vscode\extensions\ms-python.python-2021.9.1218897484\out\client\extension.js:9:152605)
	at c:\Users\a.bukreev\.vscode\extensions\ms-python.python-2021.9.1218897484\out\client\extension.js:9:116539
	at async w.provideDocumentHighlights (c:\Users\a.bukreev\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:94:167255)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
karthiknadigcommented, Mar 17, 2022

@simensol We are moving linting and other tooling to their own extensions. eventually, python extension will rely on the linting extensions to provide the linting feature. A main reason for this move is maintenance, and enabling the community to contribute features to the tools they love. A problem we have with the current design is that the linting feature is entirely written in TypeScript and the integration is a bit too convoluted for the community to add new features or make changes. In the new extension, there is minimal TS code and the entire linting feature is implemented using python. It should also make it easier to test and add new features to the pylint extension. You can see the code here: https://github.com/microsoft/vscode-pylint

0reactions
simensolcommented, Mar 17, 2022

Why do we need the pylint extension @karthiknadig when we already can use pylint using the following settings in VSC’s settings.json?

{
    "python.linting.pylintEnabled": true,
    "python.linting.pylintPath": "/usr/local/bin/pylint"
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

VSC highlighted lint errors - python - Stack Overflow
Sometime the underline is just under a single character and sometimes hard to find.
Read more >
Documentation Style Guide - GitLab Docs
Documentation Style Guide. This document defines the standards for GitLab documentation, including grammar, formatting, word use, and more.
Read more >
Anaconda, the Python IDE for Sublime Text 3 - GitHub Pages
A Powerful IDE. Anaconda re-implement some Sublime Text 3 features and implements another ones on it's own. Python Auto Completion.
Read more >
Mark Styles — SublimeLinter 3.4.24 documentation
As you can see below, there is currently a limitation in Sublime Text 3 that prevents underlines from drawing under non-word characters (such...
Read more >
Linter rules - Dart
Use the Dart linter to identify possible problems in your Dart code. You can use the linter through your IDE or with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found