Class MethodBodyCommentsCheck

  • All Implemented Interfaces:
    Configurable, Contextualizable

    public final class MethodBodyCommentsCheck
    extends AbstractCheck
    Checks method bodies for comments. All comments in method bodies are prohibited.

    We believe that in-code comments and empty lines are evil. If you need to use a comment inside a method - your code needs refactoring. Either move that comment to a method javadoc block or add a logging mechanism with the same text.

    To do:
    #260 Add handling of multiple anonymous classes inside methods by looking at the recursive tree.