SONARJAVA-6539 Create rule S8947: JPA entity classes should not be final#5719
Conversation
5ee08d4 to
4268b8f
Compare
|
Code Review 👍 Approved with suggestions 3 resolved / 4 findingsImplements rule S8947 to flag final JPA entity classes, resolving false positives on static and private methods. Please remove the unrelated inclusions of S8908, S8909, and S8948 from the Sonar_way profile before merging. 💡 Quality: Sonar_way profile adds rules unrelated to S8947📄 sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/Sonar_way_profile.json:536-541 This PR is scoped to introducing rule S8947 (JPA entities should not be final), yet the delta commit adds three additional, unrelated rules to the default Sonar_way profile: ✅ 3 resolved✅ Quality: Rule doc claims final-method detection the check doesn't implement
✅ Edge Case: Final static/private methods flagged as false positives
✅ Quality: 'How to fix it' section omits final methods
🤖 Prompt for agentsOptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |




Summary by Gitar
S8947to detect and flagfinalJPA entity classes.S8947Test.javato verify rule detection on compliant and non-compliant code.src/test/files/checks/S8947.javato support testing logic.This will update automatically on new commits.