Skip to content

CodingConvention

Daniel Dietsch edited this page May 22, 2016 · 17 revisions

Ultimate's Coding Conventions

Contributing to Ultimate requires that you adhere to Ultimate's coding conventions. In general, we do not reject contributions that do not match our guidelines, but this may change in the future.

Important Conventions

The following table lists the most important syntactic conventions.

Description Example
Class names Class names should be CamelCase, i.e., match the regular expression ^[A-Z][a-zA-Z0-9]*$
Interface names Interface names should begin with I and be followed with CamelCase. They must match the regular expression ^I[A-Z][a-zA-Z0-9]*$.
Method names Method names should begin with lower case and be followed with CamelCase. They must match the regular expression ^[a-z][a-zA-Z0-9]*$
Field names
Package names
Static non-final field names
Constant names
Local variables and method parameters

We actually use much more, but instead of listing all of them you should rely on the output of the SonarLint tool, which is available as an Eclipse plugin (see the next section) and as web interface.

Sonar

Installing and Configuring SonarLint for Eclipse

Installation

  • Get the latest SonarLint from the Eclipse marketplace.
  • Install it by dragging the install icon in your Eclipse window.

Configuration

  • Go to "Window" -> "Show View" -> "Other..." -> "SonarLint"
  • Open the views "SonarQube Servers" and "SonarLint Issues"
  • Find the SonarQube Servers view in your workspace
  • Add a new connection:
  • Server URL: https://monteverdi.informatik.uni-freiburg.de/sonar
  • Server Label: monteverdi
  • Username:
  • Password:
  • Test the connection (it should work if you have internet and https://monteverdi.informatik.uni-freiburg.de/sonar is reachable).
Clone this wiki locally