SteveDunn / Vogen

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

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

Closed shupoval closed 1 month ago

shupoval commented 1 month 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 1 month 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 1 month 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.