A disabled rule is still active connected mode

  • Operating system: Windows 11 Professional 21H2 (french)
  • Visual Studio version: 2022 17.14.13
  • SonarQube for Visual Studio plugin version: 8.25.0.13952
  • Programming language you’re coding in: C++
  • Is connected mode used: yes, with SonarQube Cloud

Hello,

I disabled a rule in the quality profile for a projet, and although I use the connected mode, the concerned rule still raises error.

In the log, I can see, at the beginning, the line:

[ThreadId 1] [Connected Mode > Shared Binding] The shared binding configuration file was not found and will not be used. Probed path: not found

But from the extension configuration, the binding seems to be done.

Hi,

Could we get the verbose log from startup to the problem?

 
Thx,
Ann

The problem was:

I had a class deriving publically of an other class. I set a private inheritance, but then I got a S3540 error. And I disabled it.

But I realized later (after my post) the modification has been done it is in a Git submodule, which doesn’t have its own Sonar project. May be the source of the problem ?

PS: Log file sent in private message

Hi,

Does that mean the submodule isn’t analyzed on the server?

And did you disable the rule in the default profile, or in a project-specific one?

 
Thx,
Ann

I don’t see any raised error (accepted or not) in the matching directory, in spite many ones raised SonarQube for IDE, so I suppose it is not analyzed on the server.

In a specific one.

Hi,

Okay, I think we have our cause then. Essentially, there’s nothing to connect to so the default profile was applied.

 
HTH,
Ann

Hello,

Are you talking about the submodule ?

Should I create a Sonar project for this submodule (it isn’t buildable separately) ?

Hi,

Is it checked out separately?

 
Ann

No, it is always checked out as a submodule. It’s a kind of library, but as a source.

Hi,

Okay, I’m not sure where to go with “separate checkout but not separate build”.

I’m going to flag this for more expert eyes.

 
Ann

Hi,

Oaky, I’m waiting for these expert eyes. :slight_smile:

Hello @Oodini,

The log that you mentioned is not referring to any error with the binding. It’s just an information that a shared binding configuration is not present for your project (you can learn more about shared binding configurations here)

[ThreadId 1] [Connected Mode > Shared Binding] The shared binding configuration file was not found and will not be used. Probed path: not found

I took a look at the logs and I couldn’t trace the root of the problem you are experiencing.

Could you, please, confirm that the S3540 is indeed disabled for your project in SonarQube Cloud? If you add this issue in an existing file of your main project (that is not part of the submodule) is it being raised as well or not?

Regards,
Gabriela

Hello,

In Administration > Quality profiles > C++ is set a customzied profile. Let’s call it CustomProfile.

In my organisation setttings, I choose the Quality Profiles tab, and for the C++ language, I choose CustomProfile. I click on xxx active rules.On the next page, as I can’t filter by rule number, I’m referring to the S3540’s features for filtering: Intentionality / Maintenability / Low. In the list, I cannot find the string “Base class access specifiers should not be redundant”.

Next, I click on yyy inactive rules, and I can’t find either S3540.

At the bottom of the page of S3540 page, it is said: “This rule isn’t activated on any Quality Profiles”.

It is also raised.

I removed the bind, and binded again, and now, that does work.

Hi! @Oodini

Glad you were able to resolve the issue! Seems like we have a bug in the Quality Profile synchronization, but it’s hard to reproduce and track down.