I am using sonar-scanner-6.1.0.4477-windows-x64 for my open source project.
I just upgraded my MSVC C++ compiler settings to C++23, by defining
<LanguageStandard>stdcpp23</LanguageStandard>
which is a new with Visual Studio 2022 version 17.13. At the moment this will pass /std:c++23preview on the cmd-line to cl.exe. This causes however a problem for sonarscanner:
The SonarScanner failed in the CI pipeline with:
15:57:42.355 ERROR Error during SonarScanner Engine execution
java.lang.IllegalArgumentException: /std:c++23preview is not supported.
at com.sonar.cpp.analyzer.MsvcDriver$MSVCVersion.cplusplusValue(MsvcDriver.java:903)
at com.sonar.cpp.analyzer.MsvcDriver.prepareActionCpp(MsvcDriver.java:717)
at com.sonar.cpp.analyzer.MsvcDriver.onCapture(MsvcDriver.java:229)
at com.sonar.cpp.analyzer.CompilerDrivers.onCapture(CompilerDrivers.java:47)
at com.sonar.cpp.plugin.CFamilySensor.lambda$process$8(CFamilySensor.java:600)
at com.sonar.cpp.plugin.BuildWrapperJsonReader.readCaptures(BuildWrapperJsonReader.java:114)
at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:598)
at com.sonar.cpp.plugin.CFamilySensor.processConfigurationReader(CFamilySensor.java:508)
at com.sonar.cpp.plugin.CFamilySensor.lambda$process$3(CFamilySensor.java:248)
at java.base/java.lang.Iterable.forEach(Unknown Source)
at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:248)
at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:192)
Is there a workaround for this problem?