Dashboard > JJGuidelines > Home > Chapter 1 - Conventions > 1. 2. Convention Rules
JJGuidelines Log In | Sign Up   View a printable version of the current page.
1. 2. Convention Rules
Added by Patrick Vandenweghe, last edited by Stephan Janssen on Jan 12, 2007  (view change)

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.

Note

The current version of JJGuidelines only uses checkstyle as its main auditing tool. In future release other tools (like PMD), FindBugs, Simian, JCoverage and many more will be included. All rules marked as enforced are covered by checkstyle.

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.

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Hosted by JavaLobby
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.5 Build:#520 Jun 27, 2006) - Bug/feature request - Contact Administrators