1 /* 2 SingleSpaceSeparator 3 validateComments = (default)false 4 5 6 */ 7 8 package com.puppycrawl.tools.checkstyle.checks.whitespace.singlespaceseparator; 9 10 public class InputSingleSpaceSeparatorWithEmoji { 11 12 String s1 = "🧐😉 assa "; // ok 13 String s2 = "🧐😉" + " " + "assa "; // ok 14 String s3 = "🧐" + "🎄 "; // violation 'Use a single space to separate non-whitespace characters' 15 String s4 16 = "da🎄"; // violation 'Use a single space to separate non-whitespace characters' 17 private void foo(String s) { 18 if (s.equals("🤩🎄") ){ // violation 'Use a single space to separate non-whitespace characters' 19 foo(s); 20 } 21 } 22 23 /* ok */ /*🧐*/ String s = "🎄😉"; 24 String /* 🧐 block comment ok */ st = "🎄 assa"; 25 // violation above 'Use a single space to separate non-whitespace characters' 26 String str = "🤩🎄"; // Multiple whitespaces before comment 27 ; String j = ""; // violation 'Use a single space to separate non-whitespace characters' 28 /** 29 * ok 30 */ 31 void foo2() { 32 /* ok */ 33 String s = "🧐 🧐"; // violation 'Use a single space to separate non-whitespace characters' 34 } // ok 35 36 private void foo3 (String s) { // 3 violations 37 if (s.substring(0).equals("da🎄") ) { // 2 violations 38 if ("🧐". // violation 'Use a single space to separate non-whitespace characters' 39 isEmpty()){ 40 /*🧐*/ } else { // violation 'Use a single space to separate non-whitespace characters' 41 } 42 } 43 44 } 45 }