Skip to content

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

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
HCoppejans opened this issue Apr 15, 2019 · 1 comment
Closed

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

HCoppejans opened this issue Apr 15, 2019 · 1 comment

Comments

@HCoppejans
Copy link

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
}

@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Apr 15, 2019
@DonJayamanne
Copy link

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

@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Apr 15, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants