We’re doing scans locally on our Windows development systems connecting to our local SQ server instance. Our source is written in a number of languages, C, C++, Javascript, etc.
Our C/C++/C# code is written using Visual Studio 2019. The small subset of our source code is written in C# (although named .cpp, because reasons) using .NET 4.0. We compile through out own custom set of batch files, and wrap that with build-wrapper.
This works well. The C# files in question are built with /clr as a flag. When we run the scan, we get the following warning:
15:44:40.660 WARN Microsoft extension activated by “/clr:nostdlib” compiler option is not supported, skip analysis of files: [redacted.cpp]
Now, to be clear, we don’t build managed code separately. We are doing 100% of the compiling via msbuild in our batch files. The C# files sit next to our regular C/C++ code in common projects in our giant solution.
The C# files are definitely excluded (grayed out in the files section) from the resulting report. We are explicitly excluding *.cs files in sonar-project.properties, but as I said earlier, these particular files have a .cpp extension.
What do I need to do to get these files to scan? Is the problem the goofy file extensions? Something we aren’t doing in build-wrapper? Something we aren’t doing is sonar-scanner? Something we need to enable on our server?
Enquiring minds need to know!