1 /*xml 2 <module name="Checker"> 3 <module name="TreeWalker"> 4 <module name="JavadocParagraph"> 5 <property name="allowNewlineParagraph" value="false"/> 6 </module> 7 </module> 8 </module> 9 */ 10 package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocparagraph; 11 12 // xdoc section -- start 13 // violation 5 lines below '<p> tag should be preceded with an empty line' 14 /** 15 * No tag 16 * 17 * <p>Tag immediately before the text 18 * <p>No blank line before the tag 19 * 20 * <p> 21 * New line after tag 22 * 23 * <p> Whitespace after tag 24 * 25 * <p><b>p tag before inline tag B, this is ok</b></p> 26 */ 27 // violation 7 lines above 'tag should be placed immediately before the first word' 28 // violation 5 lines above 'tag should be placed immediately before the first word' 29 public class Example2 { 30 // 2 violations 6 lines below: 31 // 'tag should be placed immediately before the first word' 32 // '<p> tag should not precede HTML block-tag '<pre>'' 33 /** 34 * No tag 35 * 36 * <p> 37 * <pre>item 1</pre> 38 * 39 * <table> 40 * <tbody> 41 * <p> 42 * <tr> 43 * nested paragraph preceding block tag, this is ok. 44 * </tr> 45 * </tbody> 46 * </table> 47 */ 48 49 void foo1() {} 50 51 // 2 violations 4 lines below: 52 // 'tag should be placed immediately before the first word' 53 // 'Redundant <p> tag' 54 /** 55 * <p> 56 * Checks whether a redundant tag is present 57 * </p> 58 */ 59 void foo2() {} 60 61 // violation 3 lines below 'Empty line should be followed by <p> tag' 62 /** 63 * Double newline. 64 * 65 * Some Paragraph. 66 */ 67 void foo3() {} 68 } 69 // xdoc section -- end