Coding Style

To facilitate collaboration, a coding style guide is in order.

Defined by use so far:

  • spaces instead of tabs
  • shiftwidth=2
  • remove trailing white space
  • { and } in their own lines

Here are two modelines that you can add to your source files that will help with sticking to these defaults:

// vim: shiftwidth=2:expandtab:tabstop=2:cindent
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-space on;

There is a tool in the repository that will beautify any code in the tree. It is here:


For emacs, all that's needed is the following content in the file $TOP/.dir-locals.el:

((c-mode . ((c-file-style . "bsd")
        (c-basic-offset . 2)
        (indent-tabs-mode . nil))))

In newer versions of darktable, this file should already be present.

Also available in: PDF HTML TXT