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

Cppcheck 2.11 support? #193

Closed Quipyowert2 closed 1 year ago

Quipyowert2 commented 1 year ago

I just upgraded to Cppcheck 2.11 from 2.10 and Flylint keeps giving me the following warning every time I open a different C++ file in VSCode that I have not opened recently.

image Cppcheck 2.11 release notes has this to say about the warning, under the Interface heading:

"--enable=information" will no longer implicitly enable "missingInclude" starting with 2.16. Please enable it explicitly if you require it.

In case it matters, the project I was analyzing was the kwin window manager in KDE.

The entire message is:

Line could not be parsed: cppcheck: '--enable=information' will no longer implicitly enable 'missingInclude' starting with 2.16. Please enable it explicitly if you require it.' while validating: d:\Linux_home\nathan\src\kwin\src\tabbox\x11_filter.cpp. Please analyze the 'C/C++ FlyLint' Output console. Stacktrace: Error: Line could not be parsed: cppcheck: '--enable=information' will no longer implicitly enable 'missingInclude' starting with 2.16. Please enable it explicitly if you require it.
     at c:\Users\nathan\.vscode\extensions\jbenden.c-cpp-flylint-1.13.0\server\out\server.js:2:12688
     at Array.forEach (<anonymous>)
     at a.parseLines (c:\Users\nathan\.vscode\extensions\jbenden.c-cpp-flylint-1.13.0\server\out\server.js:2:12437)
     at a.lint (c:\Users\nathan\.vscode\extensions\jbenden.c-cpp-flylint-1.13.0\server\out\server.js:2:12340)
     at c:\Users\nathan\.vscode\extensions\jbenden.c-cpp-flylint-1.13.0\server\out\server.js:2:21824
     at Array.forEach (<anonymous>)
     at ...
c @ notificationsAlerts.ts:42

C/C++ Advanced Lint version: 1.13.0 Cppcheck version: 2.11 VSCode version:

Version: 1.79.2 (user setup)
Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06
Date: 2023-06-14T08:57:04.379Z
Electron: 22.5.7
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.19045

Windows version: Microsoft Windows 10 Home 22H2 (OS Build 19045.3086)

spoorcc commented 1 year ago

The .*information missingInclude.* in excludeRegex no longer matches in line https://github.com/jbenden/vscode-c-cpp-flylint/blob/fb4b271d1f47d6fc2930e885101d93825f1b121a/server/src/linters/cppcheck.ts#L82

.*information.*missingInclude.* could work, but I cannot test compatibility with older versions.

jbenden commented 1 year ago

A fix has been committed, although a new release must happen before the change is realized.

Thanks!!!