Performing an automated code review
In IBM® Rational® products,
an automated static analysis code review lets you examine source code at any
time during the development life cycle of an application. A code review ensures
that the code complies with recognized coding standards, finds unwanted dependencies,
and ensures that code development follows the intended structural design.
You can run automated code reviews on all the code in your workspace,
on a resource working set of code, or on a project you specify to analyze
dependencies between components and resolve design errors early in the development
process. When you perform a code review that applies the rules that you create,
you are checking to ensure that the architecture of an application has been
implemented according to your specifications.
- Running a code review
You can run a code review on your Java™ source code with an analysis configuration that uses the Code Review for Java domain, it's rule categories, and rules. In the analysis configuration, you can also determine the scope of an analysis, the source code that you want to analyze.
- Running a code review from the command line
You can run code reviews on Java source code from the command line using analysis rules in a rules file that you created.
- Running a code review as an Ant task
You can run a code review when you build an Eclipse plug-in in the plug-in development environment (PDE) by adding an Apache Ant task to the plug-in's build.xml file.
- Viewing code review results
You can view the results of an automated code review in the Analysis Results view. You can filter the results to display results that correspond to each rule in your analysis configuration, or only those results that do not conform to a particular rule. From the Analysis Results view, you can also open resources in their associated editors to correct problems, or apply quick fixes, if they are available.
- Applying quick fixes to code review results
You can correct problems in the results of your code review analysis automatically if rule authors provided a quick fix. A quick fix is an automated solution for a common or trivial problem. Quick fixes can save time and ensure that problems are corrected consistently.
- Code review reference
The Code Review for Java domain comprises rule categories that contain rules that focus on several aspects of software quality such as design principles, globalization, J2EE and J2SE best practices, J2EE security, and software performance. An analysis of Java source code applies the rules to identify code that does not conform to recognized standards.