SonarOpenCommunity / sonar-cxx

SonarQube C++ Community plugin (cxx plugin): This plugin adds C++ support to SonarQube with the focus on integration of existing C++ tools.
GNU Lesser General Public License v3.0
1k stars 364 forks source link

Support C++/CLI #539

Closed Bertk closed 9 years ago

Bertk commented 9 years ago

We have native and managed C++ code and until now C++/CLI is not supported from any plug-in. It should be possible to support the C++/CLI extension within the C++ community plugin. What is your opinion on this feature? I created a branch with a first limited support of C++/CLI (c0853b265d444be4878dd7ce3942b75bdb1330d2)

See also: https://msdn.microsoft.com/en-us/library/xey702bw.aspx http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-372.pdf

guwirth commented 3 years ago

Hi @zadigus,

A „normal“ compiler is doing syntax and semantic analysis. In case you are doing a syntax analysis only you don’t need all types. Means not all includes (using directives) and types are necessary if their absence do not lead to a syntax error.

https://github.com/SonarOpenCommunity/sonar-cxx/wiki/Detect-and-fix-parsing-errors

To try that out you can download and use https://github.com/SonarOpenCommunity/sonar-cxx/releases/download/cxx-2.0.5/cxx-sslr-toolkit-2.0.5.2867.jar

Copy your code into the tool (as plain ASCII) and try it out.

Regards,