I have some own extended checks. I have exported them as plug-in and in Eclipse, they are showing warning/error. So the extended checks are working fine.
Now I want to g
I have found out the following solution, which is working fine.
<taskdef>
, set this .jar as classpath
Like, after done till 2nd step, I found checkstyle_packages.xml is already present, so I edit it and added the content from extended one in proper position.
Previous Version:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE checkstyle-packages PUBLIC
"-//Puppy Crawl//DTD Package Names 1.0//EN"
"http://www.puppycrawl.com/dtds/packages_1_0.dtd">
<checkstyle-packages>
<package name="com.puppycrawl.tools.checkstyle">
<package name="checks">
<package name="annotation"/>
<package name="blocks"/>
<package name="coding"/>
<package name="design"/>
<package name="duplicates"/>
<package name="header"/>
<package name="imports"/>
<package name="indentation"/>
<package name="javadoc"/>
<package name="metrics"/>
<package name="modifier"/>
<package name="naming"/>
<package name="regexp"/>
<package name="sizes"/>
<package name="whitespace"/>
</package>
<package name="filters"/>
</package>
</checkstyle-packages>
Changed Version:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE checkstyle-packages PUBLIC
"-//Puppy Crawl//DTD Package Names 1.0//EN"
"http://www.puppycrawl.com/dtds/packages_1_0.dtd">
<checkstyle-packages>
<package name="com.puppycrawl.tools.checkstyle">
<package name="checks">
<package name="annotation"/>
<package name="blocks"/>
<package name="coding"/>
<package name="design"/>
<package name="duplicates"/>
<package name="header"/>
<package name="imports"/>
<package name="indentation"/>
<package name="javadoc"/>
<package name="metrics"/>
<package name="modifier"/>
<package name="naming"/>
<package name="regexp"/>
<package name="sizes"/>
<package name="whitespace"/>
</package>
<package name="filters"/>
</package>
<!-- Added this lines -->
<package name="myCheck">
<package name="checks"/>
</package>
<!-- -->
</checkstyle-packages>
now the build file is running successfully and in the report I'm getting violation of extended checks too.