I need example configuration to totally disable check-style for hashCode()
and equals()
methods.
This is maybe not a direct answer to your question, but Lombok really shines on avoiding this sort of boilerplate code: http://projectlombok.org
For this case, you can just annotate your classes with:
@EqualsAndHashCode(of="id")
or
@EqualsAndHashCode(excludes={"these","fields","wont","be","compared"})
Haven't tested it against checkstyle, though...