You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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 (View→Output, 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
The text was updated successfully, but these errors were encountered:
In this code or in some extension to it for pylint, we'll likely have to do some light parsing, or perhaps change our variable name to maxNumberOfLines to make it more clear for the user?
From pydocstyle's extension to the BaseLinter class:
// Remember, the first line of the response contains the file name and line number, the next line contains the error message.
// So we have two lines per message, hence we need to take lines in pairs.
const maxLines = this.pythonSettings.linting.maxNumberOfProblems * 2;
I think it just needs to be done iteratively instead of with a filter+map. There is already the parse code right there in the function: const msg = this.parseLine(line, regEx);
saponas
added a commit
to saponas/vscode-python
that referenced
this issue
Jul 20, 2018
Environment data
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:
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 theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
)The text was updated successfully, but these errors were encountered: