wiki:Guidelines

General guidelines for development

This page describe the current guidelines for planning and documentation of the development in the JModelica.org project. The guidelines are devised as to grant well documented code and a traceable development processes.

Before going into the details of tools and processes, there are five basic rules to keep in mind - which we should all strive to follow:

  • Always work with one specific Trac ticket in mind
  • Always write clear and descriptive Subversion commit messages
  • Always refer to a Trac ticket in a commit message (e.g., #12)
  • Always make a comment of a Subversion commit in a Trac ticket (e.g., r23)
  • Always run the test suite before committing code
  • Add relevant information to the CHANGELOG.txt

Guidelines for specific tools and procedures:

Coding Guidelines

JModelica.org is written in several programming languages and techniques. The following guidelines should be followed for all programming languages in order to get a uniformed look. It also enables the use of the same editor when editing different parts of JModelica.org source code, independent of source code language.

  • Indentation consists of four spaces
  • Use UTF-8 without BOM
  • Use Unix-style line endings (\n)
  • A space should follow commas in function arguments or similar comma separated lists. I.e.
    int a = f(arg1, arg2);
    
  • Lines should not be longer than 80 characters, except for Java/JastAdd files where they should not be longer than 120 characters.

Language specific coding guidelines:

Recommended Editor Settings

Commonly used editors and how to configure them so that they follows our coding guidelines:

Last modified 3 months ago Last modified on Jun 29, 2017 10:06:23 AM