<project name="CodeNarcTest" >

<taskdef name="codenarc" classname="org.codenarc.ant.CodeNarcTask"/>

<target name="runCodeNarc">

    <mkdir dir="reports"/>

    <codenarc
            ruleSetFiles="rulesets/basic.xml,rulesets/exceptions.xml,rulesets/imports.xml,rulesets/braces.xml"
            maxPriority1Violations="5">
		<report type="html" toFile="reports/CodeNarcAntReport.html" title="My Sample Code"/>
		<fileset dir="src">
			<include name="**/*.groovy"/>
		</fileset>
	</codenarc>

	<echo message="Done."/>

</target>

</project>