Class CurlyBracketsStructureCheck

  • All Implemented Interfaces:
    Configurable, Contextualizable

    public final class CurlyBracketsStructureCheck
    extends AbstractCheck
    Checks node/closing curly brackets to be the last symbols on the line.

    This is how a correct curly bracket structure should look like:

     String[] array = new String[] {
          "first",
          "second"
     };
     
    or
     String[] array = new String[] {"first", "second"};
     

    The motivation for such formatting is simple - we want to see the entire block as fast as possible. When you look at a block of code you should be able to see where it starts and where it ends.

    Since:
    0.6