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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cppcheck line not parsed, perhaps cause it has an URL in it?

gatopeich opened this issue · comments

Got "Line could not be parsed" for a pretty common issue:

vscode-c-cpp-flylint: 'Line could not be parsed: /home/apozuelo/E2-SIM/Tera5G/E2/include/asn1c++.h:233: style: C-style pointer casting detected. C++ offers four different kinds of casts as replacements: static_cast, const_cast, dynamic_cast and reinterpret_cast. A C-style cast could evaluate to any of those automatically, thus it is considered safer if the programmer explicitly states which kind of cast is expected. See also: https://www.securecoding.cert.org/confluence/display/cplusplus/EXP05-CPP.+Do+not+use+C-style+casts.' while validating: /home/user//.cpp. Please analyze the 'C/C++ FlyLint' Output console.

The issue was that I had added "--template=gcc" to the command line, producing an output that does not match flylint's regular expression as defined here:

let regex = /^(.+?)\s\s([0-9]+)\s([0-9]+\s)?\s(style|information|portability|performance|warning|error)\s(.+?):\s(.*)$/;