1 /*xml 2 <module name="Checker"> 3 <module name="TreeWalker"> 4 <module name="JavadocLeadingAsteriskAlign" /> 5 </module> 6 </module> 7 */ 8 9 package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocleadingasteriskalign; 10 11 /** 12 * This is the class level javadoc. 13 * // violation above 'Leading asterisk has .* indentation .* 1, expected is 2.' 14 */ 15 public class InputJavadocLeadingAsteriskAlignIncorrect { 16 /** 17 * Javadoc for instance variable 18 * // violation above 'Leading asterisk has .* indentation .* 5, expected is 4.' 19 */ 20 private int age; 21 22 /** 23 * // violation 'Leading asterisk has .* indentation .* 3, expected is 4.' 24 */ 25 private String name; 26 27 /** 28 * Javadoc for foo. 29 */ // violation 'Leading asterisk has .* indentation .* 5, expected is 4.' 30 public void foo() {} 31 32 /** 33 */ // violation 'Leading asterisk has .* indentation .* 3, expected is 4.' 34 public void foo2() {} 35 36 /** 37 * // violation 'Leading asterisk has .* indentation .* 7, expected is 4.' 38 */ 39 public void foo3() {} 40 41 /** 42 * // violation 'Leading asterisk has .* indentation .* 1, expected is 4.' 43 */ 44 public void foo4() {} 45 46 /** 47 * Default Constructor. 48 */ // violation 'Leading asterisk has .* indentation .* 7, expected is 4.' 49 public InputJavadocLeadingAsteriskAlignIncorrect() {} 50 51 /** 52 * Parameterized Constructor. 53 */ // violation 'Leading asterisk has .* indentation .* 1, expected is 4.' 54 public InputJavadocLeadingAsteriskAlignIncorrect(String a) {} 55 56 /** 57 * // violation 'Leading asterisk has .* indentation .* 7, expected is 4.' 58 * Inner Class. */ // violation 'Leading asterisk has .* indentation .* 5, expected is 4.' 59 private static class Inner { 60 /** 61 62 */ // violation 'Leading asterisk has .* indentation .* 9, expected is 6.' 63 private Object obj; 64 65 /** 66 * @param testing 67 * Testing...... 68 * // violation above 'Leading asterisk has .* indentation .* 8, expected is 6.' 69 */ 70 void foo(String testing) {} 71 } 72 73 private enum incorrectJavadocEnum { 74 75 /** 76 */ // violation 'Leading asterisk has .* indentation .* 4, expected is 6.' 77 ONE, 78 79 80 /** 81 * Wrong Alignment */ // violation 'Leading asterisk has .* indentation .* 7, expected is 6.' 82 TWO 83 } 84 }