Expand .NET Message "Classes implementing IEquatable should be sealed" by "..or have Equals virtual"

Must-share information (formatted with Markdown):

  • versions: SonarQube and SonarLint .NET any version
  • what: Understand the alternative fixes
  • The Message implies that I should make each class sealed when it implements IEquatable, but that is too limiting.
  • Only by reading the detailed Discussion here I was able to find the alternative of marking Equals virtual.
  • I would like to see the message amended with a Hint to to this alternative, because I am sure that > 90% of all developers will blindly do the first thing.

Hi,

Could you be more specific about your SonarQube version, please?

 
Thx,
Ann