1 /* 2 SummaryJavadoc 3 violateExecutionOnNonTightHtml = (default)false 4 forbiddenSummaryFragments = ^@return the *|^This method returns |^A \ 5 [{]@code [a-zA-Z0-9]+[}]( is a ) 6 period = (default). 7 8 9 */ 10 11 package com.puppycrawl.tools.checkstyle.checks.javadoc.summaryjavadoc; 12 13 /** 14 * A {@code Foo. Foo} 15 * is a simple Javadoc. Some javadoc. 16 */ 17 class InputSummaryJavadocIncorrect { 18 19 // violation below 'First sentence .* missing an ending period.' 20 /** 21 * As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)} 22 */ 23 void foo3() {} 24 // violation below 'Summary javadoc is missing.' 25 /** 26 * @throws Exception if a problem occurs 27 */ 28 void foo4() throws Exception {} 29 30 /** An especially short bit of Javadoc. */ 31 void foo5() {} 32 33 /** 34 * An especially short bit of Javadoc. 35 */ 36 void foo6() {} 37 38 /** 39 * Some Javadoc. 40 */ 41 public static final byte NUL = 0; 42 // violation below 'Summary javadoc is missing.' 43 /** 44 * <a href="mailto:vlad@htmlbook.ru"/> 45 */ 46 class InnerInputCorrectJavaDocParagraphCheck { 47 // violation below 'First sentence .* missing an ending period.' 48 /** 49 * foooo@foooo 50 */ 51 public static final byte NUL = 0; 52 53 /** 54 * Some java@doc. 55 */ 56 public static final byte NUL_2 = 0; 57 // violation below 'Forbidden summary fragment.' 58 /** 59 * This method 60 * returns some javadoc. Some javadoc. 61 */ 62 boolean emulated() {return false;} 63 // violation below 'Summary javadoc is missing.' 64 /** 65 * <a href="mailto:vlad@htmlbook.ru"/> 66 */ 67 void foo2() {} 68 // violation below 'Summary javadoc is missing.' 69 /** 70 * @return the 71 * customer ID some javadoc. 72 */ 73 int geId() {return 666;} 74 75 /** 76 * As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)}. 77 */ 78 void foo3() {} 79 // violation below 'Summary javadoc is missing.' 80 /** 81 * @throws Exception if a problem occurs 82 */ 83 void foo4() throws Exception {} 84 85 /** An especially short bit of Javadoc. */ 86 void foo5() {} 87 88 /** 89 * An especially short bit of Javadoc. 90 */ 91 void foo6() {} 92 } 93 // violation below 'Forbidden summary fragment.' 94 /** 95 * A {@code InnerInputCorrectJavaDocParagraphCheck} is a simple code. 96 */ 97 InnerInputCorrectJavaDocParagraphCheck anon = new InnerInputCorrectJavaDocParagraphCheck() { 98 99 /** 100 * Some Javadoc. 101 */ 102 public static final byte NUL = 0; 103 104 /** 105 * Some Javadoc. 106 */ 107 void emulated(String s) {} 108 109 /** 110 * As of JDK 1.1, replaced by {@link #setBounds(int,int,int,int)}. 111 */ 112 void foo3() {} 113 // violation below 'Summary javadoc is missing.' 114 /** 115 * @throws Exception if a problem occurs 116 */ 117 void foo4() throws Exception {} 118 119 /** An especially short bit of Javadoc. */ 120 void foo5() {} 121 122 /** 123 * An especially short bit of Javadoc. 124 */ 125 void foo6() {} 126 // violation below 'First sentence .* missing an ending period.' 127 /** 128 * mm{@inheritDoc} 129 */ 130 void foo7() {} 131 // violation below 'Summary javadoc is missing.' 132 /** 133 * {@link #setBounds(int,int,int,int)} 134 */ 135 void foo8() {} 136 // violation below 'Summary javadoc is missing.' 137 /** 138 * 139 */ 140 void foo10() {} 141 }; 142 // violation below 'First sentence .* missing an ending period.' 143 /** 144 * M m m m {@inheritDoc} 145 */ 146 void foo7() {} 147 // violation below 'Summary javadoc is missing.' 148 /** */ 149 <T> T foo8(T t) {return null;} 150 // violation below 'Summary javadoc is missing.' 151 /** */ 152 String[] foo9() {return null;} 153 154 /** 155 * This is the summary. 156 * {@summary This is NOT summary according to javadoc tool} 157 */ 158 void testMethod() { 159 } 160 }