jbenden / vscode-c-cpp-flylint

A VS Code extension for advanced, modern, static analysis of C/C++ that supports a number of back-end analyzer programs.
MIT License
152 stars 29 forks source link

An error occurs with the Cppcheck-2.12.0: "Line could not be parsed: Active checkers: 107/565 #203

Closed ingram12 closed 11 months ago

ingram12 commented 11 months ago

Hi I tried to use the C/C++ Advanced Lint with Cppcheck-2.12.0 and got an error: 'Line could not be parsed: Active checkers: 107/565 (use --checkers-report=<filename> to see details)' while validating: /Users/ingram/kohi/engine/src/core/test.c. Please analyze the 'C/C++ FlyLint' Output console. Stacktrace: Error: Line could not be parsed: Active checkers: 107/565 (use --checkers-report=<filename> to see details) at /Users/ingram/.vscode/extensions/jbenden.c-cpp-flylint-1.13.1/server/out/server.js:2:12689 at Array.forEach (<anonymous>) at a.parseLines (/Users/ingram/.vscode/extensions/jbenden.c-cpp-flylint-1.13.1/server/out/server.js:2:12438) at a.lint (/Users/ingram/.vscode/extensions/jbenden.c-cpp-flylint-1.13.1/server/out/server.js:2:12341) at /Users/ingram/.vscode/extensions/jbenden.c-cpp-flylint-1.13.1/server/out/server.js:2:21825 at Array.forEach (<anonymous>) at Function.B (/Users/ingram/.vscode/extensions/jbenden.c-cpp-flylint-1.13.1/server/out/server.js:2:21800)

This error occurs because in the new version Cppcheck (2.12.0) is in the last line write how many checkers was activated after a run (Like: Active checkers: 107/565) and C/C++ Advanced Lint does not yet know how to parse this correctly.

For hot fix it need to add flag in _c_cppproperties.json:

"c-cpp-flylint.cppcheck.extraArgs": [
    "--quiet"
]
ingram12 commented 11 months ago

Solved in: https://github.com/jbenden/vscode-c-cpp-flylint/pull/204/commits/2460b25f8c59d8afea1ab08dcc98d694964e6572