SteveDunn / Vogen

A semi-opinionated library which is a source generator and a code analyser. It Source generates Value Objects
Apache License 2.0
889 stars 46 forks source link

"Equals" and the comparison operators should be overridden when implementing "IComparable" #650

Closed shupoval closed 4 months ago

shupoval commented 4 months ago

Describe the feature

SonarQube has a rule that "Equals" and the comparison operators should be overridden when implementing "IComparable".

The following operator overloads are still missing in value objects generated by Vogen: <, <=, >, >=

It's a minor thing, but it would be great if Vogen could generate missing operator overloads too.

SteveDunn commented 4 months ago

Hi @shupoval - thanks for the feedback. There's is a lengthy thread here about the same issue, so I'll close this one. In that thread you can see how to turn off IComparable if you don't need, thereby silencing SonarQube. Thanks again!

shupoval commented 4 months ago

Oh, my mistake. I apologize for not checking the backlog for a similar issue. Thanks a lot for pointing me in the right direction.