devonfw / sonar-devon4j-plugin

Plugin for SonarQube to validate devonfw architecture
Apache License 2.0
10 stars 16 forks source link

devon naming convention rule hitting Cobigen generated code #139

Closed rhobolic closed 2 years ago

rhobolic commented 2 years ago

Problem The devon rule for naming convention violation is hit for code which is generated by Cobigen image

Expectation It seems that there is a Bug in the rule implementation itself as it is saying for non-abstract classes but here we have an abstract class. The rule should not have fired

hohwille commented 2 years ago

@rhobolic thanks for reporting this: Indeed this is a stupid bug in the rule implementation: https://github.com/devonfw/sonar-devon4j-plugin/blob/a4d62b2b3bc03c3860d2ff903be3a1649631249e/src/main/java/com/devonfw/ide/sonarqube/common/impl/check/naming/DevonNamingConventionClassExtendsClassUcImplCheck.java#L41

hohwille commented 2 years ago

All the naming rules were buggy. I fixed them and did lots of tidy up. I also added your scenario as additional test-case that is now green: https://github.com/devonfw/sonar-devon4j-plugin/blob/36a3c85bfaf7bc9838d66b4dd26a9c67c9818d9f/plugin/src/test/files/naming/DevonNamingConventionUcCase8Check.java#L3