SonarLint not working in C++ CMake project in Visual Studio 2022 (Unexpanded response file)

Hi @Jacquwes and welcome to the community!

Thanks for sharing your issue with us. Could you check the version of CMake being used by Visual Studio? (the path to the CMake binary being used is printed in the CMake output pane in Visual Studio).

There is a CMake issue affecting CMake 3.28.1 and fixed in CMake 3.28.2 that results in an extra .modmap response file being added to the compile commands when compiling in C++20 mode. See the investigation in this thread for more details.

Since Visual Studio 2022 currently seems to ship an impacted version, could you try installing CMake separately, and configuring Visual Studio to use that installation instead? (Tools → Options → CMake → General → Enable custom CMake executable).

Best regards,