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