You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

check.xml 2.1 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0"?>
  2. <project default="htmlreport" name="CheckAnt">
  3. <!-- <import file="build.xml"/> -->
  4. <property name="src.dir" value="src"/>
  5. <property name="java.dir" value="${src.dir}/main"/>
  6. <property name="etc.dir" value="${src.dir}/etc"/>
  7. <property name="config.dir" value="${etc.dir}/checkstyle"/>
  8. <property name="build.dir" value="build"/>
  9. <property name="checkstyle.reportdir" value="${build.dir}/reports/checkstyle"/>
  10. <property name="checkstyle.raw" value="${checkstyle.reportdir}/raw.xml"/>
  11. <property name="stylesheet.html" value="${config.dir}/checkstyle-frames.xsl"/>
  12. <property name="stylesheet.text" value="${config.dir}/checkstyle-text.xsl"/>
  13. <property name="stylesheet.xdoc" value="${config.dir}/checkstyle-xdoc.xsl"/>
  14. <property name="checkstyle.basedir" location="${java.dir}"/>
  15. <!-- Ant Checkstyle report -->
  16. <property name="tocheck" value="**/*.java"/>
  17. <property name="javadoc.scope" value="public"/>
  18. <target name="checkstyle">
  19. <mkdir dir="${checkstyle.reportdir}"/>
  20. <taskdef resource="checkstyletask.properties"/>
  21. <checkstyle config="${config.dir}/checkstyle-config" failOnViolation="false">
  22. <formatter type="xml" toFile="${checkstyle.raw}"/>
  23. <fileset dir="${java.dir}">
  24. <include name="${tocheck}"/>
  25. </fileset>
  26. </checkstyle>
  27. </target>
  28. <target name="htmlreport">
  29. <mkdir dir="${checkstyle.reportdir}"/>
  30. <style in="${checkstyle.raw}" style="${stylesheet.html}"
  31. out="${checkstyle.reportdir}/html/output.txt">
  32. <param name="basedir" expression="${checkstyle.basedir}"/>
  33. </style>
  34. </target>
  35. <target name="textreport">
  36. <style in="${checkstyle.raw}" style="${stylesheet.text}"
  37. out="${checkstyle.reportdir}/report.txt">
  38. </style>
  39. </target>
  40. <target name="xdocreport">
  41. <style in="${checkstyle.raw}" style="${stylesheet.xdoc}"
  42. out="${checkstyle.reportdir}/xdocs/index.xml">
  43. <param name="basedir" expression="${checkstyle.basedir}"/>
  44. </style>
  45. </target>
  46. </project>