Skip to content

Linting isn't working anymore! #14079

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

Closed
MaKaNu opened this issue Sep 24, 2020 · 2 comments
Closed

Linting isn't working anymore! #14079

MaKaNu opened this issue Sep 24, 2020 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@MaKaNu
Copy link

MaKaNu commented Sep 24, 2020

Environment data

  • VS Code version: 1.49.1
  • Extension version (available under the Extensions sidebar): 2020.9.111407
  • OS and version: Windows 10 Enterprise 1909
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): Anaconda
  • Relevant/affected Python packages and their versions:
  • Relevant/affected Python-related VS Code extensions and their versions:
    • Anaconda Extension Pack: 1.0.1
    • Qt for Python: 0.4.2
    • Pylance: 2020.9.6
  • Value of the python.languageServer setting: Pylance

I have setted up pylint to enable all messages with --enable=F,E,W,C,R in the settings and also have under %userprofile% a ".pylintrc" file to match my purpose

I have added a the test.py and .pylintrc as linting.zip

Expected behaviour

saving a python file should lint my file.

Actual behaviour

Only Pylance linting is shown. I tried different linters with no result

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Create a line in a python file which is longer as the value max-line-lenght (80 in my .pylintrc)
  2. Save the file
  3. wait for the linter
  4. doesn't put curly lines at the start.
  5. run manually pylint test.py

output:

************* Module test
SemanticSegmentation\train\fcn\test.py:1:0: C0301: Line too long (85/80) (line-too-long)
SemanticSegmentation\train\fcn\test.py:1:0: C0304: Final newline missing (missing-final-newline)
SemanticSegmentation\train\fcn\test.py:1:0: C0114: Missing module docstring (missing-module-docstring)
SemanticSegmentation\train\fcn\test.py:1:0: C0103: Constant name "to_long_line" doesn't conform to UPPER_CASE naming style (invalid-name)

----------------------------------------------------------------------
Your code has been rated at -30.00/10 (previous run: -3.33/10, -26.67)

Logs

User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'DebugAdapterFactory - experiment'
User belongs to experiment group 'PtvsdWheels37 - experiment'
User belongs to experiment group 'UseTerminalToGetActivatedEnvVars - control'
User belongs to experiment group 'LocalZMQKernel - experiment'
User belongs to experiment group 'CollectLSRequestTiming - control'
User belongs to experiment group 'CollectNodeLSRequestTiming - experiment'
User belongs to experiment group 'EnableIPyWidgets - experiment'
User belongs to experiment group 'DeprecatePythonPath - control'
User belongs to experiment group 'RunByLine - control'
User belongs to experiment group 'CustomEditorSupport - control'
User belongs to experiment group 'pythonaacf'
> conda --version
> pyenv root
> python3.7 "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\pyvsc-run-isolated.py" -c "import sys;print(sys.executable)"
> python3.6 "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\pyvsc-run-isolated.py" -c "import sys;print(sys.executable)"
> python3 "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\pyvsc-run-isolated.py" -c "import sys;print(sys.executable)"
> python2 "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\pyvsc-run-isolated.py" -c "import sys;print(sys.executable)"
> python "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\pyvsc-run-isolated.py" -c "import sys;print(sys.executable)"
> py -3.7 "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\pyvsc-run-isolated.py" -c "import sys;print(sys.executable)"
> py -3.6 "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\pyvsc-run-isolated.py" -c "import sys;print(sys.executable)"
> py -3 "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\pyvsc-run-isolated.py" -c "import sys;print(sys.executable)"
> py -2 "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\pyvsc-run-isolated.py" -c "import sys;print(sys.executable)"
> ~\.conda\envs\pytorch\python.exe "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\pyvsc-run-isolated.py" -c "import sys;print(sys.executable)"
Python interpreter path: ~\.conda\envs\pytorch\python.exe
Starting Pylance language server.
Error 2020-09-24 14:33:45: Detection of Python Interpreter for Command python3 and args  failed as file  does not exist
> conda info --json
> conda info --json
> conda info --json
> conda info --json
> conda env list
> conda info --json
> ~\.conda\envs\pytorch\python.exe "c:/Users/Matti Kaupenjohann/.vscode/extensions/ms-python.python-2020.9.111407/pythonFiles/pyvsc-run-isolated.py" pylint --enable=F,E,W,C,R --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text d:\Mitarbeiter\Kaupenjohann\09_GIT\PytorchLabs\SemanticSegmentation\train\fcn\test.py
cwd: d:\Mitarbeiter\Kaupenjohann\09_GIT\PytorchLabs
> ~\.conda\envs\pytorch\python.exe "c:/Users/Matti Kaupenjohann/.vscode/extensions/ms-python.python-2020.9.111407/pythonFiles/pyvsc-run-isolated.py" pylint --enable=F,E,W,C,R --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text d:\Mitarbeiter\Kaupenjohann\09_GIT\PytorchLabs\SemanticSegmentation\train\fcn\test.py
cwd: d:\Mitarbeiter\Kaupenjohann\09_GIT\PytorchLabs
> ~\.conda\envs\pytorch\python.exe "c:/Users/Matti Kaupenjohann/.vscode/extensions/ms-python.python-2020.9.111407/pythonFiles/pyvsc-run-isolated.py" pylint --enable=F,E,W,C,R --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text d:\Mitarbeiter\Kaupenjohann\09_GIT\pytorch-semantic-segmentation\datasets\boxsup.py
cwd: d:\Mitarbeiter\Kaupenjohann\09_GIT\pytorch-semantic-segmentation
> ~\.conda\envs\pytorch\python.exe "c:/Users/Matti Kaupenjohann/.vscode/extensions/ms-python.python-2020.9.111407/pythonFiles/pyvsc-run-isolated.py" pylint --enable=F,E,W,C,R --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text d:\Mitarbeiter\Kaupenjohann\09_GIT\pytorch-semantic-segmentation\datasets\boxsup.py
cwd: d:\Mitarbeiter\Kaupenjohann\09_GIT\pytorch-semantic-segmentation
Error 2020-09-24 14:33:46: Failed to get interpreter information for 'C:\Users\Matti Kaupenjohann\AppData\Local\Microsoft\WindowsApps\python3.exe' [Error: Command failed: "C:\\Users\Matti Kaupenjohann\AppData\Local\Microsoft\WindowsApps\python3.exe" "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\pyvsc-run-isolated.py" "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\interpreterInfo.py"
Python was not found but can be installed from the Microsoft Store: https://go.microsoft.com/fwlink?linkID=2082640
	at ChildProcess.exithandler (child_process.js:304:12)
	at ChildProcess.emit (events.js:223:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)] {
  killed: false,
  code: 9009,
  signal: null,
  cmd: '"C:\\\\Users\\Matti Kaupenjohann\\AppData\\Local\\Microsoft\\WindowsApps\\python3.exe" "c:\\Users\\Matti Kaupenjohann\\.vscode\\extensions\\ms-python.python-2020.9.111407\\pythonFiles\\pyvsc-run-isolated.py" "c:\\Users\\Matti Kaupenjohann\\.vscode\\extensions\\ms-python.python-2020.9.111407\\pythonFiles\\interpreterInfo.py"'
}
Error 2020-09-24 14:33:46: Failed to get interpreter information for 'C:\Users\Matti Kaupenjohann\AppData\Local\Microsoft\WindowsApps\python.exe' [Error: Command failed: "C:\\Users\Matti Kaupenjohann\AppData\Local\Microsoft\WindowsApps\python.exe" "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\pyvsc-run-isolated.py" "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\interpreterInfo.py"
Python was not found but can be installed from the Microsoft Store: https://go.microsoft.com/fwlink?linkID=2082640
	at ChildProcess.exithandler (child_process.js:304:12)
	at ChildProcess.emit (events.js:223:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)] {
  killed: false,
  code: 9009,
  signal: null,
  cmd: '"C:\\\\Users\\Matti Kaupenjohann\\AppData\\Local\\Microsoft\\WindowsApps\\python.exe" "c:\\Users\\Matti Kaupenjohann\\.vscode\\extensions\\ms-python.python-2020.9.111407\\pythonFiles\\pyvsc-run-isolated.py" "c:\\Users\\Matti Kaupenjohann\\.vscode\\extensions\\ms-python.python-2020.9.111407\\pythonFiles\\interpreterInfo.py"'
}
##########Linting Output - pylint##########
##########Linting Output - pylint##########
> conda env list
> C:\ProgramData\Anaconda3\python.exe "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\pyvsc-run-isolated.py" -c "import jupyter"
> C:\ProgramData\Anaconda3\python.exe "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\pyvsc-run-isolated.py" -c "import notebook"
> C:\ProgramData\Anaconda3\python.exe "c:/Users/Matti Kaupenjohann/.vscode/extensions/ms-python.python-2020.9.111407/pythonFiles/pyvsc-run-isolated.py" jupyter kernelspec --version
> C:\ProgramData\Anaconda3\python.exe "c:\Users\Matti Kaupenjohann\.vscode\extensions\ms-python.python-2020.9.111407\pythonFiles\vscode_datascience_helpers\getJupyterKernelspecVersion.py"
> ~\.conda\envs\pytorch\python.exe "c:/Users/Matti Kaupenjohann/.vscode/extensions/ms-python.python-2020.9.111407/pythonFiles/pyvsc-run-isolated.py" pylint --enable=F,E,W,C,R --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text d:\Mitarbeiter\Kaupenjohann\09_GIT\PytorchLabs\SemanticSegmentation\train\fcn\test.py
cwd: d:\Mitarbeiter\Kaupenjohann\09_GIT\PytorchLabs
> ~\.conda\envs\pytorch\python.exe "c:/Users/Matti Kaupenjohann/.vscode/extensions/ms-python.python-2020.9.111407/pythonFiles/pyvsc-run-isolated.py" pylint --enable=F,E,W,C,R --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text d:\Mitarbeiter\Kaupenjohann\09_GIT\PytorchLabs\SemanticSegmentation\train\fcn\test.py
cwd: d:\Mitarbeiter\Kaupenjohann\09_GIT\PytorchLabs
##########Linting Output - pylint##########
@MaKaNu MaKaNu added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Sep 24, 2020
@karthiknadig karthiknadig self-assigned this Sep 24, 2020
@karthiknadig
Copy link
Member

Duplicate of #7314

@karthiknadig karthiknadig marked this as a duplicate of #7314 Sep 24, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Sep 24, 2020
@MaKaNu
Copy link
Author

MaKaNu commented Sep 25, 2020

Duplicate of #7314

This is actually not a duplicate. I recently checked if linting is enabled: It is for User and for Workspace. I open this issue again. I provided my output, which is showing on line -3 that the linter is running. I tested this command and it provided me exactly what I was looking for. But the response is somehow not sended back to "Problems" Console or showing in the file.

Running either this:

python.exe "c:/Users/Matti Kaupenjohann/.vscode/extensions/ms-python.python-2020.9.111407/pythonFiles/pyvsc-run-isolated.py" pylint --enable=F,E,W,C,R --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text d:\Mitarbeiter\Kaupenjohann\09_GIT\PytorchLabs\SemanticSegmentation\train\fcn\test.py

or just this:

pylint --enable=F,E,W,C,R --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text d:\Mitarbeiter\Kaupenjohann\09_GIT\PytorchLabs\SemanticSegmentation\train\fcn\test.py

results in the same output:

************* Module test
1,0,convention,line-too-long:Line too long (85/80)
1,0,convention,missing-final-newline:Final newline missing
1,0,convention,missing-module-docstring:Missing module docstring
1,0,convention,invalid-name:Constant name "to_long_line" doesn't conform to UPPER_CASE naming style

----------------------------------------------------------------------
Your code has been rated at -30.00/10 (previous run: -30.00/10, +0.00)

I would like to see this issue opend again, because it is a different issue then the "dup"

Just an additional Info:
I tested it with different language servers

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants