Location of the settings.json file

I’m using standalone SonarLint for C++ projects. Is it possible to change the default location of file settings.json? Is it fixed to
“C:\Users<user>\AppData\Roaming\SonarLint for Visual Studio\settings.json”?
Can I somehow generate/download the settings.json file with full default settings?

Thanks in advance.

Hi @grzesiek256 - welcome to the community.

No, it’s fixed.

There isn’t a direct way to do this. However, connected mode uses the same json file format for C and C++ rules, so if you e.g. bound a C++ project to a dummy project on SonarCloud, SonarLint would generate two rules json files, one for C and one C++.

I think the two attached files are up to date:

SonarWay_c_25112021.json (22.1 KB)
SonarWay_cpp_25112021.json (38.4 KB)

Thanks a lot!
One more question - is it possible to use .editorconfig instead of settings.json for C++ projects?

No, .editorconfig files are not supported.

Ok that’s all I wanted to know, thank you for your help.

1 Like