1 /* 2 JavadocStyle 3 scope = (default)private 4 excludeScope = (default)null 5 checkFirstSentence = (default)true 6 endOfSentenceFormat = (default)([.?!][ \t\n\r\f<])|([.?!]$) 7 checkEmptyJavadoc = (default)false 8 checkHtml = (default)true 9 tokens = (default)ANNOTATION_DEF, ANNOTATION_FIELD_DEF, CLASS_DEF, CTOR_DEF, \ 10 ENUM_CONSTANT_DEF, ENUM_DEF, INTERFACE_DEF, METHOD_DEF, PACKAGE_DEF, \ 11 VARIABLE_DEF, RECORD_DEF, COMPACT_CTOR_DEF 12 13 14 */ 15 16 package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocstyle; 17 18 public class InputJavadocStyleDefaultSettingsTwo 19 { 20 // violation 6 lines below 'Extra HTML tag found: </img>' 21 /** 22 * Real men don't use XHTML. 23 * <br /> 24 * <hr/> 25 * < br/> 26 * <img src="schattenparker.jpg"/></img> 27 */ 28 private void method12() {} 29 30 /** 31 * First sentence. 32 * <pre> 33 * +--LITERAL_DO (do) 34 * | 35 * +--SLIST ({) 36 * | 37 * +--EXPR 38 * | 39 * +--ASSIGN (=) 40 * | 41 * +--IDENT (x) 42 * +--METHOD_CALL (() 43 * | 44 * +--DOT (.) 45 * | 46 * +--IDENT (rand) 47 * +--IDENT (nextInt) 48 * +--ELIST 49 * | 50 * +--EXPR 51 * | 52 * +--NUM_INT (10) 53 * +--RPAREN ()) 54 * +--SEMI (;) 55 * +--RCURLY (}) 56 * +--LPAREN (() 57 * +--EXPR 58 * | 59 * +--LT (<) 60 * | 61 * +--IDENT (x) 62 * +--NUM_INT (5) 63 * +--RPAREN ()) 64 * +--SEMI (;) 65 * </pre> 66 */ 67 private void method13() {} 68 69 // violation 3 lines below 'Unclosed HTML tag found: <blockquote>' 70 /** 71 * Some problematic javadoc. Sample usage: 72 * <blockquote> 73 */ 74 private void method14() {} 75 76 // violation below 'First sentence should end with a period.' 77 /** 78 * Empty line between javadoc and method declaration cause wrong 79 * line number for reporting error (bug 841942) 80 */ 81 82 private void method15() {} 83 84 /** Description of field: {@value}. */ 85 public static final int dummy = 4911; 86 87 /** 88 */ 89 public void method16() {} 90 91 /** 92 * @param a A parameter 93 */ 94 protected void method17(String a) {} 95 96 /** 97 * @exception RuntimeException should be thrown 98 */ 99 void method18(String a) {} 100 /** 101 */ 102 private static int ASDF = 0; 103 104 /** @see java.lang.Object */ 105 public void method19() {} 106 107 // violation 5 lines below 'Extra HTML tag found: </string>' 108 /** 109 * Checks HTML tags in javadoc. 110 * 111 * HTML no good tag 112 * <string>Tests</string> 113 * 114 */ 115 public void method20() {} 116 117 /** Set of all class field names.*/ 118 public String field; 119 }