1 /* 2 JavadocParagraph 3 violateExecutionOnNonTightHtml = (default)false 4 allowNewlineParagraph = (default)true 5 6 7 */ 8 9 package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocparagraph; 10 11 // violation 3 lines below 'tag should be preceded with an empty line.' 12 /** 13 * Some Summary. 14 * <p> 15 * Some paragraph.<p> 16 * 17 */ 18 // violation 3 lines above 'tag should be preceded with an empty line.' 19 class InputJavadocParagraphIncorrect { 20 // violation 2 lines below 'tag should be preceded with an empty line.' 21 /** 22 * Some summary.<P> 23 * 24 * <p> Some paragraph. 25 * 26 * @since 8.0 27 */ 28 // violation 4 lines above 'tag should be placed immediately before the first word' 29 public static final byte NUL = 0; 30 31 // violation 3 lines below '<p> tag should be preceded with an empty line.' 32 // violation 4 lines below 'tag should be placed immediately before the first word' 33 /** 34 * Some <p>summary. 35 * 36 * <p> Some paragraph. 37 * 38 * @see <a href="example.com"> 39 * Documentation about GWT emulated source</a> 40 */ 41 boolean emulated() {return false;} 42 43 // 2 violations 4 lines below: 44 // 'Redundant <p> tag.' 45 // 'tag should be preceded with an empty line.' 46 // violation 2 lines below 'tag should be preceded with an empty line.' 47 /**<p>Some summary.<p> 48 * <p> 49 * <p><p> 50 * <p> Some paragraph.<p>*/ 51 // 2 violations 2 lines above: 52 // 'tag should be preceded with an empty line.' 53 // 'tag should be preceded with an empty line.' 54 // 4 violations 4 lines above: 55 // '<p> tag should be placed immediately before the first word' 56 // 'tag should be preceded with an empty line.' 57 // '<p> tag should be placed immediately before the first word' 58 // 'tag should be preceded with an empty line.' 59 class InnerInputJavadocParagraphIncorrect { 60 // violation 2 lines below 'tag should be preceded with an empty line.' 61 /** 62 * Some Summary.<p> 63 * 64 * @since 8.0 65 */ 66 public static final byte NUL = 0; 67 68 // violation below 'Redundant <p> tag.' 69 /**<p> 70 * Some Summary. 71 * 72 * <P> 73 * 74 * <p> 75 * Some paragraph.<p> 76 * @see <a href="example.com"> 77 * Documentation about GWT emulated source</a> 78 */ 79 // violation 4 lines above 'tag should be preceded with an empty line.' 80 boolean emulated() {return false;} 81 } 82 83 InnerInputJavadocParagraphIncorrect anon = new InnerInputJavadocParagraphIncorrect() { 84 // violation 2 lines below 'Redundant <p> tag.' 85 /** 86 * <p>Some summary. 87 * 88 * Some paragraph. 89 * 90 * @since 8.0 91 */ 92 // violation 5 lines above 'Empty line should be followed by <p> tag on the next line.' 93 public static final byte NUL = 0; 94 // violation 3 lines below 'tag should be preceded with an empty line.' 95 // violation 4 lines below 'tag should be placed immediately before the first word' 96 /** 97 * Some summary.<p> 98 * 99 * <p> Some paragraph. 100 * 101 * @see <a href="example.com"> 102 * Documentation about <p> GWT emulated source</a> 103 */ 104 boolean emulated() {return false;} 105 106 // violation 3 lines below 'Empty line should be followed by <p> tag on the next line.' 107 /** 108 * Some Summary. 109 * 110 * 111 * Some paragraph. 112 */ 113 // violation 3 lines above 'Empty line should be followed by <p> tag on the next line.' 114 void doubleNewline() {} 115 }; 116 }