Got few critical sonar issues in our application related to → This class is part of one cycle containing classes within package(javaarchitecture:S7027).
this S7027 rule is getting applied to any class that even if has an Entity annotation and have JPA/Hibernate associations with annotations like OneToMany and ManyToOne annotations. In our application we have a valid association between the classes still sonar cloud is flagging it as critical issue whereas its a proper JPA/Hibernate association that is taking place. is there any fix getting released for this false positive in near future.
See it the same way, was already discussed in Advanced Class Cycle Detection for Java - Sonar Updates - Sonar Community
in this post few have mentioned that it is still not fixed for s7027…
Since Advanced Class Cycle Detection for Java requests to create a new topic to report a false positive this topic might not get seen. So I created a new false positive report:
Thank you for reporting this! We’re aware of the issue with this rule, and there’s already a ticket in our backlog to improve it.
That said, we’ve taken a slightly different approach to our architecture analysis, so it’s unclear when we’ll be able to address this specific rule. Please do keep an eye on future releases though, we have some exciting improvements on the way!
In the meantime, if this rule is creating too much noise in your project, I recommend disabling it in your Quality Profile.
I hope this helps!
All the best,
Irina