1 package com.google.checkstyle.test.chapter7javadoc.rule712paragraphs; 2 3 /** 4 * Some Javadoc. 5 * 6 * <p>Some Javadoc. 7 * 8 * <p> 9 */ 10 // violation 2 lines above '<p> tag should be placed immediately before the first word' 11 class InputFormattedIncorrectJavadocParagraph { 12 13 // violation 4 lines below '<p> tag should be placed immediately before the first word' 14 /** 15 * Some Javadoc. 16 * 17 * <p> 18 * 19 * <p>Some Javadoc. 20 * 21 * @since 8.0 22 */ 23 public static final byte NUL = 0; 24 25 /** 26 * Some 27 * 28 * <p>Javadoc. 29 * 30 * <p>Some Javadoc. 31 * 32 * @see <a href="example.com">Documentation about GWT emulated source</a> 33 */ 34 boolean emulated() { 35 return false; 36 } 37 38 // violation 6 lines below '<p> tag should be placed immediately before the first word' 39 // violation 7 lines below '<p> tag should be placed immediately before the first word' 40 // violation 8 lines below '<p> tag should be placed immediately before the first word' 41 /** 42 * Some Javadoc. 43 * 44 * <p> 45 * 46 * <p> 47 * 48 * <p> 49 * 50 * <p>Some Javadoc. 51 * 52 * <p> 53 */ 54 // violation 2 lines above '<p> tag should be placed immediately before the first word' 55 class InnerInputCorrectJavaDocParagraphCheck { 56 57 // violation 4 lines below '<p> tag should be placed immediately before the first word' 58 /** 59 * Some Javadoc. 60 * 61 * <p> 62 * 63 * @since 8.0 64 */ 65 public static final byte NUL = 0; 66 67 // violation 5 lines below '<p> tag should be placed immediately before the first word' 68 // violation 8 lines below '<p> tag should be placed immediately before the first word' 69 /** 70 * Some Javadoc. 71 * 72 * <p> 73 * 74 * <p>Some Javadoc. 75 * 76 * <p> 77 * 78 * @see <a href="example.com">Documentation about GWT emulated source</a> 79 */ 80 boolean emulated() { 81 return false; 82 } 83 } 84 85 InnerInputCorrectJavaDocParagraphCheck anon = 86 new InnerInputCorrectJavaDocParagraphCheck() { 87 88 /** 89 * Some Javadoc. 90 * 91 * <p>Some Javadoc. 92 * 93 * @since 8.0 94 */ 95 public static final byte NUL = 0; 96 97 // violation 4 lines below '<p> tag should be placed immediately before the first word' 98 /** 99 * Some Javadoc. 100 * 101 * <p> 102 * 103 * <p>Some Javadoc. 104 * 105 * @see <a href="example.com">Documentation about 106 * <p>GWT emulated source</a> 107 */ 108 boolean emulated() { 109 return false; 110 } 111 }; 112 113 // 2 violations 6 lines below: 114 // '<p> tag should be placed immediately before the first word' 115 // '<p> tag should not precede HTML block-tag '<h1>'' 116 /** 117 * Some summary. 118 * 119 * <p> 120 * 121 * <h1>Testing...</h1> 122 */ 123 class InnerPrecedingPtag { 124 125 // 2 violations 6 lines below: 126 // '<p> tag should be placed immediately before the first word' 127 // '<p> tag should not precede HTML block-tag '<ul>'' 128 /** 129 * Some summary. 130 * 131 * <p> 132 * 133 * <ul> 134 * <p> 135 * <li>1 should NOT give violation as there is not empty line before 136 * </ul> 137 */ 138 public void foo() {} 139 140 // 2 violations 6 lines below: 141 // '<p> tag should be placed immediately before the first word' 142 // '<p> tag should not precede HTML block-tag '<table>'' 143 /** 144 * Some summary. 145 * 146 * <p> 147 * 148 * <table> 149 * </table> 150 */ 151 public void fooo() {} 152 153 // 2 violations 6 lines below: 154 // '<p> tag should be placed immediately before the first word' 155 // '<p> tag should not precede HTML block-tag '<pre>'' 156 /** 157 * Some summary. 158 * 159 * <p> 160 * 161 * <pre>testing...</pre> 162 * 163 * <pre>testing...</pre> 164 */ 165 public void foooo() {} 166 } 167 }