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

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