This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Checkstyle configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Checkstyle configuration" Watch "Checkstyle configuration" New topic

Checkstyle configuration

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9752


Can anyone please let me know on how to write a XML checkstyle configuration for a project that I have in eclipse? I mean how to write a customized one according to some specific coding rules that we follow? Can anyone please share some idea on this?

SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Peter Johnson

Joined: May 14, 2008
Posts: 5850

Are you asking for the configuration file syntax? If so, see .

Or are you asking how to write new rules to check? If so, what specific rule are you attempting to write?

JBoss In Action
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9752

I want to know how I can write new customized rules? For example, I want a rule that checks for an if else condition and warns me that I should always prefer ternary operators. Any good resource from Checkstyle that would help me acheive this? Help appreciated.
I agree. Here's the link:
subject: Checkstyle configuration