Skip to content

pythonSettings.linting.maxNumberOfProblems controls the number of lines of stdout instead of the number of problems #2198

Closed

Description

Environment data

  • VS Code version: 1.25.1
  • Extension version (available under the Extensions sidebar): 2018.7.0
  • OS and version: Win10
  • Python version (& distribution if applicable, e.g. Anaconda): Python 2.7.14 (Anaconda)
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Relevant/affected Python packages and their versions: None

Actual behavior

Problems list when running PyLint contains only the errors in the first N lines of stdout when running PyLint where N = "python.linting.maxNumberOfProblems"

Expected behavior

Problems list when running PyLint contains only the errors in the first N MESSAGES contained in stdout when running PyLint where N = "python.linting.maxNumberOfProblems"

Steps to reproduce:

  1. Have a file that generates a bunch of "convention,C0326:Exactly one space required after comma" errors which generate 3 lines of text per message in PyLint when run with the formatting settings vscode-python passes to PyLint.

The line of code governing this is src/client/linters/baselinter.ts in function private parseLines(outputLines: string[], regEx: string): ILintMessage[]
"
.filter((value, index) => index <= this.pythonSettings.linting.maxNumberOfProblems)
"

Logs

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

NA

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

NA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    area-lintingbugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions