Skip to content

Extension silently ignores exceptions in pylint #14055

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
ytimenkov opened this issue Sep 23, 2020 · 2 comments
Closed

Extension silently ignores exceptions in pylint #14055

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

Comments

@ytimenkov
Copy link

Environment data

  • VS Code version: 1.49.1
  • Extension version (available under the Extensions sidebar): v2020.8.109390
  • OS and version: Ubuntu
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Value of the python.languageServer setting: Microsoft

Expected behaviour

Some kind of diagnostics that linting has issues

Actual behaviour

Silently no problem in the "Problems" pane.

Steps to reproduce:

A custom ~/.pylintrc file with

[MASTER]
load-plugins=garbage

When running from the command-line:

Traceback (most recent call last):
  File "/home/default/waf-testing/.venv/bin/pylint", line 8, in <module>
    sys.exit(run_pylint())
  File "/home/default/waf-testing/.venv/lib/python3.8/site-packages/pylint/__init__.py", line 22, in run_pylint
    PylintRun(sys.argv[1:])
  File "/home/default/waf-testing/.venv/lib/python3.8/site-packages/pylint/lint/run.py", line 308, in __init__
    linter.load_plugin_modules(plugins)
  File "/home/default/waf-testing/.venv/lib/python3.8/site-packages/pylint/lint/pylinter.py", line 490, in load_plugin_modules
    module = modutils.load_module_from_name(modname)
  File "/home/default/waf-testing/.venv/lib/python3.8/site-packages/astroid/modutils.py", line 203, in load_module_from_name
    return load_module_from_modpath(dotted_name.split("."), path, use_sys)
  File "/home/default/waf-testing/.venv/lib/python3.8/site-packages/astroid/modutils.py", line 244, in load_module_from_modpath
    mp_file, mp_filename, mp_desc = imp.find_module(part, path)
  File "/usr/lib/python3.8/imp.py", line 296, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'garbage'

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python) ##########Linting Output - pylint########## ##########Linting Output - pylint########## ##########Linting Output - pylint########## ##########Linting Output - pylint##########
@ytimenkov ytimenkov added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Sep 23, 2020
@ytimenkov
Copy link
Author

ytimenkov commented Sep 23, 2020

This happens because I normally have conans.pylint plugin (per-user install) but it is not available in the most of venvs.

@karthiknadig
Copy link
Member

Duplicate of #7314

@karthiknadig karthiknadig marked this as a duplicate of #7314 Sep 23, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Sep 23, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 7, 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

3 participants