引用的文件包含错误(http://users.tpg.com.au/ojburn/dtds/configuration_1_3.dtd)

时间:2017-02-14 07:26:56

标签: xml eclipse-plugin dtd xml-dtd dtd-parsing

在下面的xml中,我收到dtd标记中的错误。为什么会出现以下错误?是否缺少文件?

引用文件包含错误(http://users.tpg.com.au/ojburn/dtds/configuration_1_3.dtd)。

Xml 1:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://users.tpg.com.au/ojburn/dtds/configuration_1_3.dtd">

<!--
    This configuration file was written by the eclipse-cs plugin configuration editor
-->
<!--
    Checkstyle-Configuration: gwtp
    Description: none
-->
<module name="Checker">
  <property name="severity" value="warning"/>
  <module name="TreeWalker">
    <property name="cacheFile" value="${basedir}/${cache.file}"/> 
<module name="LineLength">
<property name="max" value="150"/>
</module>    
<module name="FileContentsHolder"/>
    <module name="UnnecessaryParentheses"/>
    <module name="ExplicitInitialization"/>
    <module name="ParameterAssignment"/>
    <module name="JUnitTestCase"/>
    <module name="StringLiteralEquality"/>
    <module name="SimplifyBooleanReturn"/>
    <module name="SimplifyBooleanExpression"/>
    <module name="ModifiedControlVariable"/>
    <module name="MissingSwitchDefault"/>
    <module name="MissingOverride"/>
    <module name="InterfaceIsType"/>
    <module name="RedundantImport"/>
    <module name="UnusedImports"/>
    <module name="ParameterName"/>
    <module name="LocalFinalVariableName"/>
    <module name="LocalVariableName">
      <property name="tokens" value="PARAMETER_DEF,VARIABLE_DEF"/>
    </module>
    <module name="LeftCurly"/>
    <module name="RightCurly"/>
    <module name="CovariantEquals"/>
    <module name="HiddenField">
      <property name="tokens" value="VARIABLE_DEF"/>
      <property name="ignoreConstructorParameter" value="true"/>
      <property name="ignoreSetter" value="true"/>
    </module>
    <module name="IllegalInstantiation">
      <property name="classes" value="java.lang.Boolean"/>
    </module>
    <module name="UpperEll">
      <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="checking for 4l rather than 4L"/>
    </module>
    <module name="JavadocStyle">
      <property name="severity" value="info"/>
      <property name="checkHtml" value="false"/>
      <property name="tokens" value="CLASS_DEF,CTOR_DEF,INTERFACE_DEF,METHOD_DEF,VARIABLE_DEF"/>
      <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Well formed java docs"/>
    </module>
    <module name="NeedBraces">
      <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="make sure if has braces"/>
    </module>
    <module name="JavadocMethod">
      <property name="severity" value="info"/>
      <property name="scope" value="protected"/>
      <property name="allowUndeclaredRTE" value="true"/>
      <property name="allowMissingParamTags" value="true"/>
      <property name="allowMissingThrowsTags" value="true"/>
      <property name="allowMissingReturnTag" value="true"/>
      <property name="allowMissingJavadoc" value="true"/>
      <property name="allowMissingPropertyJavadoc" value="true"/>
      <property name="logLoadErrors" value="true"/>
      <property name="tokens" value="METHOD_DEF"/>
      <metadata name="com.atlassw.tools.eclipse.checkstyle.lastEnabledSeverity" value="info"/>
    </module>
    <module name="DefaultComesLast"/>
    <module name="MultipleStringLiterals">
      <property name="severity" value="info"/>
      <property name="ignoreStringsRegexp" value=".{0,3}"/>
    </module>
    <module name="FallThrough"/>
    <module name="IllegalInstantiation">
      <property name="classes" value="Boolean"/>
    </module>
    <module name="Regexp">
      <property name="severity" value="info"/>
      <property name="format" value="[^:^&quot;]:&quot; .*+"/>
      <property name="message" value="check that a space is left after a colon on an assembled error message"/>
      <property name="illegalPattern" value="true"/>
      <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="check that a space is left after a colon with an assembled error message"/>
    </module>
    <module name="Regexp">
      <property name="severity" value="info"/>
      <property name="format" value="[\r]?[\n][ \t]*[\r]?[\n][ \t]*[\r]?[\n][ \t]*"/>
      <property name="message" value="more than one blank line"/>
      <property name="illegalPattern" value="true"/>
      <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="more than one blank line"/>
    </module>
    <module name="WhitespaceAround">
      <property name="tokens" value="COLON,NOT_EQUAL,QUESTION,DIV,DIV_ASSIGN,BXOR,BXOR_ASSIGN,MINUS,LCURLY,STAR,STAR_ASSIGN,TYPE_EXTENSION_AND,BAND,LAND,BAND_ASSIGN,MOD,MOD_ASSIGN,PLUS,PLUS_ASSIGN,LT,SL,SL_ASSIGN,LE,ASSIGN,MINUS_ASSIGN,EQUAL,GT,GE,SR,SR_ASSIGN,BSR,BSR_ASSIGN,BOR,BOR_ASSIGN,LOR,LITERAL_ASSERT,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,SLIST,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE"/>
      <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Must have spaces"/>
    </module>
    <module name="Regexp">
      <property name="format" value="[\r]?[\n][ \t]*[\r]?[\n][ \t]+[}][ ]*[\n]"/>
      <property name="message" value="newline before }"/>
      <property name="illegalPattern" value="true"/>
      <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="newline before }"/>
    </module>
    <module name="ModifierOrder"/>
    <module name="AvoidStarImport"/>
    <module name="EmptyStatement"/>
    <module name="MethodName"/>
    <module name="MemberName">
      <property name="format" value="[a-z]|[a-z][a-z_0-9][A-Za-z0-9_]*|[a-z](?&lt;!f)[A-Z0-9]*"/>
    </module>
    <module name="Regexp">
      <property name="format" value="[/][*][*][^\n]*[*][/]"/>
      <property name="message" value="No one line javadoc comments"/>
      <property name="illegalPattern" value="true"/>
      <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="No one line javadoc comments"/>
    </module>
    <module name="NoWhitespaceAfter">
      <property name="allowLineBreaks" value="false"/>
      <property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
    </module>
    <module name="WhitespaceAfter">
      <property name="tokens" value="TYPECAST"/>
    </module>
    <module name="TypecastParenPad">
      <property name="tokens" value="RPAREN,TYPECAST"/>
    </module>
    <module name="ParenPad"/>
    <module name="MethodParamPad"/>
    <module name="NoWhitespaceBefore"/>
    <module name="NoWhitespaceBefore">
      <property name="allowLineBreaks" value="true"/>
      <property name="tokens" value="DOT"/>
    </module>
    <module name="RedundantModifier"/>
    <module name="EqualsHashCode"/>
  </module>
  <module name="JavadocPackage">
    <property name="severity" value="ignore"/>
    <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
  </module>
  <module name="FileTabCharacter">
    <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="no tabs"/>
  </module>
  <module name="RegexpSingleline">
    <property name="format" value="  [/][/][A-z]"/>
    <property name="message" value="// comments must be followed by a space and be on their own line"/>
    <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="bad // comment"/>
  </module>
  <module name="SuppressionCommentFilter">
    <property name="offCommentFormat" value="CHECKSTYLE_OFF"/>
    <property name="onCommentFormat" value="CHECKSTYLE_ON"/>
  </module>
  <module name="SuppressionCommentFilter">
    <property name="offCommentFormat" value="CHECKSTYLE_NAMING_OFF"/>
    <property name="onCommentFormat" value="CHECKSTYLE_NAMING_ON"/>
    <property name="checkFormat" value=".*Name.*"/>
    <property name="messageFormat" value=".*name.*"/>
    <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Avoid name checking"/>
  </module>
  <module name="RegexpSingleline">
<!-- Check trailing spaces for all lines exept empty javadoc lines, due to eclipse formatter issue. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=360523 -->
    <property name="format" value="^((?!\s*\*).*)\s+$"/>
    <property name="message" value="Line has trailing spaces."/>
  </module>
 <!-- <module name="Header">
    <property name="fileExtensions" value="java"/>
    <property name="headerFile" value="${basedir}/${header.file}"/>
  </module> -->
  <module name="SuppressionFilter">
    <property name="file" value="${basedir}/${suppressions.file}"/>
  </module>
</module>

Xml 2:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suppressions PUBLIC
    "-//Puppy Crawl//DTD Suppressions 1.1//EN"
    "http://users.tpg.com.au/ojburn/dtds/suppressions_1_1.dtd">

<suppressions>

    <!-- Suppress MagicNumberCheck for files under test -->
    <suppress checks="MagicNumberCheck" files=".*[/\\]test[/\\].*" />

    <!-- Suppress MagicNumberCheck for files under test -->
    <suppress checks="JavadocType" files=".*[/\\]test[/\\].*" />
    <!-- Suppress files under target -->
    <suppress checks=".*" files=".*[/\\]target[/\\].*" />

    <!-- Suppress files under com/google -->
    <suppress checks=".*" files="com[/\\]google[/\\]" />

    <!-- Suppress variable name check for ApplicationErrorGeneratorInterface -->
    <suppress checks="MethodNameCheck" files=".*ApplicationErrorGeneratorInterface.java" />
</suppressions>

0 个答案:

没有答案