Warnings not removed

  • versions used: sonarlint VS extension
  • error observed warnings are not suppressed
  • steps to reproduce: set a warning to None
  • potential workaround: none
    I’ve encountered this problem where I have some private constructors but sonarlint gives me S3453 warning. I then set the action for S3453 to None. It suppressed some of the warnings(6 of 8) but not all. I’ve double checked the children rulesets and they only have the include statement inside which links to my root ruleset.

I’ve seen the same problem reported here on 2017 that when the line of code scales up this problem happens.

Apologies for the latest of the response. I’ll reply in case the information is still of use to you or other users.

Visual Studio is in control of deciding which rules are executed. If a SonarLint rule is reporting an issue, it’s because VS has decided that rule should be executed based on the ruleset configuration and the defaults defined for the rule (and if you are using VS2019, the .editorconfig can also have an impact).

Rule S3453 is enabled by default so if there isn’t a ruleset or the ruleset doesn’t refer to the rule then it will be executed.

If you think a rule is being run when it should be then either the ruleset isn’t configured correctly, or there’s a bug in VS. I’m not aware of a specific VS bug that would produce these results, although you could try closing VS and deleting the solution-level .vs folder (VS caches a lot of editor-related data to improve performance and sometimes doesn’t refresh it correctly).

This topic was automatically closed after 5 days. New replies are no longer allowed.