Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to configure custom check

 
sahid ul karim
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have written my own check "MultipleStringLiteralsChecktest" for finding string.There, i have written a method "setAllowedDuplicates" .In xml file i am giving
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="TreeWalker">
<!-- my custom Check -->
<module name="MultipleStringLiteralsChecktest">
<property name="AllowedDuplicates" value="0"/>
</module>
</module>
</module>
But while building its givin this error"-
Unable to create a Checker: cannot initialize module TreeWalker - Property 'AllowedDuplicates'in module MultipleStringLiteralsChecktest does not exist, please check the documentation.
could somebody explain to me why its giving error?
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know what you are using here, but I guess you don't have a public method called setAllowedDuplicates in your MultipleStringLiteralsChecktest class.
 
sahid ul karim
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No ,i have written a public method called setAllowedDuplicates:-
private int mAllowedDuplicates = 1;
public void setAllowedDuplicates(int aAllowedDuplicates)
{
mAllowedDuplicates = aAllowedDuplicates;
}
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to change
<property name="AllowedDuplicates" value="0"/>
with
<property name="allowedDuplicates" value="0"/>


And please kindly change your name according to the naming policy : http://www.javaranch.com/name.jsp

Thank you
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

First, a bit of business: you may not have read our naming policy on the way in. It requires that you use a full, real (sounding) first and last name for your display name. Initials aren't enough. You can change your display name here. Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic