1 /* 2 EmptyLineSeparator 3 allowNoEmptyLineBetweenFields = (default)false 4 allowMultipleEmptyLines = false 5 allowMultipleEmptyLinesInsideClassMembers = (default)true 6 tokens = (default)PACKAGE_DEF, IMPORT, STATIC_IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF, \ 7 STATIC_INIT, INSTANCE_INIT, METHOD_DEF, CTOR_DEF, VARIABLE_DEF, RECORD_DEF, \ 8 COMPACT_CTOR_DEF 9 10 11 */ 12 13 14 package com.puppycrawl.tools.checkstyle.checks.whitespace.emptylineseparator; // violation ''package' has more than 1 empty lines before.' 15 16 17 import java.util.*; // violation ''import' has more than 1 empty lines before.' 18 19 import java.io.*; 20 21 22 public class // violation ''CLASS_DEF' has more than 1 empty lines before.' 23 InputEmptyLineSeparatorMultipleEmptyLines { 24 25 26 private int counter; // violation ''VARIABLE_DEF' has more than 1 empty lines before.' 27 28 29 30 31 private Object obj = null; // violation ''VARIABLE_DEF' has more than 1 empty lines before.' 32 33 private int k; 34 35 36 private static void foo() {} // violation ''METHOD_DEF' has more than 1 empty lines before.' 37 38 private static void foo1() {} // violation ''}' has more than 1 empty lines after.' 39 40 41 } 42 43 class Test2 { 44 void testFor() 45 { 46 for (int i = 1; i < 5; i++) { 47 } 48 49 50 for(int i = 1;i < 5;i++); 51 } 52 }