Convention Rules
Defining
Rules must be defined in order to determine if conventions are followed. All convention rules can be found in Appendix A - Conventions Rules . Each rule will be given a severity level indicating the importance of the rule. The following table gives an overview of the severity levels used in this document:
Table 1.1. Severity
| Severity |
Impact |
| Enforced |
This priority is the same like 'High' but the related rule can be enforced through the use of an auditing tool (see the section called "Enforcing"). |
| High |
The convention should be followed at all times. No exceptions are allowed! The source code should be changed to conform to the convention. Rules with a 'High' priority can not (yet) be inforced using an auditing tool. |
| Normal |
The convention should be followed whenever it is possible. Exceptions are allowed but must be documented. |
| Low |
The convention should be followed. Exceptions are allowed and should not be documented. |
Enforcing
This document will not only define the different Java and Java EE conventions. We'll use open-source auditing tools to automatically enforce important rules. So when you deliver your Java EE project you can include the auditing reports showing that your implementation is at least compliant to the described enforced conventions. In the current release not all high rules can be enforced yet by means of one tool. In time, hopefully soon, and with the help of the java community, more high rules will make it to the status enforced.
Checkstyle
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. The use of checkstyle in combination with the JJGuidelines conventions and guidelines is described in the Appendix C - CheckStyle.