Class NoCodeInFileCheck

  • All Implemented Interfaces:
    Configurable, Contextualizable

    public class NoCodeInFileCheck
    extends AbstractCheck

    Checks whether file contains code. Files which are considered to have no code:

    • File with no text
    • File with single-line comment(s)
    • File with a multi line comment(s).

    To configure the check:

     <module name="NoCodeInFile"/>


    Content of the files:

     // single-line comment // violation
     /* // violation
      block comment

    Parent is

    Violation Message Keys: