How to configure checkstyle (in Ant nt Maven)? I tried a little, but I did not get the reports properly. Here is my Ant script.
<target name="checkStyle"> <taskdef resource="checkstyletask.properties"> <classpath refid="compile.class.pathtest"/> </taskdef> <checkstyle config="${source.code.dir}/config/sun_checks.xml"> <fileset dir="${base.working.dir}/JavaFolder"> <include name="**/*.java"/> </fileset> <formatter type="plain"/> <formatter type="xml" toFile="checkstyle-result.xml"/> </checkstyle> </target> <path id="compile.class.pathtest"> <pathelement location="${checkstyle.dir}/checkstyle-5.5-all.jar"/> <pathelement location="${checkstyle.dir}/checkstyle-5.5.jar"/> <pathelement location="${checkstyle.dir}/pmd-3.9.jar"/> <pathelement location="${checkstyle.dir}/asm-3.0.jar"/> <pathelement location="${checkstyle.dir}/backport-util-concurrent-2.1.jar"/> <pathelement location="${checkstyle.dir}/jaxen-1.1-beta-10.jar"/> <pathelement location="${checkstyle.dir}/saxpath-1.0-FCS.jar"/> </path>
What is sun_checks.xml file? I downloaded and saved in the above folder. When you start the build, it shows some warnings and errors. Later it looks like this.
STRICTLY MALFUNCTIONAL
C: \ server \ build.xml: 9725: The following error occurred while executing this line: C: \ server \ build.xml: 3838: 56 errors and 27599 warnings were received.
Could you advise me how to solve this?
thanks
source share