Incorrect Code Smell (csharpsquid:S2339) Raised By Sonar

The documentation includes general guidance on adding coding rules, including which languages support adding custom rules, and general guidance on how to go about it.
If the docs don’t answer your question, please tell us:

  • What language are you writing rules for?
  • What have you tried, and what’s your challenge / stumbling block
    For the rule csharpsquid:S2339,
    I have verified the behavior mentioned in this issue, and behavior is different than whatever mentioned in the reason for the issue. Either user declare variable as const or static readonly, in both case in-order to reflect the updated value via assembly, client project need to be build with updated dll reference.
    Please share the relevant code snippet, along with any error messages you’re encountering:


Welcome to the community!

You’re reporting a false positive in an existing rule?

Where are you seeing this? In SonarCloud? In SonarQube, and if so which version?

Can you provide a code snippet that demonstrates the false positive?