Using SonarLint for Visual Studio 2019 v4.24.0.20196 in MS Visual Studio Professional 2019 v16.6.5.
In Visual Studio many of my C++ files have the “Remove this empty namespace” warning next to namespaces that are patently not empty! All the lines in these files have green squiggles under them which makes the files difficult to read. Strangely, some of the C++ files without empty namespaces don’t have this warning, as I would expect, but it’s not obvious what’s different about those files.
When I look at the same files in SonarQube they do not have this issue, as expected. SonarLint has been configured to point at the same project settings on our SonarQube server.
Has anyone else seen this? A workaround to temporarily disable this warning other than completely disabling the SonarLint extension in Studio would be nice. I guess one option would be to temporarily relax the rule for empty namespaces in the SonarQube server too.
Note - restarting Studio doesn’t cure this, and it occurs in a team-mate’s Visual Studio too.