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.5 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?xml version="1.0"?>
  2. <project default="checkstyle" 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. <taskdef resource="simiantask.properties"/>
  19. <target name="checkstyle">
  20. <mkdir dir="${checkstyle.reportdir}"/>
  21. <taskdef resource="checkstyletask.properties"/>
  22. <checkstyle config="${config.dir}/checkstyle-config" failOnViolation="false">
  23. <formatter type="xml" toFile="${checkstyle.raw}"/>
  24. <fileset dir="${java.dir}">
  25. <include name="${tocheck}"/>
  26. <exclude name="**/BZip2Constants.java"/>
  27. <exclude name="**/CVSPass.java"/>
  28. </fileset>
  29. </checkstyle>
  30. </target>
  31. <target name="htmlreport">
  32. <mkdir dir="${checkstyle.reportdir}"/>
  33. <style in="${checkstyle.raw}" style="${stylesheet.html}"
  34. out="${checkstyle.reportdir}/html/output.txt">
  35. <param name="basedir" expression="${checkstyle.basedir}"/>
  36. </style>
  37. </target>
  38. <target name="textreport">
  39. <style in="${checkstyle.raw}" style="${stylesheet.text}"
  40. out="${checkstyle.reportdir}/report.txt">
  41. </style>
  42. </target>
  43. <target name="xdocreport">
  44. <style in="${checkstyle.raw}" style="${stylesheet.xdoc}"
  45. out="${checkstyle.reportdir}/xdocs/index.xml">
  46. <param name="basedir" expression="${checkstyle.basedir}"/>
  47. </style>
  48. </target>
  49. <target name="dumptext" depends="checkstyle, textreport">
  50. <concat>
  51. <filelist dir="${checkstyle.reportdir}" files="report.txt"/>
  52. </concat>
  53. </target>
  54. <target name="simiancheck">
  55. <simian>
  56. <fileset dir="${java.dir}" />
  57. </simian>
  58. </target>
  59. </project>