Skip to main content
Jump to: navigation, search


Eclipse JDT Warnings Level

For code style verification, it is recommended to configure Eclipse JDT settings for errors/warning levels : all rules levels set as "ignored" should be set as "warning".

Some rules might create too many constraints on Java code in some circumstances. The developer is allowed to deactivate the rules in specific areas :

- with projects specific errors/warning levels.

- with @SuppressWarnings, adding some explanation to justify the deviation.

Checkstyle Usage

For MoDisco internal developments, the project defines a MoDisco.checkstyle file. This file defines coding rules. It was initiated from the "Sun Checks (Eclipse)" default configuration. Some rules which were deemed too restrictive have been disabled.

This project is available in SVN:

For configuring a new IDE :

  • Each new MoDisco source project should have checkstyle enabled (context menu on the project, Checkstyle > Activate Checkstyle). Additional warnings are then computed on source code. A new builder is associated to the project.
  • The local-check-config tag must be manually added to the .checkstyle file (see below) so that it points to the main checkstyle configuration file in

Here is an example checkstyle configuration file (.checkstyle). It ignores warnings on "":

 <?xml version="1.0" encoding="UTF-8"?>
 <fileset-config file-format-version="1.2.0" simple-config="true">
   <local-check-config name="MoDisco" location="../" type="project" description=""/>
   <fileset name="all" enabled="true" check-config-name="MoDisco" local="true">
     <file-match-pattern match-pattern="." include-pattern="true"/>
     <file-match-pattern match-pattern="" include-pattern="false"/>
  • Some generated files (such as EMF generated files) do not comply with the rules. For such files, the warnings can be ignored by selecting the package in section "Exclude from checking" in the checkstyle properties on the project, or checkstyle may be deactivated for the whole EMF generated project.


IP status

Note that Checkstyle is not an tool. However, its source code is under the EPL, and its current use has been formally IP-validated for the MoDisco project:

Also note that Checkstyle is not intended to be distributed with MoDisco.

Back to the top