wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes Checkstyle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Checkstyle" Watch "Checkstyle" New topic
Author

Checkstyle

Robert Hicks
Greenhorn

Joined: Dec 14, 2003
Posts: 4
I am using Checkstyle with the Eclipse IDE. Has anyone created a checkstyle based on the JavaRanch style guide?
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Welcome to JavaRanch, Robert!
For those not familiar with Checkstyle, it's a project at Sourceforge.net.
I'm moving this thread to the IDEs and Other Tools forum...


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Has anyone created a checkstyle based on the JavaRanch style guide?
I just did a quick search on this forum for "checkstyle" and it doesn't appear that anybody has done such a thing. (Note that the search page link is at the top right of this page.)
Are you thinking of doing just that? If so, I'd bet that a few Ranchers would be glad to have it, including a few over on the Cattle Drive. Also, I'm sure it would make for an interesting read and a nice thing to learn about if you were to perhaps write an article or two on the subject for the JavaRanch Journal. Let me know if you do write such a thing.
-Dirk
dirk@javaranch.com
ofer misk
Greenhorn

Joined: Jun 16, 2003
Posts: 19
hi there!
im just learnning the CheckStyle tool and i have some questions of my own...
i created a Check, and i dont have a clue of how to integrate it to the tool.
should i use Ant? is there some magic in the eclipse that can make such integration?
thanks
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
The eclipse integration only provides a way to launch Checkstyle from a graphic UI (and how to display results in the same). In order to integrate a custom check, you need to integrate it into Checkstyle itself.
Based on a quick glance at the documentation, it seems that you need to first include the custom check implementation into your classpath and then declare the check in a configuration file of some sort.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
ofer misk
Greenhorn

Joined: Jun 16, 2003
Posts: 19
sorry about the nagging, but im kinda lost in here...
the Check is in my classPath, and i wrote the configuration file, i guess i dont fully understand the situation...
thanks anyway
p.s - if you have a nice integration tutorial, ill be more than greatfull!!!
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
If you don't get an answer from this forum, you might want to consider searching the particular plugin's "official" forum (is there is one). I have no experience at all with custom checks so I can't help you on the specifics.
ofer misk
Greenhorn

Joined: Jun 16, 2003
Posts: 19
thanks anyway
Robert Hicks
Greenhorn

Joined: Dec 14, 2003
Posts: 4
There are a couple of plugins for eclipse. The one I use is called...ta da...Checkclipse. Which prompted my original post.
ofer misk
Greenhorn

Joined: Jun 16, 2003
Posts: 19
yes, i got one of the plugins, i wrote my check and xml config file, but each time i try to import the checkstyle configuration i wrote (my xml) to the checkstyle checkset i get an exception : "checkstyleException: unable to load class for rule...".
any idea?
thanks
Robert Hicks
Greenhorn

Joined: Dec 14, 2003
Posts: 4
Originally posted by ofer misk:
yes, i got one of the plugins, i wrote my check and xml config file, but each time i try to import the checkstyle configuration i wrote (my xml) to the checkstyle checkset i get an exception : "checkstyleException: unable to load class for rule...".
any idea?
thanks

You have to go into your XML file and comment out that class rule. Checkclipse does not support "all" of the Checkstyle rules.
ofer misk
Greenhorn

Joined: Jun 16, 2003
Posts: 19
yes, but the rule i should exclude is the rule i wrote with blood .
im trying to integrate a new rule..
can you send an example ?
thanks ...
 
 
subject: Checkstyle
 
Similar Threads
import
Programs for checking the Java-code corresponding to Java Code Conventions rules
Code duplication
Better JUnit Tests with PMD - free book chapter
code review tool for java