[Codenarc-user] Inherited equals and toString methods gives violations
Brought to you by:
chrismair
From: Mathias Å. <mat...@gm...> - 2011-10-18 21:11:38
|
I have several Grails Domain classes which represent different permissions. e.g. UserPermission, PrintPermission etc. All these domain classes extends a common Permission domain class (Permission.groovy) which holds some common properties and methods. The Permission domain class also holds a toString method and an equals method, which are used by the classes that extends the Permission domain class. However, I still get violations due to the codenarc rules: GrailsDomainHasEquals Rule and GrailsDomainHasToString Rule because the subclasses do not explicit includes these methods. Is there a way to fix this so the violations are ignored for those classes that extends another class which has those methods? Or some other solutions which removes these violations? Thanks |