Skip to content

Adding args to PyLint in setting.json breaks linting #5257

Description

Environment data

  • VS Code version: 1.33.1
  • Extension version : ms-python 2019.3.6558
  • OS and version: Windows 10 Pro
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.8
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions:
    astroid 2.2.5
    colorama 0.4.1
    isort 4.3.17
    lazy-object-proxy 1.3.1
    mccabe 0.6.1
    pip 19.0.3
    pylint 2.3.1
    setuptools 40.6.2
    six 1.12.0
    typed-ast 1.3.1
    wrapt 1.11.1
    opencv-python 3.4.1.15

Adding any type of argument for PyLint to settings.json, seems to cause a major issue with linting.

For instance, adding this line to setting.json:

"python.linting.pylintArgs": ["--extension-pkg-whitelist=cv2"],

causes linting to bug out, outputting a bunch of warnings never seen before.

linting bug

I have tested this with other commands as well, and all of them does the same thing.

Steps to reproduce:

  1. Use linting on PyLint without any options in settings.py.
  2. Add any setting using the "python.linting.pylintArgs" command
  3. Rerun linting

Example errors

{
"resource": "/c:/Work/ucpa-machine-learning/src/find_gaps_v2.py",
"owner": "python",
"code": "mixed-indentation",
"severity": 4,
"message": "Found indentation with tabs instead of spaces",
"source": "pylint",
"startLineNumber": 13,
"startColumn": 1,
"endLineNumber": 13,
"endColumn": 1
}

{
"resource": "/c:/Work/ucpa-machine-learning/src/find_gaps_v2.py",
"owner": "python",
"code": "bad-whitespace",
"severity": 2,
"message": "No space allowed before comma",
"source": "pylint",
"startLineNumber": 29,
"startColumn": 39,
"endLineNumber": 29,
"endColumn": 39
}

Activity

  1. ghost added
    triage-neededNeeds assignment to the proper sub-team
    on Apr 15, 2019
  2. DonJayamanne commented on Apr 15, 2019

    @DonJayamanne

    Unfortunately the error message is coming from pylint (a third party package).
    Please report issues related to pylint on their repo

  3. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Apr 15, 2019
  4. locked as resolved and limited conversation to collaborators on May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions