Is there a Checkstyle / PMD rule "Non-abstract classes should not be called AbstractXXX"?

The Java project I'm working on uses a combination of code analysis tools: PMD, Checkstyle, and FindBugs. They collect a lot of errors, style problems, etc., but often slip through the network:

public class AbstractBadlyNamedClass { // Not abstract! // ... } 

Please note that another method is checked, i.e. public abstract BadlyNamedClass gives a PMD warning "Abstract classes should be called AbstractXXX."

Can anyone advise if there is a way to check this, either with one of the indicated tools (perhaps some special rule?), Or another automatic tool that would do this job?

+6
source share
1 answer

I think checkstyle AbstractClassName is what you are looking for.

+5
source

Source: https://habr.com/ru/post/984512/


All Articles