1 /* 2 JavadocStyle 3 scope = public 4 excludeScope = (default)null 5 checkFirstSentence = (default)true 6 endOfSentenceFormat = (default)([.?!][ \t\n\r\f<])|([.?!]$) 7 checkEmptyJavadoc = (default)false 8 checkHtml = false 9 tokens = METHOD_DEF 10 11 12 */ 13 14 package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocstyle; 15 16 public class InputJavadocStyleRestrictedTokenSet1 17 { 18 // This is OK. We don't flag missing javadoc. That's left for other checks. 19 private String first; 20 21 /** This Javadoc is missing an ending period */ 22 private String second; 23 24 /** 25 * We don't want {@link com.puppycrawl.tools.checkstyle.checks.JavadocStyleCheck} 26 * tags to stop the scan for the end of sentence. 27 * @see Something 28 */ 29 public InputJavadocStyleRestrictedTokenSet1() {} 30 31 /** 32 * This is ok! 33 */ 34 private void method1() {} 35 36 /** 37 * This is ok? 38 */ 39 private void method2() {} 40 41 /** 42 * And This is ok.<br> 43 */ 44 private void method3() {} 45 46 /** 47 * This should fail even.though.there are embedded periods 48 */ 49 private void method4() {} 50 51 /** 52 * Test HTML in Javadoc comment 53 * <dl> 54 * <dt><b>This guy is missing end of bold tag 55 * <dd>The dt and dd don't require end tags. 56 * </dl> 57 * </td>Extra tag shouldn't be here 58 * <style>this tag isn't supported in Javadoc</style> 59 * @param arg1 <code>dummy. 60 */ 61 private void method5(int arg1) {} 62 63 /** 64 * Protected check <b>should fail 65 */ 66 protected void method6() {} 67 68 /** 69 * Package protected check <b>should fail 70 */ 71 void method7() {} 72 73 // violation below 'First sentence should end with a period.' 74 /** 75 * Public check should fail</code> 76 * should fail < 77 */ 78 public void method8() {} 79 80 /** {@inheritDoc} **/ 81 public void method9() {} 82 83 // Testcases to exercise the Tag parser (bug 843887) 84 85 /** 86 * Real men don't use XHTML. 87 * <br /> 88 * <hr/> 89 * < br/> 90 * <img src="schattenparker.jpg"/></img> 91 */ 92 private void method10() {} 93 94 /** 95 * Tag content can be really mean. 96 * <p> 97 * Sometimes a p tag is closed. 98 * </p> 99 * <p> 100 * Sometimes it's not. 101 * 102 * <span style="font-family:'Times New Roman',Times,serif;font-size:200%"> 103 * Attributes can contain spaces and nested quotes. 104 * </span> 105 * <img src="slashesCanOccurWithin/attributes.jpg"/> 106 * <img src="slashesCanOccurWithin/attributes.jpg"> 107 * <!-- comments <div> should not be checked. --> 108 */ 109 private void method11() {} 110 }