Cyclomatic Complexity and conditional operators false-positives on equals() method

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cyclomatic Complexity and conditional operators false-positives on equals() method

Michał Kordas
Hi,

I believe the equals() method implementation should not cause the violations of Cyclomatic Complexity and conditional operators:
Obraz w treści 1
This is autogenerated code that fulfils all requirements of good equals() implementation.

What do you think?

Thanks,
Michal Kordas
Reply | Threaded
Open this post in threaded view
|

AW: [sonar-user] Cyclomatic Complexity and conditional operators false-positives on equals() method

Keppler Michael (ETAS/ESW4)

Hi Michal,

 

completely agree. As a workaround: If the complete class is auto generated, you could put it into a different source folder and exclude that one from the Sonar analysis. This is what we do for xtext generated code.

 

Ciao, Michael

 

Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Michal Kordas
Gesendet: Freitag, 22. Mai 2015 00:25
An: [hidden email]
Betreff: [sonar-user] Cyclomatic Complexity and conditional operators false-positives on equals() method

 

Hi,

 

I believe the equals() method implementation should not cause the violations of Cyclomatic Complexity and conditional operators:

Obraz w treści 1

This is autogenerated code that fulfils all requirements of good equals() implementation.

 

What do you think?

 

Thanks,

Michal Kordas