1 /* 2 VariableDeclarationUsageDistance 3 allowedDistance = (default)3 4 ignoreVariablePattern = (default) 5 validateBetweenScopes = (default)false 6 ignoreFinal = (default)true 7 8 9 */ 10 11 package com.puppycrawl.tools.checkstyle.checks.coding.variabledeclarationusagedistance; 12 13 public class InputVariableDeclarationUsageDistanceLabels { 14 public void method() { 15 boolean eol = false; // violation 'Distance .* is 5.' 16 17 nothing(); 18 nothing(); 19 nothing(); 20 nothing(); 21 myLoop: 22 for (int i = 0; i < 5; i++) { 23 if (i == 5) { 24 eol = true; 25 break myLoop; 26 } 27 } 28 } 29 30 public void nothing() { 31 } 32 }