Some C++ code smell warnings do not work in SonarLint plugin for VS 2019

Hi. I am using a SonarLint plugin (version 4.29) in VS 2019 in C++ project (compiled with /std:c++17). I did not apply any configuraiton changes: just installed the plugin. It seems to work to some extent: some warnings are reported from SonarSource. But when I try to test C++17 code smells described in SonarSource page, like " Structured binding should be used" or “std::scoped_lock should be created with constructor arguments” or " static_assert with no message should be used over static_assert with empty or redundant message".

Do these checks have to be explicitly enabled? Or are they available in this configuration of SonarLint? Is there a way to debug the problem in VS? I would appreciate any help.

Hello @akrzemi1,

While the mentioned rules are currently available on SonarQube and SonarCloud (As announced here), they are not yet available on SonarLint for Visual Studio.

SonarQube and SonarLint have different release cycles.
These rules are going to be part of SonarLint for VS next release.

Thanks,

Hello @akrzemi1,

A new version of sonarlint that includes the C++17 rules is released. Let me know of you have further question.

Thanks,

2 Likes

My new version of SonarLint now works perfectly! Thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.