Let's write Java code that adheres to a coding standard.
Submitted by Ali Abdel-Aziz on Tue, 2006-02-21 12:29.
I think all of us wants to write code as book says.\\
But most of us didn't knows all the coding standards and what
you think it is good it may not be so.\\
Even if you read for example the Java coding standared you will forget some things (I'm sure of that).\\
\\
so we need some persone to review our code and and tell us thats good or thats bad, what if there exists tools that helps you doing that.\\
I'm using amodule called Checkstyle that I configered it to work
with net beans.\\
Checkstyle is a development tool to help programmers write Java
code that adheres to a coding standard. \\
It automates the process of checking Java code to spare humans
of this boring (but important) task.\\
This makes it ideal for projects that want to enforce a coding
standard.\\
\\
Checkstyle is highly configurable and can be made to support
almost any coding standard.\\
An example of what you code do in the configuration file is to
support the Sun Code Conventions and more \\
you can write your owen regular expression that can be used for
checking the variables naming conventions.\\
\\
offcourse you can configure checkstyle or other tools with any
other IDEs or even with maven or ant or others.\\
\\
and this is the link for nbCheckstyle Home Page\\
http://nbcheckstyle.sourceforge.net/ \\






Eclipse also
Eclipse also has a similar tool, Open the Window menu --> Prefrences --> Java --> Code Style --> Formatter
click new and formate ur code as u like
Infact, what really matters with me is the code review in terms of coding guidlines, for example should if a method supposed to return an array, and inisde that method i found that there will be no valuse inside the array, so the question is: should the method return null or return an empty array?, the best practice is to return an empty array, and it will be highly appreciatable if there is atool that can do that code reviwing.
Well, infact there is a one inside IBM-RAD6, i will be submitting a review about it later on :)
The Java code formatter has many improvements to offer: The Java > Code style > Code Formatter preference page lets you choose from existing profiles, define your own, and share them with others.
The new formatter is highly configurable, with over 140 options covering everything from brace positions to wrap lines up to Javadoc comment formatting.
Oracle JDeveloper 10g CheckStyle plug-in
Code Analyzers
I agree with Tamer